[Bug c++/52718] -Wzero-as-null-pointer-constant: misleading location for 0 as default argument
paolo.carlini at oracle dot com
gcc-bugzilla@gcc.gnu.org
Thu Nov 1 01:28:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52718
--- Comment #11 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-11-01 01:28:26 UTC ---
I can't reproduce in mainline and 4_7-branch. This is what I tried:
a.h:
#pragma GCC system_header
void* fun(void* a = 0);
a.C:
#include "a.h"
int main()
{
fun();
}
if I compile a.C I get no warnings at all (I get warnings with the pragma
commented out, as expected, and in the right place, line #3 of a.h). Likewise,
everything is fine if inside a.h, a boo calls fun(). Do you have a better
testcase?
More information about the Gcc-bugs
mailing list