@@ -10,7 +10,8 @@ <h2 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a><
1010 < var class ="Ar "> overlay_file</ var > ] [< code class ="Fl "> < a href ="#o "> -o</ a > </ code >
1111 < var class ="Ar "> out_file</ var > ] [< code class ="Fl "> < a href ="#p "> -p</ a > </ code >
1212 < var class ="Ar "> pad_value</ var > ] [< code class ="Fl "> < a href ="#S "> -S</ a > </ code >
13- < var class ="Ar "> spec</ var > ] < var class ="Ar "> file ...</ var > </ td >
13+ < var class ="Ar "> spec</ var > ] [< code class ="Fl "> < a href ="#W "> -W</ a > </ code >
14+ < var class ="Ar "> warning</ var > ] < var class ="Ar "> file ...</ var > </ td >
1415 </ tr >
1516</ table >
1617</ section >
@@ -111,6 +112,13 @@ <h2 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIP
111112 < dt id ="v "> < a class ="permalink " href ="#v "> < code class ="Fl "> -v</ code > </ a > ,
112113 < code class ="Fl "> --verbose</ code > </ dt >
113114 < dd > Verbose: enable printing more information to standard error.</ dd >
115+ < dt id ="W "> < a class ="permalink " href ="#W "> < code class ="Fl "> -W</ code > </ a >
116+ < var class ="Ar "> warning</ var > , < code class ="Fl "> --warning</ code >
117+ < var class ="Ar "> warning</ var > </ dt >
118+ < dd > Set warning flag < var class ="Ar "> warning</ var > . A warning message will be
119+ printed if < var class ="Ar "> warning</ var > is an unknown warning flag. See
120+ the < a class ="Sx " href ="#DIAGNOSTICS "> DIAGNOSTICS</ a > section for a list
121+ of warnings.</ dd >
114122 < dt id ="w "> < a class ="permalink " href ="#w "> < code class ="Fl "> -w</ code > </ a > ,
115123 < code class ="Fl "> --wramx</ code > </ dt >
116124 < dd > Expand the WRAM0 section size from 4 KiB to the full 8 KiB assigned to
@@ -181,6 +189,70 @@ <h3 class="Ss" id="Scrambling_algorithm"><a class="permalink" href="#Scrambling_
181189</ section >
182190</ section >
183191< section class ="Sh ">
192+ < h2 class ="Sh " id ="DIAGNOSTICS "> < a class ="permalink " href ="#DIAGNOSTICS "> DIAGNOSTICS</ a > </ h2 >
193+ < p class ="Pp "> Warnings are diagnostic messages that indicate possibly erroneous
194+ behavior that does not necessarily compromise the linking process. The
195+ following options alter the way warnings are processed.</ p >
196+ < dl class ="Bl-tag ">
197+ < dt id ="Werror "> < a class ="permalink " href ="#Werror "> < code class ="Fl "> -Werror</ code > </ a > </ dt >
198+ < dd > Make all warnings into errors. This can be negated as
199+ < code class ="Fl "> -Wno-error</ code > to prevent turning all warnings into
200+ errors.</ dd >
201+ < dt id ="Werror= "> < a class ="permalink " href ="#Werror= "> < code class ="Fl "> -Werror=</ code > </ a > </ dt >
202+ < dd > Make the specified warning or meta warning into an error. A warning's name
203+ is appended (example: < code class ="Fl "> -Werror=assert</ code > ), and this
204+ warning is implicitly enabled and turned into an error. This can be
205+ negated as < code class ="Fl "> -Wno-error=</ code > to prevent turning a
206+ specified warning into an error, even if < code class ="Fl "> -Werror</ code >
207+ is in effect.</ dd >
208+ </ dl >
209+ < p class ="Pp "> The following warnings are “meta” warnings, that
210+ enable a collection of other warnings. If a specific warning is toggled via
211+ a meta flag and a specific one, the more specific one takes priority. The
212+ position on the command-line acts as a tie breaker, the last one taking
213+ effect.</ p >
214+ < dl class ="Bl-tag ">
215+ < dt id ="Wall "> < a class ="permalink " href ="#Wall "> < code class ="Fl "> -Wall</ code > </ a > </ dt >
216+ < dd > This enables warnings that are likely to indicate an error or undesired
217+ behavior, and that can easily be fixed.</ dd >
218+ < dt id ="Weverything "> < a class ="permalink " href ="#Weverything "> < code class ="Fl "> -Weverything</ code > </ a > </ dt >
219+ < dd > Enables literally every warning.</ dd >
220+ </ dl >
221+ < p class ="Pp "> The following warnings are actual warning flags; with each
222+ description, the corresponding warning flag is included. Note that each of
223+ these flag also has a negation (for example,
224+ < code class ="Fl "> -Wobsolete</ code > enables the warning that
225+ < code class ="Fl "> -Wno-obsolete</ code > disables; and
226+ < code class ="Fl "> -Wall</ code > enables every warning that
227+ < code class ="Fl "> -Wno-all</ code > disables). Only the non-default flag is
228+ listed here. Ignoring the “no-” prefix, entries are listed
229+ alphabetically.</ p >
230+ < dl class ="Bl-tag ">
231+ < dt id ="Wno-assert "> < a class ="permalink " href ="#Wno-assert "> < code class ="Fl "> -Wno-assert</ code > </ a > </ dt >
232+ < dd > Warn when < code class ="Ic "> WARN</ code > < span class ="No "> -type</ span >
233+ assertions fail. (See “Aborting the assembly process” in
234+ < a class ="Xr " href ="./rgbasm.5 "> rgbasm(5)</ a > for
235+ < code class ="Ic "> ASSERT</ code > ).</ dd >
236+ < dt id ="Wdiv "> < a class ="permalink " href ="#Wdiv "> < code class ="Fl "> -Wdiv</ code > </ a > </ dt >
237+ < dd > Warn when dividing the smallest negative integer (-2**31) by -1, which
238+ yields itself due to integer overflow. This warning is enabled by
239+ < code class ="Fl "> -Wall</ code > .</ dd >
240+ < dt id ="Wno-obsolete "> < a class ="permalink " href ="#Wno-obsolete "> < code class ="Fl "> -Wno-obsolete</ code > </ a > </ dt >
241+ < dd > Warn when obsolete features are encountered, which have been deprecated
242+ and may later be removed.</ dd >
243+ < dt id ="Wshift "> < a class ="permalink " href ="#Wshift "> < code class ="Fl "> -Wshift</ code > </ a > </ dt >
244+ < dd > Warn when shifting right a negative value. Use a division by 2**N instead.
245+ This warning is enabled by < code class ="Fl "> -Wall</ code > .</ dd >
246+ < dt id ="Wshift-amount "> < a class ="permalink " href ="#Wshift-amount "> < code class ="Fl "> -Wshift-amount</ code > </ a > </ dt >
247+ < dd > Warn when a shift's operand is negative or greater than 32. This warning
248+ is enabled by < code class ="Fl "> -Wall</ code > .</ dd >
249+ < dt id ="Wno-truncation "> < a class ="permalink " href ="#Wno-truncation "> < code class ="Fl "> -Wno-truncation</ code > </ a > </ dt >
250+ < dd > Warn when an implicit truncation (for example, < code class ="Ic "> db</ code >
251+ to an 8-bit value) loses some bits. This occurs when an N-bit value is
252+ 2**N or greater, or less than -2**N.</ dd >
253+ </ dl >
254+ </ section >
255+ < section class ="Sh ">
184256< h2 class ="Sh " id ="EXAMPLES "> < a class ="permalink " href ="#EXAMPLES "> EXAMPLES</ a > </ h2 >
185257< p class ="Pp "> All you need for a basic ROM is an object file, which can be made
186258 into a ROM image like so:</ p >
0 commit comments