[C++ Patch] PR 51223
Paolo Carlini
paolo.carlini@oracle.com
Tue Jan 24 00:06:00 GMT 2012
Hi,
another diagnostic regression, a little subtler than the last one.
In this case, besides the final ICE (which was already there in 4.5), we
also have a regression vs 4.6 in the error messages produced before it,
that is, we have (see PR):
bug.cc:3:18: error: 'i' has incomplete type
bug.cc:3:19: error: invalid use of 'void'
bug.cc: In function 'void bar()':
bug.cc:8:11: error: call to 'A A::foo(<type error>)' uses the default argument
for parameter 1, which is not yet defined
bug.cc: At global scope:
bug.cc:11:15: error: 'i' has incomplete type
bug.cc:11:16: error: invalid use of 'void'
bug.cc: In function 'void bar()':
bug.cc:8:11: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in useless_type_conversion_p, at tree-ssa.c:1460
Please submit a full bug report, [etc.]
which become, after the patch (note the confusing errors for line 8):
bug.cc:3:18: error: ‘i’ has incomplete type
bug.cc:3:18: error: invalid use of ‘void’
bug.cc:11:15: error: ‘i’ has incomplete type
bug.cc:11:16: error: invalid use of ‘void’
I checked that the error messages produced by Icc are quite similar, but
2 single errors are produced instead of 2 pairs, saying that a parameter
cannot have void type (if we wanted, it would be easy to do something
similar by replacing the cxx_incomplete_type_error call in grokparms
with just an error + couple of tweaks to the testsuite)
Tested x86_64-linux.
Paolo.
/////////////////////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_51223
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120124/03c900fc/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_51223
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120124/03c900fc/attachment-0001.ksh>
More information about the Gcc-patches
mailing list