
9 Lexical structure
9.5 Pre-processing directives
9.5.5 Diagnostic directives
Paragraph 11 The diagnostic directives are used to explicitly generate error and warning messages that are reported in the same way as other compile-time errors and warnings. pp-diagnostic :: whitespaceopt # whitespaceopt error pp-message whitespaceopt # whitespaceopt warning pp-message pp-message :: new-line whitespace input-charactersopt new-line [Example: The example
#warning Code review needed before check-in
#if Debug && Retail
#error A build can't be both debug and retail
#endif
class Test {...}
always produces a warning ("Code review needed before check-in"), and produces a compile-time error if the pre-processing identifiers Debug and Retail are both defined. Note that a pp-message can contain arbitrary text; specifically, it need not contain well-formed tokens, as shown by the single quote in the word can't. end example]
| |
| Jagger Software Ltd | |
| Company # 4070126 | |
| VAT # 762 5213 42 |