> Please add UNKNOWN_ABI to the enum and initialize -mabi in i386.opt to > UNKNOWN_ABI.
It would seem to me that UNSPECIFIED_ABI would be a better value name. Also, I don't really understand what opts_set and opts are, except that I had guessed opts_set is what the user asked for (or didn't ask for) and opts is what we're going to actually use. Am I close? I'm re-running tests, so if they pass is this OK? Thanks, Daniel --- gcc/config/i386/i386-opts.h | 5 +++-- gcc/config/i386/i386.c | 3 +-- gcc/config/i386/i386.opt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gcc/config/i386/i386-opts.h b/gcc/config/i386/i386-opts.h index 542cd0f3d67..a1d1552a3c6 100644 --- a/gcc/config/i386/i386-opts.h +++ b/gcc/config/i386/i386-opts.h @@ -44,8 +44,9 @@ last_alg /* Available call abi. */ enum calling_abi { - SYSV_ABI = 0, - MS_ABI = 1 + UNSPECIFIED_ABI = 0, + SYSV_ABI = 1, + MS_ABI = 2 }; enum fpmath_unit diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 650bcbc65ae..c08ad55fcd9 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -5681,12 +5681,11 @@ ix86_option_override_internal (bool main_args_p, opts->x_ix86_pmode = TARGET_LP64_P (opts->x_ix86_isa_flags) ? PMODE_DI : PMODE_SI; - if (!opts_set->x_ix86_abi) + if (opts_set->x_ix86_abi == UNSPECIFIED_ABI) opts->x_ix86_abi = DEFAULT_ABI; if (opts->x_ix86_abi == MS_ABI && TARGET_X32_P (opts->x_ix86_isa_flags)) error ("-mabi=ms not supported with X32 ABI"); - gcc_assert (opts->x_ix86_abi == SYSV_ABI || opts->x_ix86_abi == MS_ABI); /* For targets using ms ABI enable ms-extensions, if not explicit turned off. For non-ms ABI we turn off this diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt index cd564315f04..f7b9f9707f7 100644 --- a/gcc/config/i386/i386.opt +++ b/gcc/config/i386/i386.opt @@ -525,7 +525,7 @@ Target Report Mask(IAMCU) Generate code that conforms to Intel MCU psABI. mabi= -Target RejectNegative Joined Var(ix86_abi) Enum(calling_abi) Init(SYSV_ABI) +Target RejectNegative Joined Var(ix86_abi) Enum(calling_abi) Init(UNSPECIFIED_ABI) Generate code that conforms to the given ABI. Enum -- 2.13.3