diff options
author | Nicholas Clark <nick@ccl4.org> | 2021-07-18 08:52:10 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2021-10-13 08:09:15 +0200 |
commit | 0c7be120244c1a6aae9b1ae30124265bcb8184da (patch) | |
tree | 5ddb9a542b03a183dfebc8933d87a6c223a191fa /Cross/cflags-cross-arm | |
parent | 1a4dad1b219ee8d6ae6487ddf4e985cdd41279d8 (diff) | |
download | perl-0c7be120244c1a6aae9b1ae30124265bcb8184da.tar.gz |
Teach Configure and cflags.SH about C99
Probe to see whether we need -std=gnu99 or -std=c99 to get C99 code to
compile. In cflags.SH, remove code that added gcc warning flags that were
compatible with C89 but are not compatible with C99.
Diffstat (limited to 'Cross/cflags-cross-arm')
-rw-r--r-- | Cross/cflags-cross-arm | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/Cross/cflags-cross-arm b/Cross/cflags-cross-arm index 93d4f1eaee..4d7f05a4f6 100644 --- a/Cross/cflags-cross-arm +++ b/Cross/cflags-cross-arm @@ -1,9 +1,9 @@ #!/bin/sh # Extra warnings, used e.g. for gcc. -warn="-Wall -ansi -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wc++-compat" +warn="-Wall -W -Wextra -Wendif-labels -Wc++-compat" # Extra standardness. -stdflags=" -std=c89" +stdflags=" -std=c99" # Extra extra. extra="" @@ -113,18 +113,6 @@ for file do case "$cc" in *g++*) - # Extra paranoia in case people have bad canned ccflags: - # bad in the sense that the flags are accepted by g++, - # but then whined about. - for f in -Wdeclaration-after-statement -std=c89 - do - ccflags=`echo $ccflags|sed 's/$f/ /'` - done - ;; -esac - -case "$cc" in -*g++*) # Without -Wno-unused-variable g++ 4.x compiles are rather unwatchable # because of all the warnings about Perl___notused, and g++ doesn't do # __attribute__((unused)) (and even if at some stage it may, people do |