diff options
author | Mark Mitchell <mark@codesourcery.com> | 2001-01-08 01:58:54 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2001-01-08 01:58:54 +0000 |
commit | 0c58da3ed06415bce7a2cc636b9c8343237c8736 (patch) | |
tree | d36ca4f64fca2eb5b935f93b00bee0d54e6ba253 /gcc/cp/decl2.c | |
parent | b1095f9cec18563c97fb5106b30019cff71a86bd (diff) | |
download | gcc-0c58da3ed06415bce7a2cc636b9c8343237c8736.zip gcc-0c58da3ed06415bce7a2cc636b9c8343237c8736.tar.gz gcc-0c58da3ed06415bce7a2cc636b9c8343237c8736.tar.bz2 |
decl2.c (grokfield): Don't accept `asm' specifiers for non-static data members.
* decl2.c (grokfield): Don't accept `asm' specifiers for
non-static data members.
From-SVN: r38792
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r-- | gcc/cp/decl2.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index bac8a6d..a8269c2 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -1794,15 +1794,10 @@ grokfield (declarator, declspecs, init, asmspec_tree, attrlist) if (TREE_CODE (value) == FIELD_DECL) { if (asmspec) - { - /* This must override the asm specifier which was placed - by grokclassfn. Lay this out fresh. */ - DECL_RTL (value) = NULL_RTX; - DECL_ASSEMBLER_NAME (value) = get_identifier (asmspec); - } + cp_error ("`asm' specifiers are not permitted on non-static data members"); if (DECL_INITIAL (value) == error_mark_node) init = error_mark_node; - cp_finish_decl (value, init, asmspec_tree, flags); + cp_finish_decl (value, init, NULL_TREE, flags); DECL_INITIAL (value) = init; DECL_IN_AGGR_P (value) = 1; return value; |