diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2013-11-26 11:31:46 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2013-11-26 11:31:46 +0000 |
commit | 8d590b9cb389dc759d48974e61740e96d61a2605 (patch) | |
tree | 13e164da63cd1da14692d15373780596a810b033 /gcc/cp | |
parent | 160051af93a8625f5dd09de6b0b923a824901d79 (diff) | |
download | gcc-8d590b9cb389dc759d48974e61740e96d61a2605.zip gcc-8d590b9cb389dc759d48974e61740e96d61a2605.tar.gz gcc-8d590b9cb389dc759d48974e61740e96d61a2605.tar.bz2 |
re PR c++/58700 (ICE declaring static bit-field)
/cp
2013-11-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58700
* decl.c (grokdeclarator): Don't try to pass declarator->id_loc
to build_lang_decl_loc when declarator is null.
/testsuite
2013-11-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58700
* g++.dg/parse/bitfield4.C: New.
From-SVN: r205389
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/decl.c | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 143885c..604f26d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,11 @@ 2013-11-26 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/58700 + * decl.c (grokdeclarator): Don't try to pass declarator->id_loc + to build_lang_decl_loc when declarator is null. + +2013-11-26 Paolo Carlini <paolo.carlini@oracle.com> + * cvt.c (cp_convert_and_check): Avoid calling cp_convert unnecessarily. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index bf4d8e3..9508131 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -10637,7 +10637,9 @@ grokdeclarator (const cp_declarator *declarator, { /* C++ allows static class members. All other work for this is done by grokfield. */ - decl = build_lang_decl_loc (declarator->id_loc, + decl = build_lang_decl_loc (declarator + ? declarator->id_loc + : input_location, VAR_DECL, unqualified_id, type); set_linkage_for_static_data_member (decl); /* Even if there is an in-class initialization, DECL |