diff options
| author | Lee Millward <lee.millward@gmail.com> | 2006-06-25 11:28:01 +0000 |
|---|---|---|
| committer | Lee Millward <lmillward@gcc.gnu.org> | 2006-06-25 11:28:01 +0000 |
| commit | 344f237baff9bb9348473bafa10bf19ad6ac3577 (patch) | |
| tree | 36738e80a4e5cf19ac4932278cedb6521d275f8e /gcc/cp/decl.c | |
| parent | 0fdc23b94d00f5c541a71456b0704534f4731ddc (diff) | |
| download | gcc-344f237baff9bb9348473bafa10bf19ad6ac3577.zip gcc-344f237baff9bb9348473bafa10bf19ad6ac3577.tar.gz gcc-344f237baff9bb9348473bafa10bf19ad6ac3577.tar.bz2 | |
re PR c++/28054 (ICE with friend declaration of invalid bitfield)
PR c++/28054
* decl2.c (grokbitfield): Remove check for grokdeclarator
returning NULL_TREE, instead check for error_mark_node
to indicate failure.
* decl.c (grokdeclarator): Adjust block comment.
* g++.dg/other/incomplete3.C: New test.
Co-Authored-By: Mark Mitchell <mark@codesourcery.com>
From-SVN: r114986
Diffstat (limited to 'gcc/cp/decl.c')
| -rw-r--r-- | gcc/cp/decl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index e3c9297..5a630f5 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -6812,7 +6812,11 @@ check_var_type (tree identifier, tree type) void S::f() { ... } when grokdeclarator is called for `S::f', the CURRENT_CLASS_TYPE - should not be `S'. */ + should not be `S'. + + Returns a DECL (if a declarator is present), a TYPE (if there is no + declarator, in cases like "struct S;"), or the ERROR_MARK_NODE if an + error occurs. */ tree grokdeclarator (const cp_declarator *declarator, |
