This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
The problem here is that declare_local_label does not take the type of the decl would/could be error_mark_node. So we return zero right away for this case. So we don't error out extra for variables which were not declared. OK for the mainline and 4.0 branch? Bootstrapped and tested on x86_64-pc-linux-gnu with no regressions. Thanks, Andrew Pinski ChangeLog: * decl.c (declare_local_label): Return 0 for variables with error_mark_node as their types. testsuite/ChangeLog: * g++.dg/init/switch1.C: New test.
Attachment:
fixPR24582.diff.txt
Description: ASCII C program text
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |