Commit 8415f317 by Nathan Froyd Committed by Nathan Froyd

c-parser.c (struct c_token): Move location field up.

	* c-parser.c (struct c_token): Move location field up.
	* c-tree.h (struct c_typespec): Move expr_const_operands field up.
	(struct c_declspecs): Convert typespec_word, storage_class, and
	default_int_p into bitfields.
	(struct c_declarator): Move loc field up.

From-SVN: r158744
parent 448f65db
2010-04-26 Nathan Froyd <froydnj@codesourcery.com> 2010-04-26 Nathan Froyd <froydnj@codesourcery.com>
* c-parser.c (struct c_token): Move location field up.
* c-tree.h (struct c_typespec): Move expr_const_operands field up.
(struct c_declspecs): Convert typespec_word, storage_class, and
default_int_p into bitfields.
(struct c_declarator): Move loc field up.
2010-04-26 Nathan Froyd <froydnj@codesourcery.com>
* cfgloop.h (struct loop): Move can_be_parallel field up. * cfgloop.h (struct loop): Move can_be_parallel field up.
* ipa-prop.h (struct ip_node_params): Move bitfields up. * ipa-prop.h (struct ip_node_params): Move bitfields up.
* tree-ssa-loop-ivopts.c (struct version_info): Move inv_id field * tree-ssa-loop-ivopts.c (struct version_info): Move inv_id field
......
...@@ -156,10 +156,10 @@ typedef struct GTY (()) c_token { ...@@ -156,10 +156,10 @@ typedef struct GTY (()) c_token {
/* If this token is a CPP_PRAGMA, this indicates the pragma that /* If this token is a CPP_PRAGMA, this indicates the pragma that
was seen. Otherwise it is PRAGMA_NONE. */ was seen. Otherwise it is PRAGMA_NONE. */
ENUM_BITFIELD (pragma_kind) pragma_kind : 8; ENUM_BITFIELD (pragma_kind) pragma_kind : 8;
/* The value associated with this token, if any. */
tree value;
/* The location at which this token was found. */ /* The location at which this token was found. */
location_t location; location_t location;
/* The value associated with this token, if any. */
tree value;
} c_token; } c_token;
/* A parser structure recording information about the state and /* A parser structure recording information about the state and
......
...@@ -160,6 +160,9 @@ enum c_typespec_kind { ...@@ -160,6 +160,9 @@ enum c_typespec_kind {
struct c_typespec { struct c_typespec {
/* What kind of type specifier this is. */ /* What kind of type specifier this is. */
enum c_typespec_kind kind; enum c_typespec_kind kind;
/* Whether the expression has operands suitable for use in constant
expressions. */
bool expr_const_operands;
/* The specifier itself. */ /* The specifier itself. */
tree spec; tree spec;
/* An expression to be evaluated before the type specifier, in the /* An expression to be evaluated before the type specifier, in the
...@@ -171,9 +174,6 @@ struct c_typespec { ...@@ -171,9 +174,6 @@ struct c_typespec {
expression itself (as opposed to the array sizes) forms no part expression itself (as opposed to the array sizes) forms no part
of the type and so needs to be recorded separately. */ of the type and so needs to be recorded separately. */
tree expr; tree expr;
/* Whether the expression has operands suitable for use in constant
expressions. */
bool expr_const_operands;
}; };
/* A storage class specifier. */ /* A storage class specifier. */
...@@ -220,11 +220,11 @@ struct c_declspecs { ...@@ -220,11 +220,11 @@ struct c_declspecs {
NULL; attributes (possibly from multiple lists) will be passed NULL; attributes (possibly from multiple lists) will be passed
separately. */ separately. */
tree attrs; tree attrs;
/* Any type specifier keyword used such as "int", not reflecting
modifiers such as "short", or cts_none if none. */
enum c_typespec_keyword typespec_word;
/* The storage class specifier, or csc_none if none. */ /* The storage class specifier, or csc_none if none. */
enum c_storage_class storage_class; enum c_storage_class storage_class;
/* Any type specifier keyword used such as "int", not reflecting
modifiers such as "short", or cts_none if none. */
ENUM_BITFIELD (c_typespec_keyword) typespec_word : 8;
/* Whether any expressions in typeof specifiers may appear in /* Whether any expressions in typeof specifiers may appear in
constant expressions. */ constant expressions. */
BOOL_BITFIELD expr_const_operands : 1; BOOL_BITFIELD expr_const_operands : 1;
...@@ -252,7 +252,7 @@ struct c_declspecs { ...@@ -252,7 +252,7 @@ struct c_declspecs {
BOOL_BITFIELD deprecated_p : 1; BOOL_BITFIELD deprecated_p : 1;
/* Whether the type defaulted to "int" because there were no type /* Whether the type defaulted to "int" because there were no type
specifiers. */ specifiers. */
BOOL_BITFIELD default_int_p; BOOL_BITFIELD default_int_p : 1;
/* Whether "long" was specified. */ /* Whether "long" was specified. */
BOOL_BITFIELD long_p : 1; BOOL_BITFIELD long_p : 1;
/* Whether "long" was specified more than once. */ /* Whether "long" was specified more than once. */
...@@ -319,9 +319,9 @@ struct c_arg_info { ...@@ -319,9 +319,9 @@ struct c_arg_info {
struct c_declarator { struct c_declarator {
/* The kind of declarator. */ /* The kind of declarator. */
enum c_declarator_kind kind; enum c_declarator_kind kind;
location_t id_loc; /* Currently only set for cdk_id, cdk_array. */
/* Except for cdk_id, the contained declarator. For cdk_id, NULL. */ /* Except for cdk_id, the contained declarator. For cdk_id, NULL. */
struct c_declarator *declarator; struct c_declarator *declarator;
location_t id_loc; /* Currently only set for cdk_id, cdk_array. */
union { union {
/* For identifiers, an IDENTIFIER_NODE or NULL_TREE if an abstract /* For identifiers, an IDENTIFIER_NODE or NULL_TREE if an abstract
declarator. */ declarator. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment