OpenClonk
C4AulWarnings.h
Go to the documentation of this file.
1 /*
2 * OpenClonk, http://www.openclonk.org
3 *
4 * Copyright (c) 2017-2018, The OpenClonk Team and contributors
5 *
6 * Distributed under the terms of the ISC license; see accompanying file
7 * "COPYING" for details.
8 *
9 * "Clonk" is a registered trademark of Matthes Bender, used with permission.
10 * See accompanying file "TRADEMARK" for details.
11 *
12 * To redistribute this file separately, substitute the full license texts
13 * for the above references.
14 */
15 
16 // C4Aul diagnostics definitions
17 
18 #pragma push_macro("DIAG")
19 #ifndef DIAG
20 #define DIAG(id, text, enabled_by_default)
21 #endif
22 
23 // Lexer diagnostics
24 DIAG(invalid_escape_sequence, "unknown escape sequence '\\%c'", true)
25 DIAG(invalid_hex_escape, "'\\x' used with no following hex digits", true)
26 
27 // Parser diagnostics
28 DIAG(type_name_used_as_par_name, "type '%s' used as parameter name", false)
29 DIAG(empty_parameter_in_call, "parameter %u of call to '%s' is empty", false)
30 DIAG(empty_parameter_in_array, "array entry %u is empty", false)
31 
32 // Compiler diagnostics
33 DIAG(implicit_range_loop_var_decl, "implicit declaration of the loop variable '%s' in a for-in loop is deprecated", true)
34 DIAG(non_global_var_is_never_const, "variable '%s' declared as const, but non-global variables are always mutable", true)
35 DIAG(variable_shadows_variable, "declaration of %s '%s' shadows %s", true)
36 DIAG(variable_out_of_scope, "variable '%s' used outside of its declared scope", true)
37 DIAG(redeclaration, "redeclaration of %s '%s'", true)
38 DIAG(undeclared_varargs, "use of '%s' in a function forces it to take variable arguments", true)
39 DIAG(arg_count_mismatch, "call to '%s' passes %u arguments, of which only %u are used", true)
40 DIAG(arg_type_mismatch, "parameter %u of call to '%s' passes %s (%s expected)", true)
41 DIAG(empty_if, "empty controlled statement (use '{}' if this is intentional)", true)
42 DIAG(suspicious_assignment, "suspicious assignment (was a comparison intended here?)", true)
43 
44 #pragma pop_macro("DIAG")
#define DIAG(id, text, enabled_by_default)
Definition: C4AulWarnings.h:20
#define s
#define a