aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cgcc
diff options
authorRamsay Jones <ramsay@ramsayjones.plus.com>2018-11-18 23:52:23 +0000
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-11-23 02:45:45 +0100
commitfdf8252f312a40df9aa51c6e30c0d07fa29ebd12 (patch)
treee77718158645c681cd8fc54bd85da457b446aa29 /cgcc
parentcb777d34218842a12ebc3eac9baba3e6fbbd7e13 (diff)
downloadsparse-dev-fdf8252f312a40df9aa51c6e30c0d07fa29ebd12.tar.gz
constant: add -Wconstant-suffix warning
Currently, when used on the kernel, sparse issues a bunch of warnings like: warning: constant 0x100000000 is so big it is long These warning are issued when there is a discrepancy between the type as indicated by the suffix (or the absence of a suffix) and the real type as selected by the type suffix *and* the value of the constant. Since there is nothing incorrect with this discrepancy, (no bits are lost) these warnings are more annoying than useful. So, make them depending on a new warning flag -Wconstant-suffix and make it off by default. Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'cgcc')
-rwxr-xr-xcgcc2
1 files changed, 1 insertions, 1 deletions
diff --git a/cgcc b/cgcc
index 7611dc9f..736cb704 100755
--- a/cgcc
+++ b/cgcc
@@ -101,7 +101,7 @@ exit 0;
sub check_only_option {
my ($arg) = @_;
- return 1 if $arg =~ /^-W(no-?)?(address-space|bitwise|cast-to-as|cast-truncate|context|decl|default-bitfield-sign|designated-init|do-while|enum-mismatch|init-cstring|memcpy-max-count|non-pointer-null|old-initializer|one-bit-signed-bitfield|override-init-all|paren-string|ptr-subtraction-blows|return-void|sizeof-bool|sparse-all|sparse-error|transparent-union|typesign|undef|unknown-attribute)$/;
+ return 1 if $arg =~ /^-W(no-?)?(address-space|bitwise|cast-to-as|cast-truncate|constant-suffix|context|decl|default-bitfield-sign|designated-init|do-while|enum-mismatch|init-cstring|memcpy-max-count|non-pointer-null|old-initializer|one-bit-signed-bitfield|override-init-all|paren-string|ptr-subtraction-blows|return-void|sizeof-bool|sparse-all|sparse-error|transparent-union|typesign|undef|unknown-attribute)$/;
return 1 if $arg =~ /^-v(no-?)?(entry|dead)$/;
return 1 if $arg =~ /^-f(dump-ir|memcpy-max-count|diagnostic-prefix)(=\S*)?$/;
return 1 if $arg =~ /^-f(mem2reg|optim)(-enable|-disable|=last)?$/;