options: Remove 'gcc/c-family/c.opt:Warray-bounds' option definition record (was: committed: remove redundant -Wall from -Warray-bounds (PR 82063))
Commit Message
Hi!
On 2018-07-20T15:22:23-0600, Martin Sebor <msebor@gmail.com> wrote:
> As the last observation in PR 82063 Jim points out that
>
> Both -Warray-bounds and -Warray-bounds= are listed in the c.opt
> file as being enabled by -Wall, but they are the same option,
> and it causes this one option to be processed twice in the
> C_handle_option_auto function in the generated options.c file.
> It gets set to the same value twice, so it does work as intended,
> but this is wasteful.
>
> I have removed the redundant -Wall from the first option and
> committed the change as obvious in r262912.
That's r262912/commit 0d7f90652080c42cddca6f9b68f6895218c70880
"PR middle-end/82063 - issues with arguments enabled by -Wall":
| --- gcc/c-family/c.opt
| +++ gcc/c-family/c.opt
| [...]
| Warray-bounds
| -LangEnabledBy(C ObjC C++ LTO ObjC++,Wall)
| +LangEnabledBy(C ObjC C++ LTO ObjC++)
| ; in common.opt
|
| Warray-bounds=
OK to push the attached "options: Remove
'gcc/c-family/c.opt:Warray-bounds' option definition record"?
Grüße
Thomas
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
Comments
On Tue, 29 Mar 2022, Thomas Schwinge wrote:
> | --- gcc/c-family/c.opt
> | +++ gcc/c-family/c.opt
> | [...]
> | Warray-bounds
> | -LangEnabledBy(C ObjC C++ LTO ObjC++,Wall)
> | +LangEnabledBy(C ObjC C++ LTO ObjC++)
> | ; in common.opt
> |
> | Warray-bounds=
>
> OK to push the attached "options: Remove
> 'gcc/c-family/c.opt:Warray-bounds' option definition record"?
OK.
From 15b8d3d6265529bcab74c81b742cd4d1ef2ef37b Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
Date: Thu, 24 Mar 2022 22:17:23 +0100
Subject: [PATCH] options: Remove 'gcc/c-family/c.opt:Warray-bounds' option
definition record
A one-argument form of the 'LangEnabledBy' option property isn't defined,
and effectively appears to be a no-op. Removing that one, the
'gcc/c-family/c.opt:Warray-bounds' option definition record becomes empty,
and doesn't add anything over 'gcc/common.opt:Warray-bounds', and may thus
be removed entirely. This only changes 'build-gcc/gcc/optionlist'
accordingly, but no other generated files.
Clean-up after r262912/commit 0d7f90652080c42cddca6f9b68f6895218c70880
"PR middle-end/82063 - issues with arguments enabled by -Wall".
gcc/c-family/
* c.opt (Warray-bounds): Remove.
---
gcc/c-family/c.opt | 4 ----
1 file changed, 4 deletions(-)
@@ -342,10 +342,6 @@ Wno-alloca-larger-than
C ObjC C++ LTO ObjC++ Alias(Walloca-larger-than=,18446744073709551615EiB,none) Warning
Disable Walloca-larger-than= warning. Equivalent to Walloca-larger-than=<SIZE_MAX> or larger.
-Warray-bounds
-LangEnabledBy(C ObjC C++ LTO ObjC++)
-; in common.opt
-
Warray-bounds=
LangEnabledBy(C ObjC C++ LTO ObjC++,Wall,1,0)
; in common.opt
--
2.25.1