diff options
author | Joseph Myers <jsm@polyomino.org.uk> | 2004-09-09 02:25:48 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2004-09-09 02:25:48 +0100 |
commit | deb176fa3bb3d05c3fba4f1dc36735853bc18804 (patch) | |
tree | 9281b8a84cb7f58197f54b2a640390953626fb55 /gcc | |
parent | f8893e4723c8ce3462bfd1298afde78e5327c260 (diff) | |
download | gcc-deb176fa3bb3d05c3fba4f1dc36735853bc18804.zip gcc-deb176fa3bb3d05c3fba4f1dc36735853bc18804.tar.gz gcc-deb176fa3bb3d05c3fba4f1dc36735853bc18804.tar.bz2 |
re PR c/8420 (volatile after the type specifier for an unnamed structure is rejected)
PR c/8420
* c-tree.h (struct c_declspecs): New.
(struct c_declarator, struct c_type_name, struct c_parm): Update
element types.
(build_array_declarator, grokfield, shadow_tag, shadow_tag_warned,
start_function, start_decl, build_c_parm,
make_pointer_declarator): Update prototypes.
(build_null_declspecs, declspecs_add_qual, declspecs_add_type,
declspecs_add_scspec, declspecs_add_attrs): New.
(split_specs_attrs): Remove.
* c-parse.in (%union): Add dsptype.
(declspecs_nosc_nots_nosa_noea, declspecs_nosc_nots_nosa_ea,
declspecs_nosc_nots_sa_noea, declspecs_nosc_nots_sa_ea,
declspecs_nosc_ts_nosa_noea, declspecs_nosc_ts_nosa_ea,
declspecs_nosc_ts_sa_noea, declspecs_nosc_ts_sa_ea,
declspecs_sc_nots_nosa_noea, declspecs_sc_nots_nosa_ea,
declspecs_sc_nots_sa_noea, declspecs_sc_nots_sa_ea,
declspecs_sc_ts_nosa_noea, declspecs_sc_ts_nosa_ea,
declspecs_sc_ts_sa_noea, declspecs_sc_ts_sa_ea, declspecs_ts,
declspecs_nots, declspecs_ts_nosa, declspecs_nots_nosa,
declspecs_nosc_ts, declspecs_nosc_nots, declspecs_nosc, declspecs,
maybe_type_quals_attrs): Change to dsptype.
(struct c_declspec_stack): New.
(current_declspecs, declspec_stack): Change type.
(PUSH_DECLSPEC_STACK, POP_DECLSPEC_STACK): Update to new
structures.
(extdefs): Likewise.
(setspecs): Likewise.
(fndef): Use current_declspecs for empty declspecs list.
(declspecs_nosc_nots_nosa_noea, declspecs_nosc_nots_nosa_ea,
declspecs_nosc_nots_sa_noea, declspecs_nosc_nots_sa_ea,
declspecs_nosc_ts_nosa_noea, declspecs_nosc_ts_nosa_ea,
declspecs_nosc_ts_sa_noea, declspecs_nosc_ts_sa_ea,
declspecs_sc_nots_nosa_noea, declspecs_sc_nots_nosa_ea,
declspecs_sc_nots_sa_noea, declspecs_sc_nots_sa_ea,
declspecs_sc_ts_nosa_noea, declspecs_sc_ts_nosa_ea,
declspecs_sc_ts_sa_noea, declspecs_sc_ts_sa_ea): Update to new
structures and helper functions. Update comments.
(typespec_nonattr): Correct comment.
(maybe_type_quals_attrs, typename): Update to new structures.
* c-decl.c (grokdeclarator, build_array_declarator, grokfield,
shadow_tag, shadow_tag_warned, start_function, start_decl,
build_c_parm, make_pointer_declarator,
set_array_declarator_inner, groktypename): Update to new
structures.
(build_null_declspecs, declspecs_add_qual, declspecs_add_type,
declspecs_add_scspec, declspecs_add_attrs): New.
(split_specs_attrs): Remove.
(shadow_tag_warned): Make warning for useless type names a
pedwarn. Give hard error for long, short, signed, unsigned or
_Complex used with struct, union or enum in empty declaration.
Make found_tag a bool.
(grokdeclarator): Remove checks now done at parse time.
testsuite:
* gcc.dg/anon-struct-4.c, gcc.dg/declspec-1.c,
gcc.dg/declspec-2.c, gcc.dg/declspec-3.c, gcc.dg/declspec-4.c,
gcc.dg/declspec-5.c, gcc.dg/declspec-6.c,
gcc.dg/long-long-typespec-1.c: New tests.
* gcc.dg/tls/diag-2.c: Update expected diagnostics
From-SVN: r87218
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 56 | ||||
-rw-r--r-- | gcc/c-decl.c | 591 | ||||
-rw-r--r-- | gcc/c-parse.in | 390 | ||||
-rw-r--r-- | gcc/c-tree.h | 65 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/anon-struct-4.c | 10 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/declspec-1.c | 27 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/declspec-2.c | 14 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/declspec-3.c | 34 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/declspec-4.c | 41 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/declspec-5.c | 41 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/declspec-6.c | 41 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/long-long-typespec-1.c | 828 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tls/diag-2.c | 8 |
14 files changed, 1561 insertions, 594 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dd214e7..0c7706c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,61 @@ 2004-09-09 Joseph S. Myers <jsm@polyomino.org.uk> + PR c/8420 + * c-tree.h (struct c_declspecs): New. + (struct c_declarator, struct c_type_name, struct c_parm): Update + element types. + (build_array_declarator, grokfield, shadow_tag, shadow_tag_warned, + start_function, start_decl, build_c_parm, + make_pointer_declarator): Update prototypes. + (build_null_declspecs, declspecs_add_qual, declspecs_add_type, + declspecs_add_scspec, declspecs_add_attrs): New. + (split_specs_attrs): Remove. + * c-parse.in (%union): Add dsptype. + (declspecs_nosc_nots_nosa_noea, declspecs_nosc_nots_nosa_ea, + declspecs_nosc_nots_sa_noea, declspecs_nosc_nots_sa_ea, + declspecs_nosc_ts_nosa_noea, declspecs_nosc_ts_nosa_ea, + declspecs_nosc_ts_sa_noea, declspecs_nosc_ts_sa_ea, + declspecs_sc_nots_nosa_noea, declspecs_sc_nots_nosa_ea, + declspecs_sc_nots_sa_noea, declspecs_sc_nots_sa_ea, + declspecs_sc_ts_nosa_noea, declspecs_sc_ts_nosa_ea, + declspecs_sc_ts_sa_noea, declspecs_sc_ts_sa_ea, declspecs_ts, + declspecs_nots, declspecs_ts_nosa, declspecs_nots_nosa, + declspecs_nosc_ts, declspecs_nosc_nots, declspecs_nosc, declspecs, + maybe_type_quals_attrs): Change to dsptype. + (struct c_declspec_stack): New. + (current_declspecs, declspec_stack): Change type. + (PUSH_DECLSPEC_STACK, POP_DECLSPEC_STACK): Update to new + structures. + (extdefs): Likewise. + (setspecs): Likewise. + (fndef): Use current_declspecs for empty declspecs list. + (declspecs_nosc_nots_nosa_noea, declspecs_nosc_nots_nosa_ea, + declspecs_nosc_nots_sa_noea, declspecs_nosc_nots_sa_ea, + declspecs_nosc_ts_nosa_noea, declspecs_nosc_ts_nosa_ea, + declspecs_nosc_ts_sa_noea, declspecs_nosc_ts_sa_ea, + declspecs_sc_nots_nosa_noea, declspecs_sc_nots_nosa_ea, + declspecs_sc_nots_sa_noea, declspecs_sc_nots_sa_ea, + declspecs_sc_ts_nosa_noea, declspecs_sc_ts_nosa_ea, + declspecs_sc_ts_sa_noea, declspecs_sc_ts_sa_ea): Update to new + structures and helper functions. Update comments. + (typespec_nonattr): Correct comment. + (maybe_type_quals_attrs, typename): Update to new structures. + * c-decl.c (grokdeclarator, build_array_declarator, grokfield, + shadow_tag, shadow_tag_warned, start_function, start_decl, + build_c_parm, make_pointer_declarator, + set_array_declarator_inner, groktypename): Update to new + structures. + (build_null_declspecs, declspecs_add_qual, declspecs_add_type, + declspecs_add_scspec, declspecs_add_attrs): New. + (split_specs_attrs): Remove. + (shadow_tag_warned): Make warning for useless type names a + pedwarn. Give hard error for long, short, signed, unsigned or + _Complex used with struct, union or enum in empty declaration. + Make found_tag a bool. + (grokdeclarator): Remove checks now done at parse time. + +2004-09-09 Joseph S. Myers <jsm@polyomino.org.uk> + * c-tree.h (enum c_declarator_kind, struct c_arg_info, struct c_declarator, struct c_type_name, struct c_parm): New. (build_array_declarator, set_array_declarator_inner, diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 2f03344..12e27a0 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -398,7 +398,8 @@ static GTY(()) tree static_dtors; /* Forward declarations. */ static tree lookup_name_in_scope (tree, struct c_scope *); static tree c_make_fname_decl (tree, int); -static tree grokdeclarator (const struct c_declarator *, tree, +static tree grokdeclarator (const struct c_declarator *, + struct c_declspecs *, enum decl_context, bool, tree *); static tree grokparms (struct c_arg_info *, bool); static void layout_array_type (tree); @@ -2666,7 +2667,7 @@ builtin_function (const char *name, tree type, int function_code, Otherwise, it is an error. */ void -shadow_tag (tree declspecs) +shadow_tag (const struct c_declspecs *declspecs) { shadow_tag_warned (declspecs, 0); } @@ -2674,21 +2675,15 @@ shadow_tag (tree declspecs) /* WARNED is 1 if we have done a pedwarn, 2 if we have done a warning, but no pedwarn. */ void -shadow_tag_warned (tree declspecs, int warned) +shadow_tag_warned (const struct c_declspecs *declspecs, int warned) { - int found_tag = 0; - tree link; - tree specs, attrs; + bool found_tag = false; pending_invalid_xref = 0; - /* Remove the attributes from declspecs, since they will confuse the - following code. */ - split_specs_attrs (declspecs, &specs, &attrs); - - for (link = specs; link; link = TREE_CHAIN (link)) + if (declspecs->type && !declspecs->typedef_decl) { - tree value = TREE_VALUE (link); + tree value = declspecs->type; enum tree_code code = TREE_CODE (value); if (code == RECORD_TYPE || code == UNION_TYPE || code == ENUMERAL_TYPE) @@ -2698,7 +2693,7 @@ shadow_tag_warned (tree declspecs, int warned) tree name = TYPE_NAME (value); tree t; - found_tag++; + found_tag = true; if (name == 0) { @@ -2722,20 +2717,39 @@ shadow_tag_warned (tree declspecs, int warned) } else { - if (!warned && ! in_system_header) + if (warned != 1 && !in_system_header) { - warning ("useless keyword or type name in empty declaration"); - warned = 2; + pedwarn ("useless type name in empty declaration"); + warned = 1; } } } + else if (warned != 1 && !in_system_header && declspecs->typedef_decl) + { + pedwarn ("useless type name in empty declaration"); + warned = 1; + } + + if (found_tag && (declspecs->specbits & ((1 << (int) RID_LONG) + | (1 << (int) RID_SHORT) + | (1 << (int) RID_UNSIGNED) + | (1 << (int) RID_SIGNED) + | (1 << (int) RID_COMPLEX)))) + { + error ("long, short, signed, unsigned or complex used invalidly " + "in empty declaration"); + warned = 1; + } - if (found_tag > 1) - error ("two types specified in one empty declaration"); + if (!warned && !in_system_header && declspecs->specbits) + { + warning ("useless keyword or type name in empty declaration"); + warned = 2; + } if (warned != 1) { - if (found_tag == 0) + if (!found_tag) pedwarn ("empty declaration"); } } @@ -2750,7 +2764,7 @@ shadow_tag_warned (tree declspecs, int warned) filled in by set_array_declarator_inner. */ struct c_declarator * -build_array_declarator (tree expr, tree quals, bool static_p, +build_array_declarator (tree expr, struct c_declspecs *quals, bool static_p, bool vla_unspec_p) { struct c_declarator *declarator = XOBNEW (&parser_obstack, @@ -2763,7 +2777,7 @@ build_array_declarator (tree expr, tree quals, bool static_p, declarator->u.array.vla_unspec_p = vla_unspec_p; if (pedantic && !flag_isoc99) { - if (static_p || quals != NULL_TREE) + if (static_p || quals != NULL) pedwarn ("ISO C90 does not support `static' or type qualifiers in parameter array declarators"); if (vla_unspec_p) pedwarn ("ISO C90 does not support `[*]' array declarators"); @@ -2785,103 +2799,24 @@ set_array_declarator_inner (struct c_declarator *decl, struct c_declarator *inner, bool abstract_p) { decl->declarator = inner; - if (abstract_p && (decl->u.array.quals != NULL_TREE + if (abstract_p && (decl->u.array.quals != NULL || decl->u.array.static_p)) error ("static or type qualifiers in abstract declarator"); return decl; } -/* Split SPECS_ATTRS, a list of declspecs and prefix attributes, into two - lists. SPECS_ATTRS may also be just a typespec (eg: RECORD_TYPE). - - The head of the declspec list is stored in DECLSPECS. - The head of the attribute list is stored in PREFIX_ATTRIBUTES. - - Note that attributes in SPECS_ATTRS are stored in the TREE_PURPOSE of - the list elements. We drop the containing TREE_LIST nodes and link the - resulting attributes together the way decl_attributes expects them. */ - -void -split_specs_attrs (tree specs_attrs, tree *declspecs, tree *prefix_attributes) -{ - tree t, s, a, next, specs, attrs; - - /* This can happen after an __extension__ in pedantic mode. */ - if (specs_attrs != NULL_TREE - && TREE_CODE (specs_attrs) == INTEGER_CST) - { - *declspecs = NULL_TREE; - *prefix_attributes = NULL_TREE; - return; - } - - /* This can happen in c++ (eg: decl: typespec initdecls ';'). */ - if (specs_attrs != NULL_TREE - && TREE_CODE (specs_attrs) != TREE_LIST) - { - *declspecs = specs_attrs; - *prefix_attributes = NULL_TREE; - return; - } - - /* Remember to keep the lists in the same order, element-wise. */ - - specs = s = NULL_TREE; - attrs = a = NULL_TREE; - for (t = specs_attrs; t; t = next) - { - next = TREE_CHAIN (t); - /* Declspecs have a non-NULL TREE_VALUE. */ - if (TREE_VALUE (t) != NULL_TREE) - { - if (specs == NULL_TREE) - specs = s = t; - else - { - TREE_CHAIN (s) = t; - s = t; - } - } - /* The TREE_PURPOSE may also be empty in the case of - __attribute__(()). */ - else if (TREE_PURPOSE (t) != NULL_TREE) - { - if (attrs == NULL_TREE) - attrs = a = TREE_PURPOSE (t); - else - { - TREE_CHAIN (a) = TREE_PURPOSE (t); - a = TREE_PURPOSE (t); - } - /* More attrs can be linked here, move A to the end. */ - while (TREE_CHAIN (a) != NULL_TREE) - a = TREE_CHAIN (a); - } - } - - /* Terminate the lists. */ - if (s != NULL_TREE) - TREE_CHAIN (s) = NULL_TREE; - if (a != NULL_TREE) - TREE_CHAIN (a) = NULL_TREE; - - /* All done. */ - *declspecs = specs; - *prefix_attributes = attrs; -} - /* Decode a "typename", such as "int **", returning a ..._TYPE node. */ tree groktypename (struct c_type_name *type_name) { tree type; - tree specs, attrs; + tree attrs = type_name->specs->attrs; - split_specs_attrs (type_name->specs, &specs, &attrs); + type_name->specs->attrs = NULL_TREE; - type = grokdeclarator (type_name->declarator, specs, TYPENAME, false, - NULL); + type = grokdeclarator (type_name->declarator, type_name->specs, TYPENAME, + false, NULL); /* Apply attributes. */ decl_attributes (&type, attrs, 0); @@ -2905,7 +2840,7 @@ groktypename (struct c_type_name *type_name) grokfield and not through here. */ tree -start_decl (struct c_declarator *declarator, tree declspecs, +start_decl (struct c_declarator *declarator, struct c_declspecs *declspecs, bool initialized, tree attributes) { tree decl; @@ -3632,8 +3567,7 @@ check_bitfield_type_and_width (tree *type, tree *width, const char *orig_name) (In one case we can return a ..._TYPE node instead. For invalid input we sometimes return 0.) - DECLSPECS is a chain of tree_list nodes whose value fields - are the storage classes and type specifiers. + DECLSPECS is a c_declspecs structure for the declaration specifiers. DECL_CONTEXT says which syntactic context this declaration is in: NORMAL for most contexts. Make a VAR_DECL or FUNCTION_DECL or TYPE_DECL. @@ -3657,29 +3591,25 @@ check_bitfield_type_and_width (tree *type, tree *width, const char *orig_name) and `extern' are interpreted. */ static tree -grokdeclarator (const struct c_declarator *declarator, tree declspecs, +grokdeclarator (const struct c_declarator *declarator, + struct c_declspecs *declspecs, enum decl_context decl_context, bool initialized, tree *width) { - int specbits = 0; - tree spec; - tree type = NULL_TREE; - int longlong = 0; + int specbits = declspecs->specbits; + tree type = declspecs->type; int constp; int restrictp; int volatilep; int type_quals = TYPE_UNQUALIFIED; int inlinep; - int explicit_int = 0; - int explicit_char = 0; int defaulted_int = 0; - tree typedef_decl = 0; const char *name, *orig_name; tree typedef_type = 0; int funcdef_flag = 0; bool funcdef_syntax = false; int size_varies = 0; tree decl_attr = NULL_TREE; - tree array_ptr_quals = NULL_TREE; + struct c_declspecs *array_ptr_quals = 0; int array_parm_static = 0; tree returned_attrs = NULL_TREE; bool bitfield = width != NULL; @@ -3735,116 +3665,10 @@ grokdeclarator (const struct c_declarator *declarator, tree declspecs, if (decl_context == NORMAL && !funcdef_flag && current_scope->parm_flag) decl_context = PARM; - /* Look through the decl specs and record which ones appear. - Some typespecs are defined as built-in typenames. - Others, the ones that are modifiers of other types, - are represented by bits in SPECBITS: set the bits for - the modifiers that appear. Storage class keywords are also in SPECBITS. - - If there is a typedef name or a type, store the type in TYPE. - This includes builtin typedefs such as `int'. - - Set EXPLICIT_INT or EXPLICIT_CHAR if the type is `int' or `char' - and did not come from a user typedef. - - Set LONGLONG if `long' is mentioned twice. */ - - for (spec = declspecs; spec; spec = TREE_CHAIN (spec)) - { - tree id = TREE_VALUE (spec); - - /* If the entire declaration is itself tagged as deprecated then - suppress reports of deprecated items. */ - if (id && TREE_DEPRECATED (id)) - { - if (deprecated_state != DEPRECATED_SUPPRESS) - warn_deprecated_use (id); - } - - if (id == ridpointers[(int) RID_INT]) - explicit_int = 1; - if (id == ridpointers[(int) RID_CHAR]) - explicit_char = 1; - - if (TREE_CODE (id) == IDENTIFIER_NODE && C_IS_RESERVED_WORD (id)) - { - enum rid i = C_RID_CODE (id); - if ((int) i <= (int) RID_LAST_MODIFIER) - { - if (i == RID_LONG && (specbits & (1 << (int) RID_LONG))) - { - if (longlong) - error ("`long long long' is too long for GCC"); - else - { - if (pedantic && !flag_isoc99 && ! in_system_header - && warn_long_long) - pedwarn ("ISO C90 does not support `long long'"); - longlong = 1; - } - } - else if (specbits & (1 << (int) i)) - { - if (i == RID_CONST || i == RID_VOLATILE || i == RID_RESTRICT) - { - if (pedantic && !flag_isoc99) - pedwarn ("duplicate `%s'", IDENTIFIER_POINTER (id)); - } - else - error ("duplicate `%s'", IDENTIFIER_POINTER (id)); - } - - /* Diagnose "__thread extern". Recall that this list - is in the reverse order seen in the text. */ - if (i == RID_THREAD - && (specbits & (1 << (int) RID_EXTERN - | 1 << (int) RID_STATIC))) - { - if (specbits & 1 << (int) RID_EXTERN) - error ("`__thread' before `extern'"); - else - error ("`__thread' before `static'"); - } - - specbits |= 1 << (int) i; - goto found; - } - } - if (type) - error ("two or more data types in declaration of `%s'", name); - /* Actual typedefs come to us as TYPE_DECL nodes. */ - else if (TREE_CODE (id) == TYPE_DECL) - { - if (TREE_TYPE (id) == error_mark_node) - ; /* Allow the type to default to int to avoid cascading errors. */ - else - { - type = TREE_TYPE (id); - decl_attr = DECL_ATTRIBUTES (id); - typedef_decl = id; - } - } - /* Built-in types come as identifiers. */ - else if (TREE_CODE (id) == IDENTIFIER_NODE) - { - tree t = lookup_name (id); - if (!t || TREE_CODE (t) != TYPE_DECL) - error ("`%s' fails to be a typedef or built in type", - IDENTIFIER_POINTER (id)); - else if (TREE_TYPE (t) == error_mark_node) - ; - else - { - type = TREE_TYPE (t); - typedef_decl = t; - } - } - else if (TREE_CODE (id) != ERROR_MARK) - type = id; - - found: - ; - } + if (declspecs->deprecated_p && deprecated_state != DEPRECATED_SUPPRESS) + warn_deprecated_use (declspecs->typedef_decl + ? declspecs->typedef_decl + : declspecs->type); typedef_type = type; if (type) @@ -3883,7 +3707,7 @@ grokdeclarator (const struct c_declarator *declarator, tree declspecs, /* Long double is a special combination. */ - if ((specbits & 1 << (int) RID_LONG) && ! longlong + if ((specbits & 1 << (int) RID_LONG) && ! declspecs->long_long_p && TYPE_MAIN_VARIANT (type) == double_type_node) { specbits &= ~(1 << (int) RID_LONG); @@ -3902,7 +3726,7 @@ grokdeclarator (const struct c_declarator *declarator, tree declspecs, error ("both long and short specified for `%s'", name); else if (((specbits & 1 << (int) RID_LONG) || (specbits & 1 << (int) RID_SHORT)) - && explicit_char) + && declspecs->explicit_char_p) error ("long or short specified with char for `%s'", name); else if (((specbits & 1 << (int) RID_LONG) || (specbits & 1 << (int) RID_SHORT)) @@ -3925,7 +3749,8 @@ grokdeclarator (const struct c_declarator *declarator, tree declspecs, else { ok = 1; - if (!explicit_int && !defaulted_int && !explicit_char) + if (!declspecs->explicit_int_p && !defaulted_int + && !declspecs->explicit_char_p) { error ("long, short, signed or unsigned used invalidly for `%s'", name); @@ -3938,7 +3763,7 @@ grokdeclarator (const struct c_declarator *declarator, tree declspecs, { specbits &= ~((1 << (int) RID_LONG) | (1 << (int) RID_SHORT) | (1 << (int) RID_UNSIGNED) | (1 << (int) RID_SIGNED)); - longlong = 0; + declspecs->long_long_p = 0; } } @@ -3953,15 +3778,16 @@ grokdeclarator (const struct c_declarator *declarator, tree declspecs, Optionally treat bit-fields as signed by default. */ if (specbits & 1 << (int) RID_UNSIGNED || (bitfield && ! flag_signed_bitfields - && (explicit_int || defaulted_int || explicit_char + && (declspecs->explicit_int_p || defaulted_int + || declspecs->explicit_char_p /* A typedef for plain `int' without `signed' can be controlled just like plain `int'. */ - || ! (typedef_decl != 0 - && C_TYPEDEF_EXPLICITLY_SIGNED (typedef_decl))) + || ! (declspecs->typedef_decl != 0 + && C_TYPEDEF_EXPLICITLY_SIGNED (declspecs->typedef_decl))) && TREE_CODE (type) != ENUMERAL_TYPE && !(specbits & 1 << (int) RID_SIGNED))) { - if (longlong) + if (declspecs->long_long_p) type = long_long_unsigned_type_node; else if (specbits & 1 << (int) RID_LONG) type = long_unsigned_type_node; @@ -3969,7 +3795,7 @@ grokdeclarator (const struct c_declarator *declarator, tree declspecs, type = short_unsigned_type_node; else if (type == char_type_node) type = unsigned_char_type_node; - else if (typedef_decl) + else if (declspecs->typedef_decl) type = c_common_unsigned_type (type); else type = unsigned_type_node; @@ -3977,7 +3803,7 @@ grokdeclarator (const struct c_declarator *declarator, tree declspecs, else if ((specbits & 1 << (int) RID_SIGNED) && type == char_type_node) type = signed_char_type_node; - else if (longlong) + else if (declspecs->long_long_p) type = long_long_integer_type_node; else if (specbits & 1 << (int) RID_LONG) type = long_integer_type_node; @@ -3993,7 +3819,7 @@ grokdeclarator (const struct c_declarator *declarator, tree declspecs, the complex form of TYPE. E.g, "complex short" is "complex short int". */ - if (defaulted_int && ! longlong + if (defaulted_int && ! declspecs->long_long_p && ! (specbits & ((1 << (int) RID_LONG) | (1 << (int) RID_SHORT) | (1 << (int) RID_SIGNED) | (1 << (int) RID_UNSIGNED)))) @@ -4180,13 +4006,13 @@ grokdeclarator (const struct c_declarator *declarator, tree declspecs, array or function or pointer, and DECLARATOR has had its outermost layer removed. */ - if (array_ptr_quals != NULL_TREE || array_parm_static) + if (array_ptr_quals != NULL || array_parm_static) { /* Only the innermost declarator (making a parameter be of array type which is converted to pointer type) may have static or type qualifiers. */ error ("static or type qualifiers in non-parameter array declarator"); - array_ptr_quals = NULL_TREE; + array_ptr_quals = NULL; array_parm_static = 0; } @@ -4372,10 +4198,10 @@ grokdeclarator (const struct c_declarator *declarator, tree declspecs, layout_type (type); if (decl_context != PARM - && (array_ptr_quals != NULL_TREE || array_parm_static)) + && (array_ptr_quals != NULL || array_parm_static)) { error ("static or type qualifiers in non-parameter array declarator"); - array_ptr_quals = NULL_TREE; + array_ptr_quals = NULL; array_parm_static = 0; } break; @@ -4469,53 +4295,27 @@ grokdeclarator (const struct c_declarator *declarator, tree declspecs, type = build_pointer_type (type); - /* Process a list of type modifier keywords (such as const - or volatile) that were given inside the `*'. */ + /* Process type qualifiers (such as const or volatile) + that were given inside the `*'. */ if (declarator->u.pointer_quals) { - tree typemodlist; - int erred = 0; - - constp = 0; - volatilep = 0; - restrictp = 0; - for (typemodlist = declarator->u.pointer_quals; typemodlist; - typemodlist = TREE_CHAIN (typemodlist)) - { - tree qualifier = TREE_VALUE (typemodlist); - - if (C_IS_RESERVED_WORD (qualifier)) - { - if (C_RID_CODE (qualifier) == RID_CONST) - constp++; - else if (C_RID_CODE (qualifier) == RID_VOLATILE) - volatilep++; - else if (C_RID_CODE (qualifier) == RID_RESTRICT) - restrictp++; - else - erred++; - } - else - erred++; - } - - if (erred) - error ("invalid type modifier within pointer declarator"); - if (pedantic && !flag_isoc99) - { - if (constp > 1) - pedwarn ("duplicate `const'"); - if (volatilep > 1) - pedwarn ("duplicate `volatile'"); - if (restrictp > 1) - pedwarn ("duplicate `restrict'"); - } - + int pbits = declarator->u.pointer_quals->specbits; + + /* The grammar should only permit qualifiers here. */ + gcc_assert (!declarator->u.pointer_quals->type + && !(pbits & ~((1 << (int) RID_CONST) + | (1 << (int) RID_VOLATILE) + | (1 << (int) RID_RESTRICT)))); + + constp = !!(pbits & (1 << (int) RID_CONST)); + volatilep = !!(pbits & (1 << (int) RID_VOLATILE)); + restrictp = !!(pbits & (1 << (int) RID_RESTRICT)); + type_quals = ((constp ? TYPE_QUAL_CONST : 0) | (restrictp ? TYPE_QUAL_RESTRICT : 0) | (volatilep ? TYPE_QUAL_VOLATILE : 0)); } - + declarator = declarator->declarator; break; } @@ -4552,7 +4352,8 @@ grokdeclarator (const struct c_declarator *declarator, tree declspecs, type = c_build_qualified_type (type, type_quals); decl = build_decl (TYPE_DECL, declarator->u.id, type); if ((specbits & (1 << (int) RID_SIGNED)) - || (typedef_decl && C_TYPEDEF_EXPLICITLY_SIGNED (typedef_decl))) + || (declspecs->typedef_decl + && C_TYPEDEF_EXPLICITLY_SIGNED (declspecs->typedef_decl))) C_TYPEDEF_EXPLICITLY_SIGNED (decl) = 1; decl_attributes (&decl, returned_attrs, 0); return decl; @@ -4630,37 +4431,21 @@ grokdeclarator (const struct c_declarator *declarator, tree declspecs, type_quals = TYPE_UNQUALIFIED; if (array_ptr_quals) { - tree new_ptr_quals, new_ptr_attrs; - int erred = 0; - split_specs_attrs (array_ptr_quals, &new_ptr_quals, &new_ptr_attrs); + int apqbits = array_ptr_quals->specbits; + /* We don't yet implement attributes in this context. */ - if (new_ptr_attrs != NULL_TREE) + if (array_ptr_quals->attrs != NULL_TREE) warning ("attributes in parameter array declarator ignored"); - constp = 0; - volatilep = 0; - restrictp = 0; - for (; new_ptr_quals; new_ptr_quals = TREE_CHAIN (new_ptr_quals)) - { - tree qualifier = TREE_VALUE (new_ptr_quals); - - if (C_IS_RESERVED_WORD (qualifier)) - { - if (C_RID_CODE (qualifier) == RID_CONST) - constp++; - else if (C_RID_CODE (qualifier) == RID_VOLATILE) - volatilep++; - else if (C_RID_CODE (qualifier) == RID_RESTRICT) - restrictp++; - else - erred++; - } - else - erred++; - } + /* The grammar should only permit qualifiers here. */ + gcc_assert (!array_ptr_quals->type + && !(apqbits & ~((1 << (int) RID_CONST) + | (1 << (int) RID_VOLATILE) + | (1 << (int) RID_RESTRICT)))); - if (erred) - error ("invalid type modifier within array declarator"); + constp = !!(apqbits & (1 << (int) RID_CONST)); + volatilep = !!(apqbits & (1 << (int) RID_VOLATILE)); + restrictp = !!(apqbits & (1 << (int) RID_RESTRICT)); type_quals = ((constp ? TYPE_QUAL_CONST : 0) | (restrictp ? TYPE_QUAL_RESTRICT : 0) @@ -5282,7 +5067,8 @@ start_struct (enum tree_code code, tree name) are ultimately passed to `build_struct' to make the RECORD_TYPE node. */ tree -grokfield (struct c_declarator *declarator, tree declspecs, tree width) +grokfield (struct c_declarator *declarator, struct c_declspecs *declspecs, + tree width) { tree value; @@ -5308,11 +5094,12 @@ grokfield (struct c_declarator *declarator, tree declspecs, tree width) took this from Plan 9 or if it was an accident of implementation that took root before someone noticed the bug... */ - tree type = TREE_VALUE (declspecs); + tree type = declspecs->type; - if (flag_ms_extensions && TREE_CODE (type) == TYPE_DECL) - type = TREE_TYPE (type); - if (TREE_CODE (type) == RECORD_TYPE || TREE_CODE (type) == UNION_TYPE) + if (type + && (TREE_CODE (type) == RECORD_TYPE + || TREE_CODE (type) == UNION_TYPE) + && (flag_ms_extensions || !declspecs->typedef_decl)) { if (flag_ms_extensions) ; /* ok */ @@ -5916,7 +5703,7 @@ build_enumerator (tree name, tree value) yyparse to report a parse error. */ int -start_function (tree declspecs, struct c_declarator *declarator, +start_function (struct c_declspecs *declspecs, struct c_declarator *declarator, tree attributes) { tree decl1, old_decl; @@ -6857,7 +6644,8 @@ build_void_list_node (void) /* Return a c_parm structure with the given SPECS, ATTRS and DECLARATOR. */ struct c_parm * -build_c_parm (tree specs, tree attrs, struct c_declarator *declarator) +build_c_parm (struct c_declspecs *specs, tree attrs, + struct c_declarator *declarator) { struct c_parm *ret = XOBNEW (&parser_obstack, struct c_parm); ret->specs = specs; @@ -6909,25 +6697,174 @@ build_id_declarator (tree ident) /* Return something to represent absolute declarators containing a *. TARGET is the absolute declarator that the * contains. - TYPE_QUALS_ATTRS is a list of modifiers such as const or volatile - to apply to the pointer type, represented as identifiers, possible mixed - with attributes. */ + TYPE_QUALS_ATTRS is a structure for type qualifiers and attributes + to apply to the pointer type. */ struct c_declarator * -make_pointer_declarator (tree type_quals_attrs, struct c_declarator *target) +make_pointer_declarator (struct c_declspecs *type_quals_attrs, + struct c_declarator *target) { - tree quals, attrs; + tree attrs; struct c_declarator *itarget = target; struct c_declarator *ret = XOBNEW (&parser_obstack, struct c_declarator); - split_specs_attrs (type_quals_attrs, &quals, &attrs); - if (attrs != NULL_TREE) - itarget = build_attrs_declarator (attrs, target); + if (type_quals_attrs) + { + attrs = type_quals_attrs->attrs; + type_quals_attrs->attrs = NULL_TREE; + if (attrs != NULL_TREE) + itarget = build_attrs_declarator (attrs, target); + } ret->kind = cdk_pointer; ret->declarator = itarget; - ret->u.pointer_quals = quals; + ret->u.pointer_quals = type_quals_attrs; + return ret; +} + +/* Return a pointer to a structure for an empty list of declaration + specifiers. */ + +struct c_declspecs * +build_null_declspecs (void) +{ + struct c_declspecs *ret = XOBNEW (&parser_obstack, struct c_declspecs); + ret->type = 0; + ret->typedef_decl = 0; + ret->decl_attr = 0; + ret->attrs = 0; + ret->specbits = 0; + ret->non_sc_seen_p = false; + ret->deprecated_p = false; + ret->explicit_int_p = false; + ret->explicit_char_p = false; + ret->long_long_p = false; return ret; } +/* Add the type qualifier QUAL to the declaration specifiers SPECS, + returning SPECS. */ + +struct c_declspecs * +declspecs_add_qual (struct c_declspecs *specs, tree qual) +{ + enum rid i; + specs->non_sc_seen_p = true; + gcc_assert (TREE_CODE (qual) == IDENTIFIER_NODE + && C_IS_RESERVED_WORD (qual)); + i = C_RID_CODE (qual); + gcc_assert (i == RID_CONST || i == RID_VOLATILE || i == RID_RESTRICT); + if ((specs->specbits & (1 << (int) i)) && pedantic && !flag_isoc99) + pedwarn ("duplicate %qs", IDENTIFIER_POINTER (qual)); + specs->specbits |= 1 << (int) i; + return specs; +} + +/* Add the type specifier TYPE to the declaration specifiers SPECS, + returning SPECS. */ + +struct c_declspecs * +declspecs_add_type (struct c_declspecs *specs, tree type) +{ + specs->non_sc_seen_p = true; + if (TREE_DEPRECATED (type)) + specs->deprecated_p = true; + if (type == ridpointers[(int) RID_INT]) + specs->explicit_int_p = true; + if (type == ridpointers[(int) RID_CHAR]) + specs->explicit_char_p = true; + + if (TREE_CODE (type) == IDENTIFIER_NODE && C_IS_RESERVED_WORD (type)) + { + enum rid i = C_RID_CODE (type); + if ((int) i <= (int) RID_LAST_MODIFIER) + { + if (i == RID_LONG && (specs->specbits & (1 << (int) RID_LONG))) + { + if (specs->long_long_p) + error ("%<long long long%> is too long for GCC"); + else + { + if (pedantic && !flag_isoc99 && !in_system_header + && warn_long_long) + pedwarn ("ISO C90 does not support %<long long%>"); + specs->long_long_p = 1; + } + } + else if (specs->specbits & (1 << (int) i)) + error ("duplicate %qs", IDENTIFIER_POINTER (type)); + + specs->specbits |= 1 << (int) i; + return specs; + } + } + if (specs->type) + error ("two or more data types in declaration specifiers"); + /* Actual typedefs come to us as TYPE_DECL nodes. */ + else if (TREE_CODE (type) == TYPE_DECL) + { + if (TREE_TYPE (type) == error_mark_node) + ; /* Allow the type to default to int to avoid cascading errors. */ + else + { + specs->type = TREE_TYPE (type); + specs->decl_attr = DECL_ATTRIBUTES (type); + specs->typedef_decl = type; + } + } + /* Built-in types come as identifiers. */ + else if (TREE_CODE (type) == IDENTIFIER_NODE) + { + tree t = lookup_name (type); + if (!t || TREE_CODE (t) != TYPE_DECL) + error ("%qs fails to be a typedef or built in type", + IDENTIFIER_POINTER (type)); + else if (TREE_TYPE (t) == error_mark_node) + ; + else + specs->type = TREE_TYPE (t); + } + else if (TREE_CODE (type) != ERROR_MARK) + specs->type = type; + + return specs; +} + +/* Add the storage class specifier or function specifier SCSPEC to the + declaration specifiers SPECS, returning SPECS. */ + +struct c_declspecs * +declspecs_add_scspec (struct c_declspecs *specs, tree scspec) +{ + enum rid i; + gcc_assert (TREE_CODE (scspec) == IDENTIFIER_NODE + && C_IS_RESERVED_WORD (scspec)); + i = C_RID_CODE (scspec); + if (extra_warnings && specs->non_sc_seen_p) + warning ("%qs is not at beginning of declaration", + IDENTIFIER_POINTER (scspec)); + if (specs->specbits & (1 << (int) i)) + error ("duplicate %qs", IDENTIFIER_POINTER (scspec)); + /* Diagnose "__thread extern" and "__thread static". */ + if (specs->specbits & (1 << (int) RID_THREAD)) + { + if (i == RID_EXTERN) + error ("%<__thread%> before %<extern%>"); + else if (i == RID_STATIC) + error ("%<__thread%> before %<static%>"); + } + specs->specbits |= 1 << (int) i; + return specs; +} + +/* Add the attributes ATTRS to the declaration specifiers SPECS, + returning SPECS. */ + +struct c_declspecs * +declspecs_add_attrs (struct c_declspecs *specs, tree attrs) +{ + specs->attrs = chainon (attrs, specs->attrs); + return specs; +} + /* Synthesize a function which calls all the global ctors or global dtors in this file. This is only used for targets which do not support .ctors/.dtors sections. FIXME: Migrate into cgraph. */ diff --git a/gcc/c-parse.in b/gcc/c-parse.in index 9a0b4d2..ed0e3e1 100644 --- a/gcc/c-parse.in +++ b/gcc/c-parse.in @@ -102,7 +102,8 @@ do { \ %union {long itype; tree ttype; void *otype; struct c_expr exprtype; struct c_arg_info *arginfotype; struct c_declarator *dtrtype; struct c_type_name *typenametype; struct c_parm *parmtype; - enum tree_code code; location_t location; } + struct c_declspecs *dsptype; enum tree_code code; + location_t location; } /* All identifiers that are not reserved words and are not declared typedefs in the current block */ @@ -190,18 +191,19 @@ do { \ %type <ttype> identifier IDENTIFIER TYPENAME CONSTANT STRING FUNC_NAME %type <ttype> nonnull_exprlist exprlist %type <exprtype> expr expr_no_commas cast_expr unary_expr primary -%type <ttype> declspecs_nosc_nots_nosa_noea declspecs_nosc_nots_nosa_ea -%type <ttype> declspecs_nosc_nots_sa_noea declspecs_nosc_nots_sa_ea -%type <ttype> declspecs_nosc_ts_nosa_noea declspecs_nosc_ts_nosa_ea -%type <ttype> declspecs_nosc_ts_sa_noea declspecs_nosc_ts_sa_ea -%type <ttype> declspecs_sc_nots_nosa_noea declspecs_sc_nots_nosa_ea -%type <ttype> declspecs_sc_nots_sa_noea declspecs_sc_nots_sa_ea -%type <ttype> declspecs_sc_ts_nosa_noea declspecs_sc_ts_nosa_ea -%type <ttype> declspecs_sc_ts_sa_noea declspecs_sc_ts_sa_ea -%type <ttype> declspecs_ts declspecs_nots -%type <ttype> declspecs_ts_nosa declspecs_nots_nosa -%type <ttype> declspecs_nosc_ts declspecs_nosc_nots declspecs_nosc declspecs -%type <ttype> maybe_type_quals_attrs typespec_nonattr typespec_attr +%type <dsptype> declspecs_nosc_nots_nosa_noea declspecs_nosc_nots_nosa_ea +%type <dsptype> declspecs_nosc_nots_sa_noea declspecs_nosc_nots_sa_ea +%type <dsptype> declspecs_nosc_ts_nosa_noea declspecs_nosc_ts_nosa_ea +%type <dsptype> declspecs_nosc_ts_sa_noea declspecs_nosc_ts_sa_ea +%type <dsptype> declspecs_sc_nots_nosa_noea declspecs_sc_nots_nosa_ea +%type <dsptype> declspecs_sc_nots_sa_noea declspecs_sc_nots_sa_ea +%type <dsptype> declspecs_sc_ts_nosa_noea declspecs_sc_ts_nosa_ea +%type <dsptype> declspecs_sc_ts_sa_noea declspecs_sc_ts_sa_ea +%type <dsptype> declspecs_ts declspecs_nots +%type <dsptype> declspecs_ts_nosa declspecs_nots_nosa +%type <dsptype> declspecs_nosc_ts declspecs_nosc_nots declspecs_nosc declspecs +%type <dsptype> maybe_type_quals_attrs +%type <ttype> typespec_nonattr typespec_attr %type <ttype> typespec_reserved_nonattr typespec_reserved_attr %type <ttype> typespec_nonreserved_nonattr %type <ttype> offsetof_member_designator @@ -266,8 +268,8 @@ do { \ @@end_ifobjc %{ -/* List of types and structure classes of the current declaration. */ -static GTY(()) tree current_declspecs; +/* Declaration specifiers of the current declaration. */ +static struct c_declspecs *current_declspecs; static GTY(()) tree prefix_attributes; /* List of all the attributes applying to the identifier currently being @@ -275,29 +277,44 @@ static GTY(()) tree prefix_attributes; just after a comma. */ static GTY(()) tree all_prefix_attributes; +/* Structure to save declaration specifiers. */ +struct c_declspec_stack { + /* Saved value of current_declspecs. */ + struct c_declspecs *current_declspecs; + /* Saved value of prefix_attributes. */ + tree prefix_attributes; + /* Saved value of all_prefix_attributes. */ + tree all_prefix_attributes; + /* Next level of stack. */ + struct c_declspec_stack *next; +}; + /* Stack of saved values of current_declspecs, prefix_attributes and all_prefix_attributes. */ -static GTY(()) tree declspec_stack; +static struct c_declspec_stack *declspec_stack; /* INDIRECT_REF with a TREE_TYPE of the type being queried for offsetof. */ static tree offsetof_base; /* PUSH_DECLSPEC_STACK is called from setspecs; POP_DECLSPEC_STACK should be called from the productions making use of setspecs. */ -#define PUSH_DECLSPEC_STACK \ - do { \ - declspec_stack = tree_cons (build_tree_list (prefix_attributes, \ - all_prefix_attributes), \ - current_declspecs, \ - declspec_stack); \ +#define PUSH_DECLSPEC_STACK \ + do { \ + struct c_declspec_stack *t = XOBNEW (&parser_obstack, \ + struct c_declspec_stack); \ + t->current_declspecs = current_declspecs; \ + t->prefix_attributes = prefix_attributes; \ + t->all_prefix_attributes = all_prefix_attributes; \ + t->next = declspec_stack; \ + declspec_stack = t; \ } while (0) #define POP_DECLSPEC_STACK \ do { \ - current_declspecs = TREE_VALUE (declspec_stack); \ - prefix_attributes = TREE_PURPOSE (TREE_PURPOSE (declspec_stack)); \ - all_prefix_attributes = TREE_VALUE (TREE_PURPOSE (declspec_stack)); \ - declspec_stack = TREE_CHAIN (declspec_stack); \ + current_declspecs = declspec_stack->current_declspecs; \ + prefix_attributes = declspec_stack->prefix_attributes; \ + all_prefix_attributes = declspec_stack->all_prefix_attributes; \ + declspec_stack = declspec_stack->next; \ } while (0) /* For __extension__, save/restore the warning flags which are @@ -363,13 +380,13 @@ program: /* empty */ /* the reason for the strange actions in this rule is so that notype_initdecls when reached via datadef - can find a valid list of type and sc specs in $0. */ + can find valid declaration specifiers in $0. */ extdefs: - save_obstack_position { $<ttype>$ = NULL_TREE; } extdef + save_obstack_position { $<dsptype>$ = NULL; } extdef { obstack_free (&parser_obstack, $1); } | extdefs save_obstack_position - { $<ttype>$ = NULL_TREE; ggc_collect(); } extdef + { $<dsptype>$ = NULL; ggc_collect(); } extdef { obstack_free (&parser_obstack, $2); } ; @@ -439,7 +456,7 @@ fndef: | declspecs_nots setspecs notype_declarator error { POP_DECLSPEC_STACK; } | setspecs notype_declarator - { if (! start_function (NULL_TREE, $2, + { if (! start_function (current_declspecs, $2, all_prefix_attributes)) YYERROR1; } @@ -840,8 +857,17 @@ lineno_decl: setspecs: /* empty */ { pending_xref_error (); PUSH_DECLSPEC_STACK; - split_specs_attrs ($<ttype>0, - ¤t_declspecs, &prefix_attributes); + if ($<dsptype>0) + { + prefix_attributes = $<dsptype>0->attrs; + $<dsptype>0->attrs = NULL_TREE; + current_declspecs = $<dsptype>0; + } + else + { + prefix_attributes = NULL_TREE; + current_declspecs = build_null_declspecs (); + } all_prefix_attributes = prefix_attributes; } ; @@ -878,16 +904,6 @@ decl: - Attribute specifier lists (attributes). - These are stored as a TREE_LIST; the head of the list is the last - item in the specifier list. Each entry in the list has either a - TREE_PURPOSE that is an attribute specifier list, or a TREE_VALUE that - is a single other specifier or qualifier; and a TREE_CHAIN that is the - rest of the list. TREE_STATIC is set on the list if something other - than a storage class specifier or attribute has been seen; this is used - to warn for the obsolescent usage of storage class specifiers other than - at the start of the list. (Doing this properly would require function - specifiers to be handled separately from storage class specifiers.) - The various cases below are classified according to: (a) Whether a storage class specifier is included or not; some @@ -916,334 +932,208 @@ decl: /* Declspecs which contain at least one type specifier or typedef name. (Just `const' or `volatile' is not enough.) - A typedef'd name following these is taken as a name to be declared. - Declspecs have a non-NULL TREE_VALUE, attributes do not. */ + A typedef'd name following these is taken as a name to be declared. */ declspecs_nosc_nots_nosa_noea: TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_qual (build_null_declspecs (), $1); } | declspecs_nosc_nots_nosa_noea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_qual ($1, $2); } | declspecs_nosc_nots_nosa_ea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_qual ($1, $2); } ; declspecs_nosc_nots_nosa_ea: declspecs_nosc_nots_nosa_noea attributes - { $$ = tree_cons ($2, NULL_TREE, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } + { $$ = declspecs_add_attrs ($1, $2); } ; declspecs_nosc_nots_sa_noea: declspecs_nosc_nots_sa_noea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_qual ($1, $2); } | declspecs_nosc_nots_sa_ea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_qual ($1, $2); } ; declspecs_nosc_nots_sa_ea: attributes - { $$ = tree_cons ($1, NULL_TREE, NULL_TREE); - TREE_STATIC ($$) = 0; } + { $$ = declspecs_add_attrs (build_null_declspecs (), $1); } | declspecs_nosc_nots_sa_noea attributes - { $$ = tree_cons ($2, NULL_TREE, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } + { $$ = declspecs_add_attrs ($1, $2); } ; declspecs_nosc_ts_nosa_noea: typespec_nonattr - { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type (build_null_declspecs (), $1); } | declspecs_nosc_ts_nosa_noea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_qual ($1, $2); } | declspecs_nosc_ts_nosa_ea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_qual ($1, $2); } | declspecs_nosc_ts_nosa_noea typespec_reserved_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_ts_nosa_ea typespec_reserved_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_nots_nosa_noea typespec_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_nots_nosa_ea typespec_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } ; declspecs_nosc_ts_nosa_ea: typespec_attr - { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type (build_null_declspecs (), $1); } | declspecs_nosc_ts_nosa_noea attributes - { $$ = tree_cons ($2, NULL_TREE, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } + { $$ = declspecs_add_attrs ($1, $2); } | declspecs_nosc_ts_nosa_noea typespec_reserved_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_ts_nosa_ea typespec_reserved_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_nots_nosa_noea typespec_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_nots_nosa_ea typespec_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } ; declspecs_nosc_ts_sa_noea: declspecs_nosc_ts_sa_noea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_qual ($1, $2); } | declspecs_nosc_ts_sa_ea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_qual ($1, $2); } | declspecs_nosc_ts_sa_noea typespec_reserved_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_ts_sa_ea typespec_reserved_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_nots_sa_noea typespec_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_nots_sa_ea typespec_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } ; declspecs_nosc_ts_sa_ea: declspecs_nosc_ts_sa_noea attributes - { $$ = tree_cons ($2, NULL_TREE, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } + { $$ = declspecs_add_attrs ($1, $2); } | declspecs_nosc_ts_sa_noea typespec_reserved_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_ts_sa_ea typespec_reserved_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_nots_sa_noea typespec_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_nots_sa_ea typespec_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } ; declspecs_sc_nots_nosa_noea: scspec - { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); - TREE_STATIC ($$) = 0; } + { $$ = declspecs_add_scspec (build_null_declspecs (), $1); } | declspecs_sc_nots_nosa_noea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_qual ($1, $2); } | declspecs_sc_nots_nosa_ea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_qual ($1, $2); } | declspecs_nosc_nots_nosa_noea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } + { $$ = declspecs_add_scspec ($1, $2); } | declspecs_nosc_nots_nosa_ea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } + { $$ = declspecs_add_scspec ($1, $2); } | declspecs_sc_nots_nosa_noea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } + { $$ = declspecs_add_scspec ($1, $2); } | declspecs_sc_nots_nosa_ea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } + { $$ = declspecs_add_scspec ($1, $2); } ; declspecs_sc_nots_nosa_ea: declspecs_sc_nots_nosa_noea attributes - { $$ = tree_cons ($2, NULL_TREE, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } + { $$ = declspecs_add_attrs ($1, $2); } ; declspecs_sc_nots_sa_noea: declspecs_sc_nots_sa_noea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_qual ($1, $2); } | declspecs_sc_nots_sa_ea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_qual ($1, $2); } | declspecs_nosc_nots_sa_noea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } + { $$ = declspecs_add_scspec ($1, $2); } | declspecs_nosc_nots_sa_ea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } + { $$ = declspecs_add_scspec ($1, $2); } | declspecs_sc_nots_sa_noea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } + { $$ = declspecs_add_scspec ($1, $2); } | declspecs_sc_nots_sa_ea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } + { $$ = declspecs_add_scspec ($1, $2); } ; declspecs_sc_nots_sa_ea: declspecs_sc_nots_sa_noea attributes - { $$ = tree_cons ($2, NULL_TREE, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } + { $$ = declspecs_add_attrs ($1, $2); } ; declspecs_sc_ts_nosa_noea: declspecs_sc_ts_nosa_noea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_qual ($1, $2); } | declspecs_sc_ts_nosa_ea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_qual ($1, $2); } | declspecs_sc_ts_nosa_noea typespec_reserved_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_sc_ts_nosa_ea typespec_reserved_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_sc_nots_nosa_noea typespec_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_sc_nots_nosa_ea typespec_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_ts_nosa_noea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } + { $$ = declspecs_add_scspec ($1, $2); } | declspecs_nosc_ts_nosa_ea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } + { $$ = declspecs_add_scspec ($1, $2); } | declspecs_sc_ts_nosa_noea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } + { $$ = declspecs_add_scspec ($1, $2); } | declspecs_sc_ts_nosa_ea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } + { $$ = declspecs_add_scspec ($1, $2); } ; declspecs_sc_ts_nosa_ea: declspecs_sc_ts_nosa_noea attributes - { $$ = tree_cons ($2, NULL_TREE, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } + { $$ = declspecs_add_attrs ($1, $2); } | declspecs_sc_ts_nosa_noea typespec_reserved_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_sc_ts_nosa_ea typespec_reserved_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_sc_nots_nosa_noea typespec_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_sc_nots_nosa_ea typespec_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } ; declspecs_sc_ts_sa_noea: declspecs_sc_ts_sa_noea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_qual ($1, $2); } | declspecs_sc_ts_sa_ea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_qual ($1, $2); } | declspecs_sc_ts_sa_noea typespec_reserved_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_sc_ts_sa_ea typespec_reserved_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_sc_nots_sa_noea typespec_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_sc_nots_sa_ea typespec_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_nosc_ts_sa_noea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } + { $$ = declspecs_add_scspec ($1, $2); } | declspecs_nosc_ts_sa_ea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } + { $$ = declspecs_add_scspec ($1, $2); } | declspecs_sc_ts_sa_noea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } + { $$ = declspecs_add_scspec ($1, $2); } | declspecs_sc_ts_sa_ea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } + { $$ = declspecs_add_scspec ($1, $2); } ; declspecs_sc_ts_sa_ea: declspecs_sc_ts_sa_noea attributes - { $$ = tree_cons ($2, NULL_TREE, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } + { $$ = declspecs_add_attrs ($1, $2); } | declspecs_sc_ts_sa_noea typespec_reserved_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_sc_ts_sa_ea typespec_reserved_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_sc_nots_sa_noea typespec_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } | declspecs_sc_nots_sa_ea typespec_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } + { $$ = declspecs_add_type ($1, $2); } ; /* Particular useful classes of declspecs. */ @@ -1330,7 +1220,7 @@ declspecs: /* A (possibly empty) sequence of type qualifiers and attributes. */ maybe_type_quals_attrs: /* empty */ - { $$ = NULL_TREE; } + { $$ = NULL; } | declspecs_nosc_nots { $$ = $1; } ; @@ -1354,7 +1244,7 @@ maybe_type_quals_attrs: or are such that any following attributes would be parsed as part of the specifier. - _nonattr: specifiers. */ + _nonattr: other specifiers not ending with attributes. */ typespec_nonattr: typespec_reserved_nonattr @@ -1933,10 +1823,10 @@ enumerator: typename: declspecs_nosc { pending_xref_error (); - $<ttype>$ = $1; } + $<dsptype>$ = $1; } absdcl { $$ = XOBNEW (&parser_obstack, struct c_type_name); - $$->specs = $<ttype>2; + $$->specs = $<dsptype>2; $$->declarator = $3; } ; diff --git a/gcc/c-tree.h b/gcc/c-tree.h index 09f679e..3707551 100644 --- a/gcc/c-tree.h +++ b/gcc/c-tree.h @@ -131,6 +131,38 @@ struct c_expr enum tree_code original_code; }; +/* A sequence of declaration specifiers in C. */ +struct c_declspecs { + /* The type specified, not reflecting modifiers such as "short" and + "unsigned", or NULL_TREE if none. */ + tree type; + /* If the type was specified with a typedef, that typedef decl. */ + tree typedef_decl; + /* The attributes from a typedef decl. */ + tree decl_attr; + /* When parsing, the attributes. Outside the parser, this will be + NULL; attributes (possibly from multiple lists) will be passed + separately. */ + tree attrs; + /* The modifier bits present. */ + int specbits; + /* Whether something other than a storage class specifier or + attribute has been seen. This is used to warn for the + obsolescent usage of storage class specifiers other than at the + start of the list. (Doing this properly would require function + specifiers to be handled separately from storage class + specifiers.) */ + BOOL_BITFIELD non_sc_seen_p : 1; + /* Whether the specifiers include a deprecated typedef. */ + BOOL_BITFIELD deprecated_p : 1; + /* Whether "int" was explicitly specified. */ + BOOL_BITFIELD explicit_int_p : 1; + /* Whether "char" was explicitly specified. */ + BOOL_BITFIELD explicit_char_p : 1; + /* Whether "long" was specified more than once. */ + BOOL_BITFIELD long_long_p : 1; +}; + /* The various kinds of declarators in C. */ enum c_declarator_kind { /* An identifier. */ @@ -175,14 +207,14 @@ struct c_declarator { /* The array dimension, or NULL for [] and [*]. */ tree dimen; /* The qualifiers (and attributes, currently ignored) inside []. */ - tree quals; + struct c_declspecs *quals; /* Whether [static] was used. */ BOOL_BITFIELD static_p : 1; /* Whether [*] was used. */ BOOL_BITFIELD vla_unspec_p : 1; } array; /* For pointers, the qualifiers on the pointer type. */ - tree pointer_quals; + struct c_declspecs *pointer_quals; /* For attributes. */ tree attrs; } u; @@ -191,7 +223,7 @@ struct c_declarator { /* A type name. */ struct c_type_name { /* The declaration specifiers. */ - tree specs; + struct c_declspecs *specs; /* The declarator. */ struct c_declarator *declarator; }; @@ -199,7 +231,7 @@ struct c_type_name { /* A parameter. */ struct c_parm { /* The declaration specifiers, minus any prefix attributes. */ - tree specs; + struct c_declspecs *specs; /* The attributes. */ tree attrs; /* The declarator. */ @@ -246,7 +278,8 @@ extern void c_expand_body (tree); extern void c_init_decl_processing (void); extern void c_dup_lang_specific_decl (tree); extern void c_print_identifier (FILE *, tree, int); -extern struct c_declarator *build_array_declarator (tree, tree, bool, bool); +extern struct c_declarator *build_array_declarator (tree, struct c_declspecs *, + bool, bool); extern tree build_enumerator (tree, tree); extern void check_for_loop_decls (void); extern void mark_forward_parm_decls (void); @@ -260,8 +293,7 @@ extern tree finish_enum (tree, tree, tree); extern void finish_function (void); extern tree finish_struct (tree, tree, tree); extern struct c_arg_info *get_parm_info (bool); -extern tree grokfield (struct c_declarator *, tree, tree); -extern void split_specs_attrs (tree, tree *, tree *); +extern tree grokfield (struct c_declarator *, struct c_declspecs *, tree); extern tree groktypename (struct c_type_name *); extern tree grokparm (const struct c_parm *); extern tree implicitly_declare (tree); @@ -277,24 +309,31 @@ extern struct c_declarator *set_array_declarator_inner (struct c_declarator *, bool); extern tree builtin_function (const char *, tree, int, enum built_in_class, const char *, tree); -extern void shadow_tag (tree); -extern void shadow_tag_warned (tree, int); +extern void shadow_tag (const struct c_declspecs *); +extern void shadow_tag_warned (const struct c_declspecs *, int); extern tree start_enum (tree); -extern int start_function (tree, struct c_declarator *, tree); -extern tree start_decl (struct c_declarator *, tree, bool, tree); +extern int start_function (struct c_declspecs *, struct c_declarator *, tree); +extern tree start_decl (struct c_declarator *, struct c_declspecs *, bool, + tree); extern tree start_struct (enum tree_code, tree); extern void store_parm_decls (void); extern void store_parm_decls_from (struct c_arg_info *); extern tree xref_tag (enum tree_code, tree); extern int c_expand_decl (tree); -extern struct c_parm *build_c_parm (tree, tree, struct c_declarator *); +extern struct c_parm *build_c_parm (struct c_declspecs *, tree, + struct c_declarator *); extern struct c_declarator *build_attrs_declarator (tree, struct c_declarator *); extern struct c_declarator *build_function_declarator (struct c_arg_info *, struct c_declarator *); extern struct c_declarator *build_id_declarator (tree); -extern struct c_declarator *make_pointer_declarator (tree, +extern struct c_declarator *make_pointer_declarator (struct c_declspecs *, struct c_declarator *); +extern struct c_declspecs *build_null_declspecs (void); +extern struct c_declspecs *declspecs_add_qual (struct c_declspecs *, tree); +extern struct c_declspecs *declspecs_add_type (struct c_declspecs *, tree); +extern struct c_declspecs *declspecs_add_scspec (struct c_declspecs *, tree); +extern struct c_declspecs *declspecs_add_attrs (struct c_declspecs *, tree); /* in c-objc-common.c */ extern int c_disregard_inline_limits (tree); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2a2a325..73a76d0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,14 @@ 2004-09-09 Joseph S. Myers <jsm@polyomino.org.uk> + PR c/8420 + * gcc.dg/anon-struct-4.c, gcc.dg/declspec-1.c, + gcc.dg/declspec-2.c, gcc.dg/declspec-3.c, gcc.dg/declspec-4.c, + gcc.dg/declspec-5.c, gcc.dg/declspec-6.c, + gcc.dg/long-long-typespec-1.c: New tests. + * gcc.dg/tls/diag-2.c: Update expected diagnostics + +2004-09-09 Joseph S. Myers <jsm@polyomino.org.uk> + * gcc.dg/c90-static-1.c, gcc.dg/c99-static-1.c, gcc.dg/gnu99-static-1.c: New tests. diff --git a/gcc/testsuite/gcc.dg/anon-struct-4.c b/gcc/testsuite/gcc.dg/anon-struct-4.c new file mode 100644 index 0000000..dc30b0c --- /dev/null +++ b/gcc/testsuite/gcc.dg/anon-struct-4.c @@ -0,0 +1,10 @@ +/* Test anonymous structures with type qualifiers. Bug 8420. */ +/* Origin: Joseph Myers <jsm@polyomino.org.uk> */ +/* { dg-do compile } */ +/* { dg-options "-std=gnu89" } */ + +struct s { + struct { int a; }; + const struct { int b; }; + struct { int c; } volatile; +}; diff --git a/gcc/testsuite/gcc.dg/declspec-1.c b/gcc/testsuite/gcc.dg/declspec-1.c new file mode 100644 index 0000000..c19f107 --- /dev/null +++ b/gcc/testsuite/gcc.dg/declspec-1.c @@ -0,0 +1,27 @@ +/* Test declaration specifiers. Test cases that used to be handled in + a loop in grokdeclarator. */ +/* Origin: Joseph Myers <jsm@polyomino.org.uk> */ +/* { dg-do compile } */ +/* { dg-options "-std=gnu89" } */ + +typedef int t; + +/* These should all be diagnosed, but only once, not for every + identifier declared. */ +struct s0 int x0, /* { dg-error "two or more data types" } */ +x1; + +char union u0 x2, /* { dg-error "two or more data types" } */ +x3; + +enum e0 struct s1 x4, /* { dg-error "two or more data types" } */ +x5; + +short short x6, /* { dg-error "duplicate" } */ +x7; + +t int x8, /* { dg-error "two or more data types" } */ +x9; + +long long long x10, /* { dg-error "long long long" } */ +x11; diff --git a/gcc/testsuite/gcc.dg/declspec-2.c b/gcc/testsuite/gcc.dg/declspec-2.c new file mode 100644 index 0000000..f2c535a --- /dev/null +++ b/gcc/testsuite/gcc.dg/declspec-2.c @@ -0,0 +1,14 @@ +/* Test declaration specifiers. Test cases that used to be handled in + a loop in grokdeclarator. Pedantic cases. */ +/* Origin: Joseph Myers <jsm@polyomino.org.uk> */ +/* { dg-do compile } */ +/* { dg-options "-std=gnu89 -pedantic" } */ + +/* These should all be diagnosed, but only once, not for every + identifier declared. */ + +const const int x0, /* { dg-warning "duplicate" } */ +x1; + +long long x2, /* { dg-warning "long long" } */ +x3; diff --git a/gcc/testsuite/gcc.dg/declspec-3.c b/gcc/testsuite/gcc.dg/declspec-3.c new file mode 100644 index 0000000..19b1fa2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/declspec-3.c @@ -0,0 +1,34 @@ +/* Test declaration specifiers. Test diagnosis of storage class + specifiers not at start. */ +/* Origin: Joseph Myers <jsm@polyomino.org.uk> */ +/* { dg-do compile } */ +/* { dg-options "-W" } */ + +static int x0; +int static x1; /* { dg-warning "not at beginning" } */ + +extern int x2; +int extern x3; /* { dg-warning "not at beginning" } */ + +typedef int x4; +int typedef x5; /* { dg-warning "not at beginning" } */ + +void g (int); + +void +f (void) +{ + auto int x6 = 0; + int auto x7 = 0; /* { dg-warning "not at beginning" } */ + register int x8 = 0; + int register x9 = 0; /* { dg-warning "not at beginning" } */ + g (x6 + x7 + x8 + x9); +} + +const static int x10; /* { dg-warning "not at beginning" } */ + +/* Attributes are OK before storage class specifiers, since some + attributes are like such specifiers themselves. */ + +__attribute__((format(printf, 1, 2))) static void h (const char *, ...); +__attribute__((format(printf, 1, 2))) void static i (const char *, ...); /* { dg-warning "not at beginning" } */ diff --git a/gcc/testsuite/gcc.dg/declspec-4.c b/gcc/testsuite/gcc.dg/declspec-4.c new file mode 100644 index 0000000..0610e05 --- /dev/null +++ b/gcc/testsuite/gcc.dg/declspec-4.c @@ -0,0 +1,41 @@ +/* Test declaration specifiers. Test empty declarations. Test with + no special options. */ +/* Origin: Joseph Myers <jsm@polyomino.org.uk> */ +/* { dg-do compile } */ +/* { dg-options "" } */ + +/* If a declaration does not declare a declarator, it must declare a + tag or the members of an enumeration, and must only contain one + type specifier. */ + +typedef int T; + +struct s0; +union u0; +enum e0; /* A GNU extension. */ +enum { E0 }; +enum e1 { E1 }; + +/* Not declaring anything (pedwarns). */ +struct { int a; }; /* { dg-warning "warning: unnamed struct/union that defines no instances" } */ +int; /* { dg-warning "warning: useless type name in empty declaration" } */ +long; /* { dg-warning "warning: useless keyword or type name in empty declaration" } */ +/* { dg-warning "warning: empty declaration" "long" { target *-*-* } 22 } */ +T; /* { dg-warning "warning: useless type name in empty declaration" } */ +static const; /* { dg-warning "warning: useless keyword or type name in empty declaration" } */ +/* { dg-warning "warning: empty declaration" "long" { target *-*-* } 25 } */ +union { long b; }; /* { dg-warning "warning: unnamed struct/union that defines no instances" } */ + +/* Multiple type names (errors). */ +struct s1 int; /* { dg-error "error: two or more data types in declaration specifiers" } */ +char union u1; /* { dg-error "error: two or more data types in declaration specifiers" } */ +/* { dg-warning "warning: useless type name in empty declaration" "char union" { target *-*-* } 31 } */ +double enum { E2 }; /* { dg-error "error: two or more data types in declaration specifiers" } */ +/* { dg-warning "warning: useless type name in empty declaration" "double enum" { target *-*-* } 33 } */ +T struct s2; /* { dg-error "error: two or more data types in declaration specifiers" } */ +/* { dg-warning "warning: useless type name in empty declaration" "T struct" { target *-*-* } 35 } */ +long union u2; /* { dg-error "error: long, short, signed, unsigned or complex used invalidly in empty declaration" } */ +struct s3 short; /* { dg-error "error: long, short, signed, unsigned or complex used invalidly in empty declaration" } */ +union u3 signed; /* { dg-error "error: long, short, signed, unsigned or complex used invalidly in empty declaration" } */ +unsigned struct s4; /* { dg-error "error: long, short, signed, unsigned or complex used invalidly in empty declaration" } */ +_Complex enum { E3 }; /* { dg-error "error: long, short, signed, unsigned or complex used invalidly in empty declaration" } */ diff --git a/gcc/testsuite/gcc.dg/declspec-5.c b/gcc/testsuite/gcc.dg/declspec-5.c new file mode 100644 index 0000000..aba2739 --- /dev/null +++ b/gcc/testsuite/gcc.dg/declspec-5.c @@ -0,0 +1,41 @@ +/* Test declaration specifiers. Test empty declarations. Test with + -pedantic. */ +/* Origin: Joseph Myers <jsm@polyomino.org.uk> */ +/* { dg-do compile } */ +/* { dg-options "-pedantic" } */ + +/* If a declaration does not declare a declarator, it must declare a + tag or the members of an enumeration, and must only contain one + type specifier. */ + +typedef int T; + +struct s0; +union u0; +enum e0; /* { dg-warning "warning: ISO C forbids forward references" } */ +enum { E0 }; +enum e1 { E1 }; + +/* Not declaring anything (pedwarns). */ +struct { int a; }; /* { dg-warning "warning: unnamed struct/union that defines no instances" } */ +int; /* { dg-warning "warning: useless type name in empty declaration" } */ +long; /* { dg-warning "warning: useless keyword or type name in empty declaration" } */ +/* { dg-warning "warning: empty declaration" "long" { target *-*-* } 22 } */ +T; /* { dg-warning "warning: useless type name in empty declaration" } */ +static const; /* { dg-warning "warning: useless keyword or type name in empty declaration" } */ +/* { dg-warning "warning: empty declaration" "long" { target *-*-* } 25 } */ +union { long b; }; /* { dg-warning "warning: unnamed struct/union that defines no instances" } */ + +/* Multiple type names (errors). */ +struct s1 int; /* { dg-error "error: two or more data types in declaration specifiers" } */ +char union u1; /* { dg-error "error: two or more data types in declaration specifiers" } */ +/* { dg-warning "warning: useless type name in empty declaration" "char union" { target *-*-* } 31 } */ +double enum { E2 }; /* { dg-error "error: two or more data types in declaration specifiers" } */ +/* { dg-warning "warning: useless type name in empty declaration" "double enum" { target *-*-* } 33 } */ +T struct s2; /* { dg-error "error: two or more data types in declaration specifiers" } */ +/* { dg-warning "warning: useless type name in empty declaration" "T struct" { target *-*-* } 35 } */ +long union u2; /* { dg-error "error: long, short, signed, unsigned or complex used invalidly in empty declaration" } */ +struct s3 short; /* { dg-error "error: long, short, signed, unsigned or complex used invalidly in empty declaration" } */ +union u3 signed; /* { dg-error "error: long, short, signed, unsigned or complex used invalidly in empty declaration" } */ +unsigned struct s4; /* { dg-error "error: long, short, signed, unsigned or complex used invalidly in empty declaration" } */ +_Complex enum { E3 }; /* { dg-error "error: long, short, signed, unsigned or complex used invalidly in empty declaration" } */ diff --git a/gcc/testsuite/gcc.dg/declspec-6.c b/gcc/testsuite/gcc.dg/declspec-6.c new file mode 100644 index 0000000..91a5d82 --- /dev/null +++ b/gcc/testsuite/gcc.dg/declspec-6.c @@ -0,0 +1,41 @@ +/* Test declaration specifiers. Test empty declarations. Test with + -pedantic-errors. */ +/* Origin: Joseph Myers <jsm@polyomino.org.uk> */ +/* { dg-do compile } */ +/* { dg-options "-pedantic-errors" } */ + +/* If a declaration does not declare a declarator, it must declare a + tag or the members of an enumeration, and must only contain one + type specifier. */ + +typedef int T; + +struct s0; +union u0; +enum e0; /* { dg-error "error: ISO C forbids forward references" } */ +enum { E0 }; +enum e1 { E1 }; + +/* Not declaring anything (pedwarns). */ +struct { int a; }; /* { dg-error "error: unnamed struct/union that defines no instances" } */ +int; /* { dg-error "error: useless type name in empty declaration" } */ +long; /* { dg-warning "warning: useless keyword or type name in empty declaration" } */ +/* { dg-error "error: empty declaration" "long" { target *-*-* } 22 } */ +T; /* { dg-error "error: useless type name in empty declaration" } */ +static const; /* { dg-warning "warning: useless keyword or type name in empty declaration" } */ +/* { dg-error "error: empty declaration" "long" { target *-*-* } 25 } */ +union { long b; }; /* { dg-error "error: unnamed struct/union that defines no instances" } */ + +/* Multiple type names (errors). */ +struct s1 int; /* { dg-error "error: two or more data types in declaration specifiers" } */ +char union u1; /* { dg-error "error: two or more data types in declaration specifiers" } */ +/* { dg-error "error: useless type name in empty declaration" "char union" { target *-*-* } 31 } */ +double enum { E2 }; /* { dg-error "error: two or more data types in declaration specifiers" } */ +/* { dg-error "error: useless type name in empty declaration" "double enum" { target *-*-* } 33 } */ +T struct s2; /* { dg-error "error: two or more data types in declaration specifiers" } */ +/* { dg-error "error: useless type name in empty declaration" "T struct" { target *-*-* } 35 } */ +long union u2; /* { dg-error "error: long, short, signed, unsigned or complex used invalidly in empty declaration" } */ +struct s3 short; /* { dg-error "error: long, short, signed, unsigned or complex used invalidly in empty declaration" } */ +union u3 signed; /* { dg-error "error: long, short, signed, unsigned or complex used invalidly in empty declaration" } */ +unsigned struct s4; /* { dg-error "error: long, short, signed, unsigned or complex used invalidly in empty declaration" } */ +_Complex enum { E3 }; /* { dg-error "error: long, short, signed, unsigned or complex used invalidly in empty declaration" } */ diff --git a/gcc/testsuite/gcc.dg/long-long-typespec-1.c b/gcc/testsuite/gcc.dg/long-long-typespec-1.c new file mode 100644 index 0000000..5a94c1d --- /dev/null +++ b/gcc/testsuite/gcc.dg/long-long-typespec-1.c @@ -0,0 +1,828 @@ +/* Test for valid and invalid combinations of type specifiers in C90 + with -Wno-long-long. */ +/* Origin: Joseph Myers <jsm@polyomino.org.uk> */ +/* { dg-do compile } */ +/* { dg-options "-std=iso9899:1990 -pedantic-errors -Wno-long-long" } */ + +typedef char type; +extern *x0; +void *x1; +char *x2; +short *x3; +int *x4; +long *x5; +float *x6; +double *x7; +signed *x8; +unsigned *x9; +type *x10; +void void *x11; /* { dg-error "error" "void void" } */ +void char *x12; /* { dg-error "error" "void char" } */ +void short *x13; /* { dg-error "error" "void short" } */ +void int *x14; /* { dg-error "error" "void int" } */ +void long *x15; /* { dg-error "error" "void long" } */ +void float *x16; /* { dg-error "error" "void float" } */ +void double *x17; /* { dg-error "error" "void double" } */ +void signed *x18; /* { dg-error "error" "void signed" } */ +void unsigned *x19; /* { dg-error "error" "void unsigned" } */ +char void *x20; /* { dg-error "error" "char void" } */ +char char *x21; /* { dg-error "error" "char char" } */ +char short *x22; /* { dg-error "error" "char short" } */ +char int *x23; /* { dg-error "error" "char int" } */ +char long *x24; /* { dg-error "error" "char long" } */ +char float *x25; /* { dg-error "error" "char float" } */ +char double *x26; /* { dg-error "error" "char double" } */ +char signed *x27; +char unsigned *x28; +short void *x29; /* { dg-error "error" "short void" } */ +short char *x30; /* { dg-error "error" "short char" } */ +short short *x31; /* { dg-error "error" "short short" } */ +short int *x32; +short long *x33; /* { dg-error "error" "short long" } */ +short float *x34; /* { dg-error "error" "short float" } */ +short double *x35; /* { dg-error "error" "short double" } */ +short signed *x36; +short unsigned *x37; +int void *x38; /* { dg-error "error" "int void" } */ +int char *x39; /* { dg-error "error" "int char" } */ +int short *x40; +int int *x41; /* { dg-error "error" "int int" } */ +int long *x42; +int float *x43; /* { dg-error "error" "int float" } */ +int double *x44; /* { dg-error "error" "int double" } */ +int signed *x45; +int unsigned *x46; +long void *x47; /* { dg-error "error" "long void" } */ +long char *x48; /* { dg-error "error" "long char" } */ +long short *x49; /* { dg-error "error" "long short" } */ +long int *x50; +long long *x51; +long float *x52; /* { dg-error "error" "long float" } */ +long double *x53; +long signed *x54; +long unsigned *x55; +float void *x56; /* { dg-error "error" "float void" } */ +float char *x57; /* { dg-error "error" "float char" } */ +float short *x58; /* { dg-error "error" "float short" } */ +float int *x59; /* { dg-error "error" "float int" } */ +float long *x60; /* { dg-error "error" "float long" } */ +float float *x61; /* { dg-error "error" "float float" } */ +float double *x62; /* { dg-error "error" "float double" } */ +float signed *x63; /* { dg-error "error" "float signed" } */ +float unsigned *x64; /* { dg-error "error" "float unsigned" } */ +double void *x65; /* { dg-error "error" "double void" } */ +double char *x66; /* { dg-error "error" "double char" } */ +double short *x67; /* { dg-error "error" "double short" } */ +double int *x68; /* { dg-error "error" "double int" } */ +double long *x69; +double float *x70; /* { dg-error "error" "double float" } */ +double double *x71; /* { dg-error "error" "double double" } */ +double signed *x72; /* { dg-error "error" "double signed" } */ +double unsigned *x73; /* { dg-error "error" "double unsigned" } */ +signed void *x74; /* { dg-error "error" "signed void" } */ +signed char *x75; +signed short *x76; +signed int *x77; +signed long *x78; +signed float *x79; /* { dg-error "error" "signed float" } */ +signed double *x80; /* { dg-error "error" "signed double" } */ +signed signed *x81; /* { dg-error "error" "signed signed" } */ +signed unsigned *x82; /* { dg-error "error" "signed unsigned" } */ +unsigned void *x83; /* { dg-error "error" "unsigned void" } */ +unsigned char *x84; +unsigned short *x85; +unsigned int *x86; +unsigned long *x87; +unsigned float *x88; /* { dg-error "error" "unsigned float" } */ +unsigned double *x89; /* { dg-error "error" "unsigned double" } */ +unsigned signed *x90; /* { dg-error "error" "unsigned signed" } */ +unsigned unsigned *x91; /* { dg-error "error" "unsigned unsigned" } */ +type void *x92; /* { dg-error "error" "type void" } */ +type char *x93; /* { dg-error "error" "type char" } */ +type short *x94; /* { dg-error "error" "type short" } */ +type int *x95; /* { dg-error "error" "type int" } */ +type long *x96; /* { dg-error "error" "type long" } */ +type float *x97; /* { dg-error "error" "type float" } */ +type double *x98; /* { dg-error "error" "type double" } */ +type signed *x99; /* { dg-error "error" "type signed" } */ +type unsigned *x100; /* { dg-error "error" "type unsigned" } */ +char signed void *x101; /* { dg-error "error" "char signed void" } */ +char signed char *x102; /* { dg-error "error" "char signed char" } */ +char signed short *x103; /* { dg-error "error" "char signed short" } */ +char signed int *x104; /* { dg-error "error" "char signed int" } */ +char signed long *x105; /* { dg-error "error" "char signed long" } */ +char signed float *x106; /* { dg-error "error" "char signed float" } */ +char signed double *x107; /* { dg-error "error" "char signed double" } */ +char signed signed *x108; /* { dg-error "error" "char signed signed" } */ +char signed unsigned *x109; /* { dg-error "error" "char signed unsigned" } */ +char unsigned void *x110; /* { dg-error "error" "char unsigned void" } */ +char unsigned char *x111; /* { dg-error "error" "char unsigned char" } */ +char unsigned short *x112; /* { dg-error "error" "char unsigned short" } */ +char unsigned int *x113; /* { dg-error "error" "char unsigned int" } */ +char unsigned long *x114; /* { dg-error "error" "char unsigned long" } */ +char unsigned float *x115; /* { dg-error "error" "char unsigned float" } */ +char unsigned double *x116; /* { dg-error "error" "char unsigned double" } */ +char unsigned signed *x117; /* { dg-error "error" "char unsigned signed" } */ +char unsigned unsigned *x118; /* { dg-error "error" "char unsigned unsigned" } */ +short int void *x119; /* { dg-error "error" "short int void" } */ +short int char *x120; /* { dg-error "error" "short int char" } */ +short int short *x121; /* { dg-error "error" "short int short" } */ +short int int *x122; /* { dg-error "error" "short int int" } */ +short int long *x123; /* { dg-error "error" "short int long" } */ +short int float *x124; /* { dg-error "error" "short int float" } */ +short int double *x125; /* { dg-error "error" "short int double" } */ +short int signed *x126; +short int unsigned *x127; +short signed void *x128; /* { dg-error "error" "short signed void" } */ +short signed char *x129; /* { dg-error "error" "short signed char" } */ +short signed short *x130; /* { dg-error "error" "short signed short" } */ +short signed int *x131; +short signed long *x132; /* { dg-error "error" "short signed long" } */ +short signed float *x133; /* { dg-error "error" "short signed float" } */ +short signed double *x134; /* { dg-error "error" "short signed double" } */ +short signed signed *x135; /* { dg-error "error" "short signed signed" } */ +short signed unsigned *x136; /* { dg-error "error" "short signed unsigned" } */ +short unsigned void *x137; /* { dg-error "error" "short unsigned void" } */ +short unsigned char *x138; /* { dg-error "error" "short unsigned char" } */ +short unsigned short *x139; /* { dg-error "error" "short unsigned short" } */ +short unsigned int *x140; +short unsigned long *x141; /* { dg-error "error" "short unsigned long" } */ +short unsigned float *x142; /* { dg-error "error" "short unsigned float" } */ +short unsigned double *x143; /* { dg-error "error" "short unsigned double" } */ +short unsigned signed *x144; /* { dg-error "error" "short unsigned signed" } */ +short unsigned unsigned *x145; /* { dg-error "error" "short unsigned unsigned" } */ +int short void *x146; /* { dg-error "error" "int short void" } */ +int short char *x147; /* { dg-error "error" "int short char" } */ +int short short *x148; /* { dg-error "error" "int short short" } */ +int short int *x149; /* { dg-error "error" "int short int" } */ +int short long *x150; /* { dg-error "error" "int short long" } */ +int short float *x151; /* { dg-error "error" "int short float" } */ +int short double *x152; /* { dg-error "error" "int short double" } */ +int short signed *x153; +int short unsigned *x154; +int long void *x155; /* { dg-error "error" "int long void" } */ +int long char *x156; /* { dg-error "error" "int long char" } */ +int long short *x157; /* { dg-error "error" "int long short" } */ +int long int *x158; /* { dg-error "error" "int long int" } */ +int long long *x159; +int long float *x160; /* { dg-error "error" "int long float" } */ +int long double *x161; /* { dg-error "error" "int long double" } */ +int long signed *x162; +int long unsigned *x163; +int signed void *x164; /* { dg-error "error" "int signed void" } */ +int signed char *x165; /* { dg-error "error" "int signed char" } */ +int signed short *x166; +int signed int *x167; /* { dg-error "error" "int signed int" } */ +int signed long *x168; +int signed float *x169; /* { dg-error "error" "int signed float" } */ +int signed double *x170; /* { dg-error "error" "int signed double" } */ +int signed signed *x171; /* { dg-error "error" "int signed signed" } */ +int signed unsigned *x172; /* { dg-error "error" "int signed unsigned" } */ +int unsigned void *x173; /* { dg-error "error" "int unsigned void" } */ +int unsigned char *x174; /* { dg-error "error" "int unsigned char" } */ +int unsigned short *x175; +int unsigned int *x176; /* { dg-error "error" "int unsigned int" } */ +int unsigned long *x177; +int unsigned float *x178; /* { dg-error "error" "int unsigned float" } */ +int unsigned double *x179; /* { dg-error "error" "int unsigned double" } */ +int unsigned signed *x180; /* { dg-error "error" "int unsigned signed" } */ +int unsigned unsigned *x181; /* { dg-error "error" "int unsigned unsigned" } */ +long int void *x182; /* { dg-error "error" "long int void" } */ +long int char *x183; /* { dg-error "error" "long int char" } */ +long int short *x184; /* { dg-error "error" "long int short" } */ +long int int *x185; /* { dg-error "error" "long int int" } */ +long int long *x186; +long int float *x187; /* { dg-error "error" "long int float" } */ +long int double *x188; /* { dg-error "error" "long int double" } */ +long int signed *x189; +long int unsigned *x190; +long long void *x191; /* { dg-error "error" "long long void" } */ +long long char *x192; /* { dg-error "error" "long long char" } */ +long long short *x193; /* { dg-error "error" "long long short" } */ +long long int *x194; +long long long *x195; /* { dg-error "error" "long long long" } */ +long long float *x196; /* { dg-error "error" "long long float" } */ +long long double *x197; /* { dg-error "error" "long long double" } */ +long long signed *x198; +long long unsigned *x199; +long double void *x200; /* { dg-error "error" "long double void" } */ +long double char *x201; /* { dg-error "error" "long double char" } */ +long double short *x202; /* { dg-error "error" "long double short" } */ +long double int *x203; /* { dg-error "error" "long double int" } */ +long double long *x204; /* { dg-error "error" "long double long" } */ +long double float *x205; /* { dg-error "error" "long double float" } */ +long double double *x206; /* { dg-error "error" "long double double" } */ +long double signed *x207; /* { dg-error "error" "long double signed" } */ +long double unsigned *x208; /* { dg-error "error" "long double unsigned" } */ +long signed void *x209; /* { dg-error "error" "long signed void" } */ +long signed char *x210; /* { dg-error "error" "long signed char" } */ +long signed short *x211; /* { dg-error "error" "long signed short" } */ +long signed int *x212; +long signed long *x213; +long signed float *x214; /* { dg-error "error" "long signed float" } */ +long signed double *x215; /* { dg-error "error" "long signed double" } */ +long signed signed *x216; /* { dg-error "error" "long signed signed" } */ +long signed unsigned *x217; /* { dg-error "error" "long signed unsigned" } */ +long unsigned void *x218; /* { dg-error "error" "long unsigned void" } */ +long unsigned char *x219; /* { dg-error "error" "long unsigned char" } */ +long unsigned short *x220; /* { dg-error "error" "long unsigned short" } */ +long unsigned int *x221; +long unsigned long *x222; +long unsigned float *x223; /* { dg-error "error" "long unsigned float" } */ +long unsigned double *x224; /* { dg-error "error" "long unsigned double" } */ +long unsigned signed *x225; /* { dg-error "error" "long unsigned signed" } */ +long unsigned unsigned *x226; /* { dg-error "error" "long unsigned unsigned" } */ +double long void *x227; /* { dg-error "error" "double long void" } */ +double long char *x228; /* { dg-error "error" "double long char" } */ +double long short *x229; /* { dg-error "error" "double long short" } */ +double long int *x230; /* { dg-error "error" "double long int" } */ +double long long *x231; /* { dg-error "error" "double long long" } */ +double long float *x232; /* { dg-error "error" "double long float" } */ +double long double *x233; /* { dg-error "error" "double long double" } */ +double long signed *x234; /* { dg-error "error" "double long signed" } */ +double long unsigned *x235; /* { dg-error "error" "double long unsigned" } */ +signed char void *x236; /* { dg-error "error" "signed char void" } */ +signed char char *x237; /* { dg-error "error" "signed char char" } */ +signed char short *x238; /* { dg-error "error" "signed char short" } */ +signed char int *x239; /* { dg-error "error" "signed char int" } */ +signed char long *x240; /* { dg-error "error" "signed char long" } */ +signed char float *x241; /* { dg-error "error" "signed char float" } */ +signed char double *x242; /* { dg-error "error" "signed char double" } */ +signed char signed *x243; /* { dg-error "error" "signed char signed" } */ +signed char unsigned *x244; /* { dg-error "error" "signed char unsigned" } */ +signed short void *x245; /* { dg-error "error" "signed short void" } */ +signed short char *x246; /* { dg-error "error" "signed short char" } */ +signed short short *x247; /* { dg-error "error" "signed short short" } */ +signed short int *x248; +signed short long *x249; /* { dg-error "error" "signed short long" } */ +signed short float *x250; /* { dg-error "error" "signed short float" } */ +signed short double *x251; /* { dg-error "error" "signed short double" } */ +signed short signed *x252; /* { dg-error "error" "signed short signed" } */ +signed short unsigned *x253; /* { dg-error "error" "signed short unsigned" } */ +signed int void *x254; /* { dg-error "error" "signed int void" } */ +signed int char *x255; /* { dg-error "error" "signed int char" } */ +signed int short *x256; +signed int int *x257; /* { dg-error "error" "signed int int" } */ +signed int long *x258; +signed int float *x259; /* { dg-error "error" "signed int float" } */ +signed int double *x260; /* { dg-error "error" "signed int double" } */ +signed int signed *x261; /* { dg-error "error" "signed int signed" } */ +signed int unsigned *x262; /* { dg-error "error" "signed int unsigned" } */ +signed long void *x263; /* { dg-error "error" "signed long void" } */ +signed long char *x264; /* { dg-error "error" "signed long char" } */ +signed long short *x265; /* { dg-error "error" "signed long short" } */ +signed long int *x266; +signed long long *x267; +signed long float *x268; /* { dg-error "error" "signed long float" } */ +signed long double *x269; /* { dg-error "error" "signed long double" } */ +signed long signed *x270; /* { dg-error "error" "signed long signed" } */ +signed long unsigned *x271; /* { dg-error "error" "signed long unsigned" } */ +unsigned char void *x272; /* { dg-error "error" "unsigned char void" } */ +unsigned char char *x273; /* { dg-error "error" "unsigned char char" } */ +unsigned char short *x274; /* { dg-error "error" "unsigned char short" } */ +unsigned char int *x275; /* { dg-error "error" "unsigned char int" } */ +unsigned char long *x276; /* { dg-error "error" "unsigned char long" } */ +unsigned char float *x277; /* { dg-error "error" "unsigned char float" } */ +unsigned char double *x278; /* { dg-error "error" "unsigned char double" } */ +unsigned char signed *x279; /* { dg-error "error" "unsigned char signed" } */ +unsigned char unsigned *x280; /* { dg-error "error" "unsigned char unsigned" } */ +unsigned short void *x281; /* { dg-error "error" "unsigned short void" } */ +unsigned short char *x282; /* { dg-error "error" "unsigned short char" } */ +unsigned short short *x283; /* { dg-error "error" "unsigned short short" } */ +unsigned short int *x284; +unsigned short long *x285; /* { dg-error "error" "unsigned short long" } */ +unsigned short float *x286; /* { dg-error "error" "unsigned short float" } */ +unsigned short double *x287; /* { dg-error "error" "unsigned short double" } */ +unsigned short signed *x288; /* { dg-error "error" "unsigned short signed" } */ +unsigned short unsigned *x289; /* { dg-error "error" "unsigned short unsigned" } */ +unsigned int void *x290; /* { dg-error "error" "unsigned int void" } */ +unsigned int char *x291; /* { dg-error "error" "unsigned int char" } */ +unsigned int short *x292; +unsigned int int *x293; /* { dg-error "error" "unsigned int int" } */ +unsigned int long *x294; +unsigned int float *x295; /* { dg-error "error" "unsigned int float" } */ +unsigned int double *x296; /* { dg-error "error" "unsigned int double" } */ +unsigned int signed *x297; /* { dg-error "error" "unsigned int signed" } */ +unsigned int unsigned *x298; /* { dg-error "error" "unsigned int unsigned" } */ +unsigned long void *x299; /* { dg-error "error" "unsigned long void" } */ +unsigned long char *x300; /* { dg-error "error" "unsigned long char" } */ +unsigned long short *x301; /* { dg-error "error" "unsigned long short" } */ +unsigned long int *x302; +unsigned long long *x303; +unsigned long float *x304; /* { dg-error "error" "unsigned long float" } */ +unsigned long double *x305; /* { dg-error "error" "unsigned long double" } */ +unsigned long signed *x306; /* { dg-error "error" "unsigned long signed" } */ +unsigned long unsigned *x307; /* { dg-error "error" "unsigned long unsigned" } */ +short int signed void *x308; /* { dg-error "error" "short int signed void" } */ +short int signed char *x309; /* { dg-error "error" "short int signed char" } */ +short int signed short *x310; /* { dg-error "error" "short int signed short" } */ +short int signed int *x311; /* { dg-error "error" "short int signed int" } */ +short int signed long *x312; /* { dg-error "error" "short int signed long" } */ +short int signed float *x313; /* { dg-error "error" "short int signed float" } */ +short int signed double *x314; /* { dg-error "error" "short int signed double" } */ +short int signed signed *x315; /* { dg-error "error" "short int signed signed" } */ +short int signed unsigned *x316; /* { dg-error "error" "short int signed unsigned" } */ +short int unsigned void *x317; /* { dg-error "error" "short int unsigned void" } */ +short int unsigned char *x318; /* { dg-error "error" "short int unsigned char" } */ +short int unsigned short *x319; /* { dg-error "error" "short int unsigned short" } */ +short int unsigned int *x320; /* { dg-error "error" "short int unsigned int" } */ +short int unsigned long *x321; /* { dg-error "error" "short int unsigned long" } */ +short int unsigned float *x322; /* { dg-error "error" "short int unsigned float" } */ +short int unsigned double *x323; /* { dg-error "error" "short int unsigned double" } */ +short int unsigned signed *x324; /* { dg-error "error" "short int unsigned signed" } */ +short int unsigned unsigned *x325; /* { dg-error "error" "short int unsigned unsigned" } */ +short signed int void *x326; /* { dg-error "error" "short signed int void" } */ +short signed int char *x327; /* { dg-error "error" "short signed int char" } */ +short signed int short *x328; /* { dg-error "error" "short signed int short" } */ +short signed int int *x329; /* { dg-error "error" "short signed int int" } */ +short signed int long *x330; /* { dg-error "error" "short signed int long" } */ +short signed int float *x331; /* { dg-error "error" "short signed int float" } */ +short signed int double *x332; /* { dg-error "error" "short signed int double" } */ +short signed int signed *x333; /* { dg-error "error" "short signed int signed" } */ +short signed int unsigned *x334; /* { dg-error "error" "short signed int unsigned" } */ +short unsigned int void *x335; /* { dg-error "error" "short unsigned int void" } */ +short unsigned int char *x336; /* { dg-error "error" "short unsigned int char" } */ +short unsigned int short *x337; /* { dg-error "error" "short unsigned int short" } */ +short unsigned int int *x338; /* { dg-error "error" "short unsigned int int" } */ +short unsigned int long *x339; /* { dg-error "error" "short unsigned int long" } */ +short unsigned int float *x340; /* { dg-error "error" "short unsigned int float" } */ +short unsigned int double *x341; /* { dg-error "error" "short unsigned int double" } */ +short unsigned int signed *x342; /* { dg-error "error" "short unsigned int signed" } */ +short unsigned int unsigned *x343; /* { dg-error "error" "short unsigned int unsigned" } */ +int short signed void *x344; /* { dg-error "error" "int short signed void" } */ +int short signed char *x345; /* { dg-error "error" "int short signed char" } */ +int short signed short *x346; /* { dg-error "error" "int short signed short" } */ +int short signed int *x347; /* { dg-error "error" "int short signed int" } */ +int short signed long *x348; /* { dg-error "error" "int short signed long" } */ +int short signed float *x349; /* { dg-error "error" "int short signed float" } */ +int short signed double *x350; /* { dg-error "error" "int short signed double" } */ +int short signed signed *x351; /* { dg-error "error" "int short signed signed" } */ +int short signed unsigned *x352; /* { dg-error "error" "int short signed unsigned" } */ +int short unsigned void *x353; /* { dg-error "error" "int short unsigned void" } */ +int short unsigned char *x354; /* { dg-error "error" "int short unsigned char" } */ +int short unsigned short *x355; /* { dg-error "error" "int short unsigned short" } */ +int short unsigned int *x356; /* { dg-error "error" "int short unsigned int" } */ +int short unsigned long *x357; /* { dg-error "error" "int short unsigned long" } */ +int short unsigned float *x358; /* { dg-error "error" "int short unsigned float" } */ +int short unsigned double *x359; /* { dg-error "error" "int short unsigned double" } */ +int short unsigned signed *x360; /* { dg-error "error" "int short unsigned signed" } */ +int short unsigned unsigned *x361; /* { dg-error "error" "int short unsigned unsigned" } */ +int long long void *x362; /* { dg-error "error" "int long long void" } */ +int long long char *x363; /* { dg-error "error" "int long long char" } */ +int long long short *x364; /* { dg-error "error" "int long long short" } */ +int long long int *x365; /* { dg-error "error" "int long long int" } */ +int long long long *x366; /* { dg-error "error" "int long long long" } */ +int long long float *x367; /* { dg-error "error" "int long long float" } */ +int long long double *x368; /* { dg-error "error" "int long long double" } */ +int long long signed *x369; +int long long unsigned *x370; +int long signed void *x371; /* { dg-error "error" "int long signed void" } */ +int long signed char *x372; /* { dg-error "error" "int long signed char" } */ +int long signed short *x373; /* { dg-error "error" "int long signed short" } */ +int long signed int *x374; /* { dg-error "error" "int long signed int" } */ +int long signed long *x375; +int long signed float *x376; /* { dg-error "error" "int long signed float" } */ +int long signed double *x377; /* { dg-error "error" "int long signed double" } */ +int long signed signed *x378; /* { dg-error "error" "int long signed signed" } */ +int long signed unsigned *x379; /* { dg-error "error" "int long signed unsigned" } */ +int long unsigned void *x380; /* { dg-error "error" "int long unsigned void" } */ +int long unsigned char *x381; /* { dg-error "error" "int long unsigned char" } */ +int long unsigned short *x382; /* { dg-error "error" "int long unsigned short" } */ +int long unsigned int *x383; /* { dg-error "error" "int long unsigned int" } */ +int long unsigned long *x384; +int long unsigned float *x385; /* { dg-error "error" "int long unsigned float" } */ +int long unsigned double *x386; /* { dg-error "error" "int long unsigned double" } */ +int long unsigned signed *x387; /* { dg-error "error" "int long unsigned signed" } */ +int long unsigned unsigned *x388; /* { dg-error "error" "int long unsigned unsigned" } */ +int signed short void *x389; /* { dg-error "error" "int signed short void" } */ +int signed short char *x390; /* { dg-error "error" "int signed short char" } */ +int signed short short *x391; /* { dg-error "error" "int signed short short" } */ +int signed short int *x392; /* { dg-error "error" "int signed short int" } */ +int signed short long *x393; /* { dg-error "error" "int signed short long" } */ +int signed short float *x394; /* { dg-error "error" "int signed short float" } */ +int signed short double *x395; /* { dg-error "error" "int signed short double" } */ +int signed short signed *x396; /* { dg-error "error" "int signed short signed" } */ +int signed short unsigned *x397; /* { dg-error "error" "int signed short unsigned" } */ +int signed long void *x398; /* { dg-error "error" "int signed long void" } */ +int signed long char *x399; /* { dg-error "error" "int signed long char" } */ +int signed long short *x400; /* { dg-error "error" "int signed long short" } */ +int signed long int *x401; /* { dg-error "error" "int signed long int" } */ +int signed long long *x402; +int signed long float *x403; /* { dg-error "error" "int signed long float" } */ +int signed long double *x404; /* { dg-error "error" "int signed long double" } */ +int signed long signed *x405; /* { dg-error "error" "int signed long signed" } */ +int signed long unsigned *x406; /* { dg-error "error" "int signed long unsigned" } */ +int unsigned short void *x407; /* { dg-error "error" "int unsigned short void" } */ +int unsigned short char *x408; /* { dg-error "error" "int unsigned short char" } */ +int unsigned short short *x409; /* { dg-error "error" "int unsigned short short" } */ +int unsigned short int *x410; /* { dg-error "error" "int unsigned short int" } */ +int unsigned short long *x411; /* { dg-error "error" "int unsigned short long" } */ +int unsigned short float *x412; /* { dg-error "error" "int unsigned short float" } */ +int unsigned short double *x413; /* { dg-error "error" "int unsigned short double" } */ +int unsigned short signed *x414; /* { dg-error "error" "int unsigned short signed" } */ +int unsigned short unsigned *x415; /* { dg-error "error" "int unsigned short unsigned" } */ +int unsigned long void *x416; /* { dg-error "error" "int unsigned long void" } */ +int unsigned long char *x417; /* { dg-error "error" "int unsigned long char" } */ +int unsigned long short *x418; /* { dg-error "error" "int unsigned long short" } */ +int unsigned long int *x419; /* { dg-error "error" "int unsigned long int" } */ +int unsigned long long *x420; +int unsigned long float *x421; /* { dg-error "error" "int unsigned long float" } */ +int unsigned long double *x422; /* { dg-error "error" "int unsigned long double" } */ +int unsigned long signed *x423; /* { dg-error "error" "int unsigned long signed" } */ +int unsigned long unsigned *x424; /* { dg-error "error" "int unsigned long unsigned" } */ +long int long void *x425; /* { dg-error "error" "long int long void" } */ +long int long char *x426; /* { dg-error "error" "long int long char" } */ +long int long short *x427; /* { dg-error "error" "long int long short" } */ +long int long int *x428; /* { dg-error "error" "long int long int" } */ +long int long long *x429; /* { dg-error "error" "long int long long" } */ +long int long float *x430; /* { dg-error "error" "long int long float" } */ +long int long double *x431; /* { dg-error "error" "long int long double" } */ +long int long signed *x432; +long int long unsigned *x433; +long int signed void *x434; /* { dg-error "error" "long int signed void" } */ +long int signed char *x435; /* { dg-error "error" "long int signed char" } */ +long int signed short *x436; /* { dg-error "error" "long int signed short" } */ +long int signed int *x437; /* { dg-error "error" "long int signed int" } */ +long int signed long *x438; +long int signed float *x439; /* { dg-error "error" "long int signed float" } */ +long int signed double *x440; /* { dg-error "error" "long int signed double" } */ +long int signed signed *x441; /* { dg-error "error" "long int signed signed" } */ +long int signed unsigned *x442; /* { dg-error "error" "long int signed unsigned" } */ +long int unsigned void *x443; /* { dg-error "error" "long int unsigned void" } */ +long int unsigned char *x444; /* { dg-error "error" "long int unsigned char" } */ +long int unsigned short *x445; /* { dg-error "error" "long int unsigned short" } */ +long int unsigned int *x446; /* { dg-error "error" "long int unsigned int" } */ +long int unsigned long *x447; +long int unsigned float *x448; /* { dg-error "error" "long int unsigned float" } */ +long int unsigned double *x449; /* { dg-error "error" "long int unsigned double" } */ +long int unsigned signed *x450; /* { dg-error "error" "long int unsigned signed" } */ +long int unsigned unsigned *x451; /* { dg-error "error" "long int unsigned unsigned" } */ +long long int void *x452; /* { dg-error "error" "long long int void" } */ +long long int char *x453; /* { dg-error "error" "long long int char" } */ +long long int short *x454; /* { dg-error "error" "long long int short" } */ +long long int int *x455; /* { dg-error "error" "long long int int" } */ +long long int long *x456; /* { dg-error "error" "long long int long" } */ +long long int float *x457; /* { dg-error "error" "long long int float" } */ +long long int double *x458; /* { dg-error "error" "long long int double" } */ +long long int signed *x459; +long long int unsigned *x460; +long long signed void *x461; /* { dg-error "error" "long long signed void" } */ +long long signed char *x462; /* { dg-error "error" "long long signed char" } */ +long long signed short *x463; /* { dg-error "error" "long long signed short" } */ +long long signed int *x464; +long long signed long *x465; /* { dg-error "error" "long long signed long" } */ +long long signed float *x466; /* { dg-error "error" "long long signed float" } */ +long long signed double *x467; /* { dg-error "error" "long long signed double" } */ +long long signed signed *x468; /* { dg-error "error" "long long signed signed" } */ +long long signed unsigned *x469; /* { dg-error "error" "long long signed unsigned" } */ +long long unsigned void *x470; /* { dg-error "error" "long long unsigned void" } */ +long long unsigned char *x471; /* { dg-error "error" "long long unsigned char" } */ +long long unsigned short *x472; /* { dg-error "error" "long long unsigned short" } */ +long long unsigned int *x473; +long long unsigned long *x474; /* { dg-error "error" "long long unsigned long" } */ +long long unsigned float *x475; /* { dg-error "error" "long long unsigned float" } */ +long long unsigned double *x476; /* { dg-error "error" "long long unsigned double" } */ +long long unsigned signed *x477; /* { dg-error "error" "long long unsigned signed" } */ +long long unsigned unsigned *x478; /* { dg-error "error" "long long unsigned unsigned" } */ +long signed int void *x479; /* { dg-error "error" "long signed int void" } */ +long signed int char *x480; /* { dg-error "error" "long signed int char" } */ +long signed int short *x481; /* { dg-error "error" "long signed int short" } */ +long signed int int *x482; /* { dg-error "error" "long signed int int" } */ +long signed int long *x483; +long signed int float *x484; /* { dg-error "error" "long signed int float" } */ +long signed int double *x485; /* { dg-error "error" "long signed int double" } */ +long signed int signed *x486; /* { dg-error "error" "long signed int signed" } */ +long signed int unsigned *x487; /* { dg-error "error" "long signed int unsigned" } */ +long signed long void *x488; /* { dg-error "error" "long signed long void" } */ +long signed long char *x489; /* { dg-error "error" "long signed long char" } */ +long signed long short *x490; /* { dg-error "error" "long signed long short" } */ +long signed long int *x491; +long signed long long *x492; /* { dg-error "error" "long signed long long" } */ +long signed long float *x493; /* { dg-error "error" "long signed long float" } */ +long signed long double *x494; /* { dg-error "error" "long signed long double" } */ +long signed long signed *x495; /* { dg-error "error" "long signed long signed" } */ +long signed long unsigned *x496; /* { dg-error "error" "long signed long unsigned" } */ +long unsigned int void *x497; /* { dg-error "error" "long unsigned int void" } */ +long unsigned int char *x498; /* { dg-error "error" "long unsigned int char" } */ +long unsigned int short *x499; /* { dg-error "error" "long unsigned int short" } */ +long unsigned int int *x500; /* { dg-error "error" "long unsigned int int" } */ +long unsigned int long *x501; +long unsigned int float *x502; /* { dg-error "error" "long unsigned int float" } */ +long unsigned int double *x503; /* { dg-error "error" "long unsigned int double" } */ +long unsigned int signed *x504; /* { dg-error "error" "long unsigned int signed" } */ +long unsigned int unsigned *x505; /* { dg-error "error" "long unsigned int unsigned" } */ +long unsigned long void *x506; /* { dg-error "error" "long unsigned long void" } */ +long unsigned long char *x507; /* { dg-error "error" "long unsigned long char" } */ +long unsigned long short *x508; /* { dg-error "error" "long unsigned long short" } */ +long unsigned long int *x509; +long unsigned long long *x510; /* { dg-error "error" "long unsigned long long" } */ +long unsigned long float *x511; /* { dg-error "error" "long unsigned long float" } */ +long unsigned long double *x512; /* { dg-error "error" "long unsigned long double" } */ +long unsigned long signed *x513; /* { dg-error "error" "long unsigned long signed" } */ +long unsigned long unsigned *x514; /* { dg-error "error" "long unsigned long unsigned" } */ +signed short int void *x515; /* { dg-error "error" "signed short int void" } */ +signed short int char *x516; /* { dg-error "error" "signed short int char" } */ +signed short int short *x517; /* { dg-error "error" "signed short int short" } */ +signed short int int *x518; /* { dg-error "error" "signed short int int" } */ +signed short int long *x519; /* { dg-error "error" "signed short int long" } */ +signed short int float *x520; /* { dg-error "error" "signed short int float" } */ +signed short int double *x521; /* { dg-error "error" "signed short int double" } */ +signed short int signed *x522; /* { dg-error "error" "signed short int signed" } */ +signed short int unsigned *x523; /* { dg-error "error" "signed short int unsigned" } */ +signed int short void *x524; /* { dg-error "error" "signed int short void" } */ +signed int short char *x525; /* { dg-error "error" "signed int short char" } */ +signed int short short *x526; /* { dg-error "error" "signed int short short" } */ +signed int short int *x527; /* { dg-error "error" "signed int short int" } */ +signed int short long *x528; /* { dg-error "error" "signed int short long" } */ +signed int short float *x529; /* { dg-error "error" "signed int short float" } */ +signed int short double *x530; /* { dg-error "error" "signed int short double" } */ +signed int short signed *x531; /* { dg-error "error" "signed int short signed" } */ +signed int short unsigned *x532; /* { dg-error "error" "signed int short unsigned" } */ +signed int long void *x533; /* { dg-error "error" "signed int long void" } */ +signed int long char *x534; /* { dg-error "error" "signed int long char" } */ +signed int long short *x535; /* { dg-error "error" "signed int long short" } */ +signed int long int *x536; /* { dg-error "error" "signed int long int" } */ +signed int long long *x537; +signed int long float *x538; /* { dg-error "error" "signed int long float" } */ +signed int long double *x539; /* { dg-error "error" "signed int long double" } */ +signed int long signed *x540; /* { dg-error "error" "signed int long signed" } */ +signed int long unsigned *x541; /* { dg-error "error" "signed int long unsigned" } */ +signed long int void *x542; /* { dg-error "error" "signed long int void" } */ +signed long int char *x543; /* { dg-error "error" "signed long int char" } */ +signed long int short *x544; /* { dg-error "error" "signed long int short" } */ +signed long int int *x545; /* { dg-error "error" "signed long int int" } */ +signed long int long *x546; +signed long int float *x547; /* { dg-error "error" "signed long int float" } */ +signed long int double *x548; /* { dg-error "error" "signed long int double" } */ +signed long int signed *x549; /* { dg-error "error" "signed long int signed" } */ +signed long int unsigned *x550; /* { dg-error "error" "signed long int unsigned" } */ +signed long long void *x551; /* { dg-error "error" "signed long long void" } */ +signed long long char *x552; /* { dg-error "error" "signed long long char" } */ +signed long long short *x553; /* { dg-error "error" "signed long long short" } */ +signed long long int *x554; +signed long long long *x555; /* { dg-error "error" "signed long long long" } */ +signed long long float *x556; /* { dg-error "error" "signed long long float" } */ +signed long long double *x557; /* { dg-error "error" "signed long long double" } */ +signed long long signed *x558; /* { dg-error "error" "signed long long signed" } */ +signed long long unsigned *x559; /* { dg-error "error" "signed long long unsigned" } */ +unsigned short int void *x560; /* { dg-error "error" "unsigned short int void" } */ +unsigned short int char *x561; /* { dg-error "error" "unsigned short int char" } */ +unsigned short int short *x562; /* { dg-error "error" "unsigned short int short" } */ +unsigned short int int *x563; /* { dg-error "error" "unsigned short int int" } */ +unsigned short int long *x564; /* { dg-error "error" "unsigned short int long" } */ +unsigned short int float *x565; /* { dg-error "error" "unsigned short int float" } */ +unsigned short int double *x566; /* { dg-error "error" "unsigned short int double" } */ +unsigned short int signed *x567; /* { dg-error "error" "unsigned short int signed" } */ +unsigned short int unsigned *x568; /* { dg-error "error" "unsigned short int unsigned" } */ +unsigned int short void *x569; /* { dg-error "error" "unsigned int short void" } */ +unsigned int short char *x570; /* { dg-error "error" "unsigned int short char" } */ +unsigned int short short *x571; /* { dg-error "error" "unsigned int short short" } */ +unsigned int short int *x572; /* { dg-error "error" "unsigned int short int" } */ +unsigned int short long *x573; /* { dg-error "error" "unsigned int short long" } */ +unsigned int short float *x574; /* { dg-error "error" "unsigned int short float" } */ +unsigned int short double *x575; /* { dg-error "error" "unsigned int short double" } */ +unsigned int short signed *x576; /* { dg-error "error" "unsigned int short signed" } */ +unsigned int short unsigned *x577; /* { dg-error "error" "unsigned int short unsigned" } */ +unsigned int long void *x578; /* { dg-error "error" "unsigned int long void" } */ +unsigned int long char *x579; /* { dg-error "error" "unsigned int long char" } */ +unsigned int long short *x580; /* { dg-error "error" "unsigned int long short" } */ +unsigned int long int *x581; /* { dg-error "error" "unsigned int long int" } */ +unsigned int long long *x582; +unsigned int long float *x583; /* { dg-error "error" "unsigned int long float" } */ +unsigned int long double *x584; /* { dg-error "error" "unsigned int long double" } */ +unsigned int long signed *x585; /* { dg-error "error" "unsigned int long signed" } */ +unsigned int long unsigned *x586; /* { dg-error "error" "unsigned int long unsigned" } */ +unsigned long int void *x587; /* { dg-error "error" "unsigned long int void" } */ +unsigned long int char *x588; /* { dg-error "error" "unsigned long int char" } */ +unsigned long int short *x589; /* { dg-error "error" "unsigned long int short" } */ +unsigned long int int *x590; /* { dg-error "error" "unsigned long int int" } */ +unsigned long int long *x591; +unsigned long int float *x592; /* { dg-error "error" "unsigned long int float" } */ +unsigned long int double *x593; /* { dg-error "error" "unsigned long int double" } */ +unsigned long int signed *x594; /* { dg-error "error" "unsigned long int signed" } */ +unsigned long int unsigned *x595; /* { dg-error "error" "unsigned long int unsigned" } */ +unsigned long long void *x596; /* { dg-error "error" "unsigned long long void" } */ +unsigned long long char *x597; /* { dg-error "error" "unsigned long long char" } */ +unsigned long long short *x598; /* { dg-error "error" "unsigned long long short" } */ +unsigned long long int *x599; +unsigned long long long *x600; /* { dg-error "error" "unsigned long long long" } */ +unsigned long long float *x601; /* { dg-error "error" "unsigned long long float" } */ +unsigned long long double *x602; /* { dg-error "error" "unsigned long long double" } */ +unsigned long long signed *x603; /* { dg-error "error" "unsigned long long signed" } */ +unsigned long long unsigned *x604; /* { dg-error "error" "unsigned long long unsigned" } */ +int long long signed void *x605; /* { dg-error "error" "int long long signed void" } */ +int long long signed char *x606; /* { dg-error "error" "int long long signed char" } */ +int long long signed short *x607; /* { dg-error "error" "int long long signed short" } */ +int long long signed int *x608; /* { dg-error "error" "int long long signed int" } */ +int long long signed long *x609; /* { dg-error "error" "int long long signed long" } */ +int long long signed float *x610; /* { dg-error "error" "int long long signed float" } */ +int long long signed double *x611; /* { dg-error "error" "int long long signed double" } */ +int long long signed signed *x612; /* { dg-error "error" "int long long signed signed" } */ +int long long signed unsigned *x613; /* { dg-error "error" "int long long signed unsigned" } */ +int long long unsigned void *x614; /* { dg-error "error" "int long long unsigned void" } */ +int long long unsigned char *x615; /* { dg-error "error" "int long long unsigned char" } */ +int long long unsigned short *x616; /* { dg-error "error" "int long long unsigned short" } */ +int long long unsigned int *x617; /* { dg-error "error" "int long long unsigned int" } */ +int long long unsigned long *x618; /* { dg-error "error" "int long long unsigned long" } */ +int long long unsigned float *x619; /* { dg-error "error" "int long long unsigned float" } */ +int long long unsigned double *x620; /* { dg-error "error" "int long long unsigned double" } */ +int long long unsigned signed *x621; /* { dg-error "error" "int long long unsigned signed" } */ +int long long unsigned unsigned *x622; /* { dg-error "error" "int long long unsigned unsigned" } */ +int long signed long void *x623; /* { dg-error "error" "int long signed long void" } */ +int long signed long char *x624; /* { dg-error "error" "int long signed long char" } */ +int long signed long short *x625; /* { dg-error "error" "int long signed long short" } */ +int long signed long int *x626; /* { dg-error "error" "int long signed long int" } */ +int long signed long long *x627; /* { dg-error "error" "int long signed long long" } */ +int long signed long float *x628; /* { dg-error "error" "int long signed long float" } */ +int long signed long double *x629; /* { dg-error "error" "int long signed long double" } */ +int long signed long signed *x630; /* { dg-error "error" "int long signed long signed" } */ +int long signed long unsigned *x631; /* { dg-error "error" "int long signed long unsigned" } */ +int long unsigned long void *x632; /* { dg-error "error" "int long unsigned long void" } */ +int long unsigned long char *x633; /* { dg-error "error" "int long unsigned long char" } */ +int long unsigned long short *x634; /* { dg-error "error" "int long unsigned long short" } */ +int long unsigned long int *x635; /* { dg-error "error" "int long unsigned long int" } */ +int long unsigned long long *x636; /* { dg-error "error" "int long unsigned long long" } */ +int long unsigned long float *x637; /* { dg-error "error" "int long unsigned long float" } */ +int long unsigned long double *x638; /* { dg-error "error" "int long unsigned long double" } */ +int long unsigned long signed *x639; /* { dg-error "error" "int long unsigned long signed" } */ +int long unsigned long unsigned *x640; /* { dg-error "error" "int long unsigned long unsigned" } */ +int signed long long void *x641; /* { dg-error "error" "int signed long long void" } */ +int signed long long char *x642; /* { dg-error "error" "int signed long long char" } */ +int signed long long short *x643; /* { dg-error "error" "int signed long long short" } */ +int signed long long int *x644; /* { dg-error "error" "int signed long long int" } */ +int signed long long long *x645; /* { dg-error "error" "int signed long long long" } */ +int signed long long float *x646; /* { dg-error "error" "int signed long long float" } */ +int signed long long double *x647; /* { dg-error "error" "int signed long long double" } */ +int signed long long signed *x648; /* { dg-error "error" "int signed long long signed" } */ +int signed long long unsigned *x649; /* { dg-error "error" "int signed long long unsigned" } */ +int unsigned long long void *x650; /* { dg-error "error" "int unsigned long long void" } */ +int unsigned long long char *x651; /* { dg-error "error" "int unsigned long long char" } */ +int unsigned long long short *x652; /* { dg-error "error" "int unsigned long long short" } */ +int unsigned long long int *x653; /* { dg-error "error" "int unsigned long long int" } */ +int unsigned long long long *x654; /* { dg-error "error" "int unsigned long long long" } */ +int unsigned long long float *x655; /* { dg-error "error" "int unsigned long long float" } */ +int unsigned long long double *x656; /* { dg-error "error" "int unsigned long long double" } */ +int unsigned long long signed *x657; /* { dg-error "error" "int unsigned long long signed" } */ +int unsigned long long unsigned *x658; /* { dg-error "error" "int unsigned long long unsigned" } */ +long int long signed void *x659; /* { dg-error "error" "long int long signed void" } */ +long int long signed char *x660; /* { dg-error "error" "long int long signed char" } */ +long int long signed short *x661; /* { dg-error "error" "long int long signed short" } */ +long int long signed int *x662; /* { dg-error "error" "long int long signed int" } */ +long int long signed long *x663; /* { dg-error "error" "long int long signed long" } */ +long int long signed float *x664; /* { dg-error "error" "long int long signed float" } */ +long int long signed double *x665; /* { dg-error "error" "long int long signed double" } */ +long int long signed signed *x666; /* { dg-error "error" "long int long signed signed" } */ +long int long signed unsigned *x667; /* { dg-error "error" "long int long signed unsigned" } */ +long int long unsigned void *x668; /* { dg-error "error" "long int long unsigned void" } */ +long int long unsigned char *x669; /* { dg-error "error" "long int long unsigned char" } */ +long int long unsigned short *x670; /* { dg-error "error" "long int long unsigned short" } */ +long int long unsigned int *x671; /* { dg-error "error" "long int long unsigned int" } */ +long int long unsigned long *x672; /* { dg-error "error" "long int long unsigned long" } */ +long int long unsigned float *x673; /* { dg-error "error" "long int long unsigned float" } */ +long int long unsigned double *x674; /* { dg-error "error" "long int long unsigned double" } */ +long int long unsigned signed *x675; /* { dg-error "error" "long int long unsigned signed" } */ +long int long unsigned unsigned *x676; /* { dg-error "error" "long int long unsigned unsigned" } */ +long int signed long void *x677; /* { dg-error "error" "long int signed long void" } */ +long int signed long char *x678; /* { dg-error "error" "long int signed long char" } */ +long int signed long short *x679; /* { dg-error "error" "long int signed long short" } */ +long int signed long int *x680; /* { dg-error "error" "long int signed long int" } */ +long int signed long long *x681; /* { dg-error "error" "long int signed long long" } */ +long int signed long float *x682; /* { dg-error "error" "long int signed long float" } */ +long int signed long double *x683; /* { dg-error "error" "long int signed long double" } */ +long int signed long signed *x684; /* { dg-error "error" "long int signed long signed" } */ +long int signed long unsigned *x685; /* { dg-error "error" "long int signed long unsigned" } */ +long int unsigned long void *x686; /* { dg-error "error" "long int unsigned long void" } */ +long int unsigned long char *x687; /* { dg-error "error" "long int unsigned long char" } */ +long int unsigned long short *x688; /* { dg-error "error" "long int unsigned long short" } */ +long int unsigned long int *x689; /* { dg-error "error" "long int unsigned long int" } */ +long int unsigned long long *x690; /* { dg-error "error" "long int unsigned long long" } */ +long int unsigned long float *x691; /* { dg-error "error" "long int unsigned long float" } */ +long int unsigned long double *x692; /* { dg-error "error" "long int unsigned long double" } */ +long int unsigned long signed *x693; /* { dg-error "error" "long int unsigned long signed" } */ +long int unsigned long unsigned *x694; /* { dg-error "error" "long int unsigned long unsigned" } */ +long long int signed void *x695; /* { dg-error "error" "long long int signed void" } */ +long long int signed char *x696; /* { dg-error "error" "long long int signed char" } */ +long long int signed short *x697; /* { dg-error "error" "long long int signed short" } */ +long long int signed int *x698; /* { dg-error "error" "long long int signed int" } */ +long long int signed long *x699; /* { dg-error "error" "long long int signed long" } */ +long long int signed float *x700; /* { dg-error "error" "long long int signed float" } */ +long long int signed double *x701; /* { dg-error "error" "long long int signed double" } */ +long long int signed signed *x702; /* { dg-error "error" "long long int signed signed" } */ +long long int signed unsigned *x703; /* { dg-error "error" "long long int signed unsigned" } */ +long long int unsigned void *x704; /* { dg-error "error" "long long int unsigned void" } */ +long long int unsigned char *x705; /* { dg-error "error" "long long int unsigned char" } */ +long long int unsigned short *x706; /* { dg-error "error" "long long int unsigned short" } */ +long long int unsigned int *x707; /* { dg-error "error" "long long int unsigned int" } */ +long long int unsigned long *x708; /* { dg-error "error" "long long int unsigned long" } */ +long long int unsigned float *x709; /* { dg-error "error" "long long int unsigned float" } */ +long long int unsigned double *x710; /* { dg-error "error" "long long int unsigned double" } */ +long long int unsigned signed *x711; /* { dg-error "error" "long long int unsigned signed" } */ +long long int unsigned unsigned *x712; /* { dg-error "error" "long long int unsigned unsigned" } */ +long long signed int void *x713; /* { dg-error "error" "long long signed int void" } */ +long long signed int char *x714; /* { dg-error "error" "long long signed int char" } */ +long long signed int short *x715; /* { dg-error "error" "long long signed int short" } */ +long long signed int int *x716; /* { dg-error "error" "long long signed int int" } */ +long long signed int long *x717; /* { dg-error "error" "long long signed int long" } */ +long long signed int float *x718; /* { dg-error "error" "long long signed int float" } */ +long long signed int double *x719; /* { dg-error "error" "long long signed int double" } */ +long long signed int signed *x720; /* { dg-error "error" "long long signed int signed" } */ +long long signed int unsigned *x721; /* { dg-error "error" "long long signed int unsigned" } */ +long long unsigned int void *x722; /* { dg-error "error" "long long unsigned int void" } */ +long long unsigned int char *x723; /* { dg-error "error" "long long unsigned int char" } */ +long long unsigned int short *x724; /* { dg-error "error" "long long unsigned int short" } */ +long long unsigned int int *x725; /* { dg-error "error" "long long unsigned int int" } */ +long long unsigned int long *x726; /* { dg-error "error" "long long unsigned int long" } */ +long long unsigned int float *x727; /* { dg-error "error" "long long unsigned int float" } */ +long long unsigned int double *x728; /* { dg-error "error" "long long unsigned int double" } */ +long long unsigned int signed *x729; /* { dg-error "error" "long long unsigned int signed" } */ +long long unsigned int unsigned *x730; /* { dg-error "error" "long long unsigned int unsigned" } */ +long signed int long void *x731; /* { dg-error "error" "long signed int long void" } */ +long signed int long char *x732; /* { dg-error "error" "long signed int long char" } */ +long signed int long short *x733; /* { dg-error "error" "long signed int long short" } */ +long signed int long int *x734; /* { dg-error "error" "long signed int long int" } */ +long signed int long long *x735; /* { dg-error "error" "long signed int long long" } */ +long signed int long float *x736; /* { dg-error "error" "long signed int long float" } */ +long signed int long double *x737; /* { dg-error "error" "long signed int long double" } */ +long signed int long signed *x738; /* { dg-error "error" "long signed int long signed" } */ +long signed int long unsigned *x739; /* { dg-error "error" "long signed int long unsigned" } */ +long signed long int void *x740; /* { dg-error "error" "long signed long int void" } */ +long signed long int char *x741; /* { dg-error "error" "long signed long int char" } */ +long signed long int short *x742; /* { dg-error "error" "long signed long int short" } */ +long signed long int int *x743; /* { dg-error "error" "long signed long int int" } */ +long signed long int long *x744; /* { dg-error "error" "long signed long int long" } */ +long signed long int float *x745; /* { dg-error "error" "long signed long int float" } */ +long signed long int double *x746; /* { dg-error "error" "long signed long int double" } */ +long signed long int signed *x747; /* { dg-error "error" "long signed long int signed" } */ +long signed long int unsigned *x748; /* { dg-error "error" "long signed long int unsigned" } */ +long unsigned int long void *x749; /* { dg-error "error" "long unsigned int long void" } */ +long unsigned int long char *x750; /* { dg-error "error" "long unsigned int long char" } */ +long unsigned int long short *x751; /* { dg-error "error" "long unsigned int long short" } */ +long unsigned int long int *x752; /* { dg-error "error" "long unsigned int long int" } */ +long unsigned int long long *x753; /* { dg-error "error" "long unsigned int long long" } */ +long unsigned int long float *x754; /* { dg-error "error" "long unsigned int long float" } */ +long unsigned int long double *x755; /* { dg-error "error" "long unsigned int long double" } */ +long unsigned int long signed *x756; /* { dg-error "error" "long unsigned int long signed" } */ +long unsigned int long unsigned *x757; /* { dg-error "error" "long unsigned int long unsigned" } */ +long unsigned long int void *x758; /* { dg-error "error" "long unsigned long int void" } */ +long unsigned long int char *x759; /* { dg-error "error" "long unsigned long int char" } */ +long unsigned long int short *x760; /* { dg-error "error" "long unsigned long int short" } */ +long unsigned long int int *x761; /* { dg-error "error" "long unsigned long int int" } */ +long unsigned long int long *x762; /* { dg-error "error" "long unsigned long int long" } */ +long unsigned long int float *x763; /* { dg-error "error" "long unsigned long int float" } */ +long unsigned long int double *x764; /* { dg-error "error" "long unsigned long int double" } */ +long unsigned long int signed *x765; /* { dg-error "error" "long unsigned long int signed" } */ +long unsigned long int unsigned *x766; /* { dg-error "error" "long unsigned long int unsigned" } */ +signed int long long void *x767; /* { dg-error "error" "signed int long long void" } */ +signed int long long char *x768; /* { dg-error "error" "signed int long long char" } */ +signed int long long short *x769; /* { dg-error "error" "signed int long long short" } */ +signed int long long int *x770; /* { dg-error "error" "signed int long long int" } */ +signed int long long long *x771; /* { dg-error "error" "signed int long long long" } */ +signed int long long float *x772; /* { dg-error "error" "signed int long long float" } */ +signed int long long double *x773; /* { dg-error "error" "signed int long long double" } */ +signed int long long signed *x774; /* { dg-error "error" "signed int long long signed" } */ +signed int long long unsigned *x775; /* { dg-error "error" "signed int long long unsigned" } */ +signed long int long void *x776; /* { dg-error "error" "signed long int long void" } */ +signed long int long char *x777; /* { dg-error "error" "signed long int long char" } */ +signed long int long short *x778; /* { dg-error "error" "signed long int long short" } */ +signed long int long int *x779; /* { dg-error "error" "signed long int long int" } */ +signed long int long long *x780; /* { dg-error "error" "signed long int long long" } */ +signed long int long float *x781; /* { dg-error "error" "signed long int long float" } */ +signed long int long double *x782; /* { dg-error "error" "signed long int long double" } */ +signed long int long signed *x783; /* { dg-error "error" "signed long int long signed" } */ +signed long int long unsigned *x784; /* { dg-error "error" "signed long int long unsigned" } */ +signed long long int void *x785; /* { dg-error "error" "signed long long int void" } */ +signed long long int char *x786; /* { dg-error "error" "signed long long int char" } */ +signed long long int short *x787; /* { dg-error "error" "signed long long int short" } */ +signed long long int int *x788; /* { dg-error "error" "signed long long int int" } */ +signed long long int long *x789; /* { dg-error "error" "signed long long int long" } */ +signed long long int float *x790; /* { dg-error "error" "signed long long int float" } */ +signed long long int double *x791; /* { dg-error "error" "signed long long int double" } */ +signed long long int signed *x792; /* { dg-error "error" "signed long long int signed" } */ +signed long long int unsigned *x793; /* { dg-error "error" "signed long long int unsigned" } */ +unsigned int long long void *x794; /* { dg-error "error" "unsigned int long long void" } */ +unsigned int long long char *x795; /* { dg-error "error" "unsigned int long long char" } */ +unsigned int long long short *x796; /* { dg-error "error" "unsigned int long long short" } */ +unsigned int long long int *x797; /* { dg-error "error" "unsigned int long long int" } */ +unsigned int long long long *x798; /* { dg-error "error" "unsigned int long long long" } */ +unsigned int long long float *x799; /* { dg-error "error" "unsigned int long long float" } */ +unsigned int long long double *x800; /* { dg-error "error" "unsigned int long long double" } */ +unsigned int long long signed *x801; /* { dg-error "error" "unsigned int long long signed" } */ +unsigned int long long unsigned *x802; /* { dg-error "error" "unsigned int long long unsigned" } */ +unsigned long int long void *x803; /* { dg-error "error" "unsigned long int long void" } */ +unsigned long int long char *x804; /* { dg-error "error" "unsigned long int long char" } */ +unsigned long int long short *x805; /* { dg-error "error" "unsigned long int long short" } */ +unsigned long int long int *x806; /* { dg-error "error" "unsigned long int long int" } */ +unsigned long int long long *x807; /* { dg-error "error" "unsigned long int long long" } */ +unsigned long int long float *x808; /* { dg-error "error" "unsigned long int long float" } */ +unsigned long int long double *x809; /* { dg-error "error" "unsigned long int long double" } */ +unsigned long int long signed *x810; /* { dg-error "error" "unsigned long int long signed" } */ +unsigned long int long unsigned *x811; /* { dg-error "error" "unsigned long int long unsigned" } */ +unsigned long long int void *x812; /* { dg-error "error" "unsigned long long int void" } */ +unsigned long long int char *x813; /* { dg-error "error" "unsigned long long int char" } */ +unsigned long long int short *x814; /* { dg-error "error" "unsigned long long int short" } */ +unsigned long long int int *x815; /* { dg-error "error" "unsigned long long int int" } */ +unsigned long long int long *x816; /* { dg-error "error" "unsigned long long int long" } */ +unsigned long long int float *x817; /* { dg-error "error" "unsigned long long int float" } */ +unsigned long long int double *x818; /* { dg-error "error" "unsigned long long int double" } */ +unsigned long long int signed *x819; /* { dg-error "error" "unsigned long long int signed" } */ +unsigned long long int unsigned *x820; /* { dg-error "error" "unsigned long long int unsigned" } */ diff --git a/gcc/testsuite/gcc.dg/tls/diag-2.c b/gcc/testsuite/gcc.dg/tls/diag-2.c index 4f2b90b..3c5d9bd 100644 --- a/gcc/testsuite/gcc.dg/tls/diag-2.c +++ b/gcc/testsuite/gcc.dg/tls/diag-2.c @@ -1,15 +1,15 @@ /* Invalid __thread specifiers. */ -__thread extern int g1; /* { dg-error "`__thread' before `extern'" } */ -__thread static int g2; /* { dg-error "`__thread' before `static'" } */ -__thread __thread int g3; /* { dg-error "duplicate `__thread'" } */ +__thread extern int g1; /* { dg-error "'__thread' before 'extern'" } */ +__thread static int g2; /* { dg-error "'__thread' before 'static'" } */ +__thread __thread int g3; /* { dg-error "duplicate '__thread'" } */ typedef __thread int g4; /* { dg-error "multiple storage classes" } */ void foo() { __thread int l1; /* { dg-error "implicitly auto and declared `__thread'" } */ auto __thread int l2; /* { dg-error "multiple storage classes" } */ - __thread extern int l3; /* { dg-error "`__thread' before `extern'" } */ + __thread extern int l3; /* { dg-error "'__thread' before 'extern'" } */ register __thread int l4; /* { dg-error "multiple storage classes" } */ } |