aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2023-03-24 09:57:33 +0100
committerRichard Biener <rguenther@suse.de>2023-03-28 08:52:01 +0200
commitcc4b7d6bb3b1ec6c52aa6bce1c892218d4c1a2f4 (patch)
tree4c2f2c89fd824b8bb39b78135f4b753c0a64776b /gcc
parentc4d61d3186b5f3db1f4823127ab11b5ff465a872 (diff)
downloadgcc-cc4b7d6bb3b1ec6c52aa6bce1c892218d4c1a2f4.zip
gcc-cc4b7d6bb3b1ec6c52aa6bce1c892218d4c1a2f4.tar.gz
gcc-cc4b7d6bb3b1ec6c52aa6bce1c892218d4c1a2f4.tar.bz2
Disallow -gno-dwarf, gno-dwarf-N, -gno-gdb and -gno-vms
The following adds RejectNegative to the gdwarf, gdwarf-, ggdb and gvms options since the current behavior is to treat the negative variant the same as the positive variant. In particular -ggdb -gno-gdb do not cancel, and plain -gno-dwarf will enable (dwarf!) debug output. Rejecting the negative forms avoids interpreting sensible behavior to combinations of options like -gdwarf-5 -gno-dwarf-3 and sticks to the behavior that later -g options simply override earlier ones and the only negative form is -g0. * common.opt (gdwarf): Add RejectNegative. (gdwarf-): Likewise. (ggdb): Likewise. (gvms): Likewise.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/common.opt8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/common.opt b/gcc/common.opt
index e558385..4546acb 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -3349,11 +3349,11 @@ Common Driver RejectNegative JoinedOrMissing
Generate BTF debug information at default level.
gdwarf
-Common Driver JoinedOrMissing Negative(gdwarf-)
+Common Driver JoinedOrMissing Negative(gdwarf-) RejectNegative
Generate debug information in default version of DWARF format.
gdwarf-
-Common Driver Joined UInteger Var(dwarf_version) Init(DWARF_VERSION_DEFAULT)
+Common Driver Joined UInteger Var(dwarf_version) Init(DWARF_VERSION_DEFAULT) RejectNegative
Generate debug information in DWARF v2 (or later) format.
gdwarf32
@@ -3365,7 +3365,7 @@ Common Driver Var(dwarf_offset_size,8) RejectNegative
Use 64-bit DWARF format when emitting DWARF debug information.
ggdb
-Common Driver JoinedOrMissing
+Common Driver JoinedOrMissing RejectNegative
Generate debug information in default extended format.
ginline-points
@@ -3432,7 +3432,7 @@ gvariable-location-views=incompat5
Common Driver RejectNegative Var(debug_variable_location_views, -1) Init(2)
gvms
-Common Driver JoinedOrMissing
+Common Driver JoinedOrMissing RejectNegative
Generate debug information in VMS format.
gxcoff