18 #pragma push_macro("DIAG")
20 #define DIAG(id, text, enabled_by_default)
24 DIAG(invalid_escape_sequence,
"unknown escape sequence '\\%c'",
true)
25 DIAG(invalid_hex_escape, "'\\x' used with no following hex digits", true)
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)
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)
44 #pragma pop_macro("DIAG")
#define DIAG(id, text, enabled_by_default)