I just tried to compile the following C++ code with the GNU C++ compiler version 4.4 snapshot 20090102.
extern int f(); void g() { f + 27; // should fail } The compiler said bug50.cc: In function 'void g()': bug50.cc:9: warning: pointer to a function used in arithmetic Here is gcc 4.3.2 on the same code - this is closer to the language definition bug50.cc: In function 'void g()': bug50.cc:9: error: pointer to a function used in arithmetic I suspect that the warning in 20090102 needs to be upgraded into a warning. -- Summary: upgrade warning to error for bad C++ code ? Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dcb314 at hotmail dot com GCC host triplet: x86_64-suse-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38780