diff options
author | Trevor Saunders <tbsaunde+binutils@tbsaunde.org> | 2016-03-25 15:43:13 -0400 |
---|---|---|
committer | Trevor Saunders <tbsaunde+binutils@tbsaunde.org> | 2016-03-25 20:24:57 -0400 |
commit | a90fb5e33ba890eb9427b9ba3d529729b018b474 (patch) | |
tree | 9ab61cd16039e26911d3c157f2ed5b82d0b8ca89 | |
parent | 099b880550fc1b7e1090c31e8dfb77ca1e2f07ad (diff) | |
download | gdb-a90fb5e33ba890eb9427b9ba3d529729b018b474.zip gdb-a90fb5e33ba890eb9427b9ba3d529729b018b474.tar.gz gdb-a90fb5e33ba890eb9427b9ba3d529729b018b474.tar.bz2 |
rename flag_size_check to flag_allow_nonconst_size and make it a bool
This name describes what the variable means slightly better, and the enum with
two values that is only used for this one variable is kind of silly.
gas/ChangeLog:
2016-03-25 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* as.c (parse_args): Adjust.
* as.h (flag_size_check): Rename to flag_allow_nonconst_size.
* config/obj-elf.c (elf_frob_symbol): Adjust.
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/as.c | 4 | ||||
-rw-r--r-- | gas/as.h | 7 | ||||
-rw-r--r-- | gas/config/obj-elf.c | 2 |
4 files changed, 10 insertions, 9 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 493d779..0ab2718 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2016-03-25 Trevor Saunders <tbsaunde+binutils@tbsaunde.org> + + * as.c (parse_args): Adjust. + * as.h (flag_size_check): Rename to flag_allow_nonconst_size. + * config/obj-elf.c (elf_frob_symbol): Adjust. + 2016-03-24 Jose E. Marchesi <jose.marchesi@oracle.com> * config/tc-sparc.c (sparc_ip): Remove the V9 restriction on ASR @@ -870,9 +870,9 @@ This program has absolutely no warranty.\n")); case OPTION_SIZE_CHECK: if (strcasecmp (optarg, "error") == 0) - flag_size_check = size_check_error; + flag_allow_nonconst_size = FALSE; else if (strcasecmp (optarg, "warning") == 0) - flag_size_check = size_check_warning; + flag_allow_nonconst_size = TRUE; else as_fatal (_("Invalid --size-check= option: `%s'"), optarg); break; @@ -585,12 +585,7 @@ COMMON const char * found_comment_file; #if defined OBJ_ELF || defined OBJ_MAYBE_ELF /* If .size directive failure should be error or warning. */ -COMMON enum - { - size_check_error = 0, - size_check_warning - } -flag_size_check; +COMMON int flag_allow_nonconst_size; /* If we should generate ELF common symbols with the STT_COMMON type. */ extern int flag_use_elf_stt_common; diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index bacaca3..c7a4ee4 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -2165,7 +2165,7 @@ elf_frob_symbol (symbolS *symp, int *puntp) S_SET_SIZE (symp, size->X_add_number); else { - if (flag_size_check == size_check_error) + if (!flag_allow_nonconst_size) as_bad (_(".size expression for %s " "does not evaluate to a constant"), S_GET_NAME (symp)); else |