From 0a1a45dbf47c4581f8f9dd9a8e6053a93680f9dc Mon Sep 17 00:00:00 2001 From: Andy Fiddaman Date: Sat, 11 Apr 2020 12:03:20 +0000 Subject: Convert unsupported use of -msave-args to a warning --- gcc/config/i386/i386-options.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/config/i386/i386-options.cc b/gcc/config/i386/i386-options.cc index 2ef4cb7e521a..cd90e6edb6c2 100644 --- a/gcc/config/i386/i386-options.cc +++ b/gcc/config/i386/i386-options.cc @@ -2766,8 +2766,10 @@ ix86_option_override_internal (bool main_args_p, &= ~(OPTION_MASK_ISA2_AVX5124FMAPS | OPTION_MASK_ISA2_AVX5124VNNIW); } - if (!TARGET_64BIT_P (opts->x_ix86_isa_flags) && TARGET_SAVE_ARGS) - error ("-msave-args only works in x32 or 64-bit mode"); + if (!TARGET_64BIT_P (opts->x_ix86_isa_flags) && TARGET_SAVE_ARGS) { + warning (0, "-msave-args only works in x32 or 64-bit mode; ignoring"); + opts->x_ix86_target_flags &= ~OPTION_MASK_SAVE_ARGS; + } /* Validate -mpreferred-stack-boundary= value or default it to PREFERRED_STACK_BOUNDARY_DEFAULT. */