------- Comment #4 from redi at gcc dot gnu dot org 2009-08-13 10:31 ------- (In reply to comment #1) > It cannot be as it is only undefined behavior and the C++ (and C standard by > the way) says that > undefined behavior cannot be an error only a warning.
I don't know about C, but C++ says: "permissible undefined behavior ranges from ignoring the situation completely with unpredictable results, to behaving during translation or program execution in a documented manner characteristic of the environment (with or without the issuance of a diagnostic message), to terminating a translation or execution (with the issuance of a diagnostic message)." [defns.undefined] So it is permissible to terminate translation and issue a diagnostic. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19291