Skip to content

Commit 5520015

Browse files
Address review comments, only adjusts G++/None
1 parent ee7fb2a commit 5520015

File tree

2 files changed

+6
-70
lines changed

2 files changed

+6
-70
lines changed

tools/warnings/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
These are the warning options for the compiler at different levels.
22

3-
Because GCC 10 produces code which crashes when a function is declared
4-
to return a value but doesn't (this is undefined per the C specs), we
3+
Because G++ 10 produces code which crashes when a function is declared
4+
to return a value but doesn't (this is undefined per the C++ specs, but legal
5+
for C11 and above code as long as the [non]returned value is ignored), we
56
cannot warn them if we use "-w" to disable all warnings, and instead have
6-
to delete every warning but "-Wfunction-return"
7+
to delete every warning but "-Wreturn-type"
78

8-
Generate the "-none" versions with the following command:
9+
Generate the "none-g++" file with the following command:
910
````
10-
./tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc --help=warnings -Q | grep '\[enabled\]' | grep -v 'return-type' | awk '{print $1}' | sed 's/-W/-Wno-/' | grep -v = | grep -v -- -f > tools/warnings/none-gcc
1111
./tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc --help=warnings -Q | grep '\[enabled\]' | grep -v 'return-type' | awk '{print $1}' | sed 's/-W/-Wno-/' | grep -v = | grep -v -- -f | egrep -v '(c11-c2x-compat|c90-c99-compat|c99-c11-compat|declaration-after-statement|designated-init|discarded-array-qualifiers|discarded-qualifiers|implicit-int|incompatible-pointer-types|int-conversion|old-style-definition|override-init-side-effects|pointer-to-int-cast)' > tools/warnings/none-g++
1212
````

tools/warnings/none-gcc

+1-65
Original file line numberDiff line numberDiff line change
@@ -1,65 +1 @@
1-
-Wno-address-of-packed-member
2-
-Wno-aggressive-loop-optimizations
3-
-Wno-analyzer-malloc-leak
4-
-Wno-analyzer-null-argument
5-
-Wno-analyzer-null-dereference
6-
-Wno-analyzer-possible-null-argument
7-
-Wno-analyzer-possible-null-dereference
8-
-Wno-analyzer-stale-setjmp-buffer
9-
-Wno-analyzer-tainted-array-index
10-
-Wno-analyzer-unsafe-call-within-signal-handler
11-
-Wno-attribute-warning
12-
-Wno-attributes
13-
-Wno-builtin-declaration-mismatch
14-
-Wno-builtin-macro-redefined
15-
-Wno-c11-c2x-compat
16-
-Wno-c90-c99-compat
17-
-Wno-c99-c11-compat
18-
-Wno-cannot-profile
19-
-Wno-coverage-mismatch
20-
-Wno-cpp
21-
-Wno-declaration-after-statement
22-
-Wno-deprecated
23-
-Wno-deprecated-declarations
24-
-Wno-designated-init
25-
-Wno-discarded-array-qualifiers
26-
-Wno-discarded-qualifiers
27-
-Wno-div-by-zero
28-
-Wno-endif-labels
29-
-Wno-enum-compare
30-
-Wno-hsa
31-
-Wno-if-not-aligned
32-
-Wno-ignored-attributes
33-
-Wno-implicit-int
34-
-Wno-incompatible-pointer-types
35-
-Wno-int-conversion
36-
-Wno-int-to-pointer-cast
37-
-Wno-invalid-memory-model
38-
-Wno-long-long
39-
-Wno-lto-type-mismatch
40-
-Wno-main
41-
-Wno-missing-profile
42-
-Wno-narrowing
43-
-Wno-odr
44-
-Wno-old-style-definition
45-
-Wno-overflow
46-
-Wno-override-init-side-effects
47-
-Wno-packed-bitfield-compat
48-
-Wno-pointer-compare
49-
-Wno-pointer-to-int-cast
50-
-Wno-pragmas
51-
-Wno-prio-ctor-dtor
52-
-Wno-psabi
53-
-Wno-return-local-addr
54-
-Wno-shift-count-negative
55-
-Wno-shift-count-overflow
56-
-Wno-shift-negative-value
57-
-Wno-sizeof-array-argument
58-
-Wno-switch-bool
59-
-Wno-switch-outside-range
60-
-Wno-switch-unreachable
61-
-Wno-sync-nand
62-
-Wno-trigraphs
63-
-Wno-unused-result
64-
-Wno-varargs
65-
-Wno-vla
1+
-w

0 commit comments

Comments
 (0)