Repository navigation
Compiler Option W
Home › Compiler Option: -w
Set minimum warning level.
Syntax
-w level | all | none | param | Escape | pedantic | Next | funcptr | constness | suffix | Error | upcast
Parameters
level
Warning messages only with a level equal or greater to this value will be output.
all
Equivalent to specifying a level of zero (0).
none
Suppresses all warnings.
param
Warn when procedure parameters aren't specified with either ByVal or ByRef.
Escape
Warn when string literals contain any number of escape characters (\).
pedantic
Equivalent to specifying the param and Escape arguments, plus length checking of parameters passed ByVal and of any CPtr converting to pointer only, plus warning on useless suffixes in '-lang fb'.
Next
Warn when Next is followed by an identifier.
funcptr
Warn on mismatched procedure pointers, including conversions in Cast and CPtr expressions. Implies '-w all'. Experimental. Behaviour may change in future versions.
constness
Warn when Const (Qualifier) is discarded in an assignment. Implies '-w funcptr' and '-w all'. Behaviour may change in future versions.
suffix
Warn on useless suffixes in '-lang fb'.
Error
Report warnings as errors. Warnings cause the error count to increase, warning messages are displayed as "error warning...", compilation / assembly / linking aborts, and the compiler exits with an error code.
upcast
Warn when up-casting discards initializers.
Description
The -w compiler option determines which compiler warnings, if any, are output. Each possible warning is associated with a warning level, starting from zero (0) and increasing with the potential problems that may occur.
The param, Escape, pedantic, Next, funcptr, constness, suffix, Error, and upcast arguments provide additional warnings not ordinarily output, even by default.
The default, if the -w option is not specified, is as if -w 1 was used. The -w option can be specified multiple times. Warning messages having a level of 0 are not shown by default.
-w none, or a significantly high level value will have the effect of suppressing all warning messages.
The compiler does not issue warning or error if the warning name itself is not valid. For example -w flarg, is not a recognized name for a warning. The compiler silently ignores this to allow command lines with warnings added in new versions of the compiler to also be used with older versions of the compiler without complaint.
Version
See also
Reproduced from the FreeBASIC Wiki Manual under the GNU Free Documentation License 1.3 — with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. Copyright © the FreeBASIC project and wiki contributors. See License.
tiko-lang · Home · Feature Index · Keyword Index · License
FreeBASIC manual pages reproduced under the GNU FDL 1.3.
- Home
- What Is tiko-lang
- Quick Start
- Installing on macOS
- Debugging
- Feature Index
- Compatibility
- FAQ
- AI Cheatsheet
- Generics
- Interfaces
- For Each
- Iterators
- Tuples
- Array Results
- Defer
- Lambdas
- Block Strings
- Partial Types
- String Slices
- Embed
- Typed Variadics
- C Header Import
- Foreign Library Linking
- UString
- Fixed-Width Types
- Nullptr
- String Library
- Format
- Array
- Map
- Set
- LinkedList
- OrderedMap
- OrderedSet
- Sorting
- Optional
- Result
- Smart Pointers
- Date and Time (Chrono)
- Time Zones
- Filesystem
- File Streams
- Config (INI and TOML)
- Codec
- Hash
- UUID
- OS
- Process
- Net
- HTTP and TLS
- Math Library
- Finance
- Logging
- Terminal TUI Library
- PsControls
- tkControls
- sys/win
- Goroutines and Channels
- LLVM Backend
- tiko build
- TIKO_COMPILER
- Variable Declarations
- Standard Data Types
- User Defined Types
- Procedures
- Operators
- Control Flow Statements
- Converting Data Types
- Array Functions
- String Functions
- Mathematical Functions
- Bit Manipulation
- Date and Time Functions
- File I/O Functions
- Console Functions
- User Input (Runtime Library)
- User Input Functions (Graphics Library)
- Screen Functions
- 2D Drawing Functions
- Graphics Library Reference
- Graphics Keyword List
- Memory Functions
- Threading Support Functions
- Error Handling Functions
- Operating System Functions
- Preprocessor
- Intrinsic Defines
- Miscellaneous Keywords
- Modularizing