Re: -Wshift-negative-value
Bruno Haible <[email protected]>
| Newsgroups | gmane.lisp.clisp.devel |
|---|---|
| Message-ID | <1544147.FjOscAmga6@omega> |
Hi Sam,
> >> > As I said on 2017-02-08, diagnostics from -Wshift-negative-value are
> >> > most probably just noise.
> >>
> >> Why not disable them then?
> >
> > Feel free to do so. Good idea.
>
> Done.
On OpenBSD 6, with gcc 4.2.1, I now get the build error:
cc1: error: unrecognized command line option "-Wno-shift-negative-value"
Please, can you limit the use of this option to the compilers that support it?
Just tried it (I have all gcc releases installed separately): it's supported
starting with gcc 4.4.0, unsupported for older versions.
Using the same idiom that I used to protect the use of -Wno-invalid-offsetof:
# g++ 3.4 introduced an annoying warning, but has a workaround:
case "$XCC_GCC_VERSION" in
2.* | 3.[1-3]*) ;;
*)
XCFLAGS=$XCFLAGS' -Wno-invalid-offsetof'
;;
esac
Btw, why did you remove this version check? It is needed:
$ /arch/x86-linux/gnu-inst-gcc/3.4.4/bin/gcc -x c++ -Wno-invalid-offsetof -S hello.c
succeeds but
$ /arch/x86-linux/gnu-inst-gcc/3.3.6/bin/gcc -x c++ -Wno-invalid-offsetof -S hello.c
cc1plus: error: unrecognized option `-Wno-invalid-offsetof'
I tend to assume a gcc version >= 3.1.
Bruno
------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
clisp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-devel