re PR c++/69795 (g++ ICE on invalid code on x86_64-linux-gnu in "reject_gcc_builtin")
PR c++/69795 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than any DECL. * g++.dg/parse/invalid1.C: New test. From-SVN: r233855
This commit is contained in:
parent
db340c730f
commit
1be56bc542
@ -1,3 +1,9 @@
|
||||
2016-03-01 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c++/69795
|
||||
* c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
|
||||
any DECL.
|
||||
|
||||
2016-02-22 Martin Sebor <msebor@redhat.com>
|
||||
|
||||
PR middle-end/69780
|
||||
|
@ -12638,7 +12638,7 @@ reject_gcc_builtin (const_tree expr, location_t loc /* = UNKNOWN_LOCATION */)
|
||||
|
||||
if (TREE_TYPE (expr)
|
||||
&& TREE_CODE (TREE_TYPE (expr)) == FUNCTION_TYPE
|
||||
&& DECL_P (expr)
|
||||
&& TREE_CODE (expr) == FUNCTION_DECL
|
||||
/* The intersection of DECL_BUILT_IN and DECL_IS_BUILTIN avoids
|
||||
false positives for user-declared built-ins such as abs or
|
||||
strlen, and for C++ operators new and delete.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2016-03-01 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c++/69795
|
||||
* g++.dg/parse/invalid1.C: New test.
|
||||
|
||||
2016-03-01 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR middle-end/70022
|
||||
|
5
gcc/testsuite/g++.dg/parse/invalid1.C
Normal file
5
gcc/testsuite/g++.dg/parse/invalid1.C
Normal file
@ -0,0 +1,5 @@
|
||||
// PR c++/69795
|
||||
// { dg-do compile { target c++11 } }
|
||||
// { dg-options "-w" }
|
||||
|
||||
int foo ( foo += *[ // { dg-error "" }
|
Loading…
Reference in New Issue
Block a user