[cfe-dev] EXTENSION for some diags

Neil Booth neil at daikokuya.co.uk
Sat Aug 25 21:49:31 PDT 2007


Make some diags EXTENSION so they are errors with pedantic errors.

Downside is that non-pedantic compiles are silent.

We really need a slightly different diagnostic policy.

Neil.
-------------- next part --------------
Index: include/clang/Basic/DiagnosticKinds.def
===================================================================
--- include/clang/Basic/DiagnosticKinds.def	(revision 41420)
+++ include/clang/Basic/DiagnosticKinds.def	(working copy)
@@ -731,11 +731,11 @@
      "empty case range specified")
 DIAG(err_typecheck_return_incompatible, ERROR,
      "incompatible type returning '%1', expected '%0'")
-DIAG(ext_typecheck_return_pointer_int, WARNING,
+DIAG(ext_typecheck_return_pointer_int, EXTENSION,
      "incompatible type returning '%1', expected '%0'")
-DIAG(ext_typecheck_return_incompatible_pointer, WARNING,
+DIAG(ext_typecheck_return_incompatible_pointer, EXTENSION,
      "incompatible pointer type returning '%1', expected '%0'")
-DIAG(ext_typecheck_return_discards_qualifiers, WARNING,
+DIAG(ext_typecheck_return_discards_qualifiers, EXTENSION,
      "returning '%1' from function expecting '%0' discards qualifiers")
 DIAG(err_typecheck_statement_requires_scalar, ERROR,
      "statement requires expression of scalar type ('%0' invalid)")


More information about the cfe-dev mailing list