This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [ping] Re: [patch 0/4] reimplement -fstrict-volatile-bitfields, v3
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- Cc: Sandra Loosemore <sandra at codesourcery dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Andrew Pinski <pinskia at gmail dot com>, DJ Delorie <dj at redhat dot com>, Richard Biener <richard dot guenther at gmail dot com>, Eric Botcazou <ebotcazou at adacore dot com>
- Date: Tue, 16 Jul 2013 19:00:43 -0400 (EDT)
- Subject: RE: [ping] Re: [patch 0/4] reimplement -fstrict-volatile-bitfields, v3
- References: <51D0F66B dot 6010507 at codesourcery dot com>,<51DC390E dot 9070904 at codesourcery dot com> <DUB124-W28AB7B318A6EE4701ECED7E4650 at phx dot gbl>
On Sat, 13 Jul 2013, Bernd Edlinger wrote:
> Hi Sandra,
>
> On Fri, 5 Jul 2013, Hans-Peter Nilsson wrote
> > Or - maybe more acceptable - an optional warning, say
> > -Wportable-volatility, to warn about code for which separate
> > incompatbile definitions on different platforms (or between C
> > and C++) exist even within gcc. It would be usable for driver
> > code you want to be usable on different architectures, say, in
> > an OS commonly compiled with gcc, if you can think of some. :)
>
>
> I like this idea, and this warning would add some real value for everyone.
> Therefore I added that option as part 5 of this patch series, I hope you don't mind :)
Definitely not. Thanks for picking up the ball!
> I really hope that the GCC maintainers can accept this patch now, as the
> current state of -fstrict-volatile-bitfields is very painful to all of us.
I guess I should offer a first-hand review of the warnings part.
I've got nothing on the code, however the documentation ties the
warning only to -fstrict-volatile-bitfields, which it shouldn't;
it should be stated generic, but perhaps with
-fstrict-volatile-bitfields as an *example*. (And for those who
now feel the need to say "but volatile behavior is undefined"
without reading the rest of the thread, remember that this is
intended to cover cases where some definition actually *exist*
whether in some language standard or some target-specific ABI
document.)
It also needs test-cases, both for some positive cases (warning
hits) and some case where it doesn't (and shouldn't).
...and ChangeLog entries.
Thanks again!
brgds, H-P