mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-14 05:30:25 +08:00
re PR c++/84636 (internal compiler error: Segmentation fault (identifier_p()/grokdeclarator()))
/cp 2018-12-04 Paolo Carlini <paolo.carlini@oracle.com> PR c++/84636 * decl.c (grokdeclarator): Avoid crashing on an anonymous bit-field with function type. /testsuite 2018-12-04 Paolo Carlini <paolo.carlini@oracle.com> PR c++/84636 * g++.dg/parse/bitfield6.C: New. From-SVN: r266807
This commit is contained in:
parent
6c620b0744
commit
586add7f93
@ -1,3 +1,9 @@
|
||||
2018-12-04 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/84636
|
||||
* decl.c (grokdeclarator): Avoid crashing on an anonymous bit-field
|
||||
with function type.
|
||||
|
||||
2018-12-04 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c++/88184 - ICE when treating name as template-name.
|
||||
|
@ -12187,7 +12187,8 @@ grokdeclarator (const cp_declarator *declarator,
|
||||
}
|
||||
|
||||
if (ctype && TREE_CODE (type) == FUNCTION_TYPE && staticp < 2
|
||||
&& !(identifier_p (unqualified_id)
|
||||
&& !(unqualified_id
|
||||
&& identifier_p (unqualified_id)
|
||||
&& IDENTIFIER_NEWDEL_OP_P (unqualified_id)))
|
||||
{
|
||||
cp_cv_quals real_quals = memfn_quals;
|
||||
@ -12267,8 +12268,7 @@ grokdeclarator (const cp_declarator *declarator,
|
||||
error ("invalid use of %<::%>");
|
||||
return error_mark_node;
|
||||
}
|
||||
else if (TREE_CODE (type) == FUNCTION_TYPE
|
||||
|| TREE_CODE (type) == METHOD_TYPE)
|
||||
else if (FUNC_OR_METHOD_TYPE_P (type) && unqualified_id)
|
||||
{
|
||||
int publicp = 0;
|
||||
tree function_context;
|
||||
|
@ -1,3 +1,8 @@
|
||||
2018-12-04 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/84636
|
||||
* g++.dg/parse/bitfield6.C: New.
|
||||
|
||||
2018-12-04 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/87320
|
||||
|
6
gcc/testsuite/g++.dg/parse/bitfield6.C
Normal file
6
gcc/testsuite/g++.dg/parse/bitfield6.C
Normal file
@ -0,0 +1,6 @@
|
||||
// PR c++/84636
|
||||
|
||||
typedef void a();
|
||||
struct A {
|
||||
a: 1; // { dg-error "bit-field .\\<anonymous\\>. with non-integral type" }
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user