diff options
author | pbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-11 16:23:44 +0000 |
---|---|---|
committer | pbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-11 16:23:44 +0000 |
commit | 5bf3fee3b9aa5fdd76bbbdfc6026e06f09d3de3b (patch) | |
tree | 13945cec14cd33eb090b36403f640a7b0262c5c5 /gcc | |
parent | 40cf39ed314891d00ef2bfdbd6502142deeb4c20 (diff) | |
download | gcc-5bf3fee3b9aa5fdd76bbbdfc6026e06f09d3de3b.tar.gz |
* flags.h (flag_short_enums): Update comment.
* opts.c (decode_options): Set flag_short_enums to 2.
* toplev.c (flag_short_enums): Update comment.
(process_options): Call default_short_enums target hook.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81704 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/flags.h | 3 | ||||
-rw-r--r-- | gcc/opts.c | 5 | ||||
-rw-r--r-- | gcc/toplev.c | 6 |
4 files changed, 17 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2eaecd09ecb..6a84fb677eb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2004-05-11 Paul Brook <paul@codesourcery.com> + + * flags.h (flag_short_enums): Update comment. + * opts.c (decode_options): Set flag_short_enums to 2. + * toplev.c (flag_short_enums): Update comment. + (process_options): Call default_short_enums target hook. + 2004-05-11 Andrew Pinski <pinskia@gcc.gnu.org> PR target/14063 diff --git a/gcc/flags.h b/gcc/flags.h index b4fc10d7f90..458b2e9432f 100644 --- a/gcc/flags.h +++ b/gcc/flags.h @@ -244,7 +244,8 @@ extern int flag_print_asm_name; extern int flag_signed_char; -/* Nonzero means give an enum type only as many bytes as it needs. */ +/* Nonzero means give an enum type only as many bytes as it needs. A value + of 2 means it has not yet been initialized. */ extern int flag_short_enums; diff --git a/gcc/opts.c b/gcc/opts.c index b0ede80e610..4cf4446fdb5 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -604,8 +604,9 @@ decode_options (unsigned int argc, const char **argv) /* Initialize whether `char' is signed. */ flag_signed_char = DEFAULT_SIGNED_CHAR; - /* Initialize how much space enums occupy, by default. */ - flag_short_enums = targetm.default_short_enums (); + /* Set this to a special "uninitialized" value. The actual default is set + after target options have been processed. */ + flag_short_enums = 2; /* Initialize target_flags before OPTIMIZATION_OPTIONS so the latter can modify it. */ diff --git a/gcc/toplev.c b/gcc/toplev.c index d96543d0d15..046501846f2 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -314,7 +314,8 @@ unsigned local_tick; int flag_signed_char; -/* Nonzero means give an enum type only as many bytes as it needs. */ +/* Nonzero means give an enum type only as many bytes as it needs. A value + of 2 means it has not yet been initialized. */ int flag_short_enums; @@ -2232,6 +2233,9 @@ process_options (void) OVERRIDE_OPTIONS; #endif + if (flag_short_enums == 2) + flag_short_enums = targetm.default_short_enums (); + /* Set aux_base_name if not already set. */ if (aux_base_name) ; |