This is the mail archive of the
mailing list for the GCC project.
Re: [patch 4/4] -fstrict-volatile-bitfields cleanup v3: remove from defaults on all targets
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: DJ Delorie <dj at redhat dot com>, Sandra Loosemore <sandra at codesourcery dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 5 Jul 2013 08:14:25 -0400 (EDT)
- Subject: Re: [patch 4/4] -fstrict-volatile-bitfields cleanup v3: remove from defaults on all targets
- References: <51D0F6A0 dot 4010307 at codesourcery dot com> <201307010332 dot r613WeJJ017250 at greed dot delorie dot com> <CA+=Sn1nhZJLNd+b6heddf6_QKDPk5Lr-Um8WfMn=rkjQxy4Jkg at mail dot gmail dot com>
On Mon, 1 Jul 2013, Andrew Pinski wrote:
> On Sun, Jun 30, 2013 at 8:32 PM, DJ Delorie <firstname.lastname@example.org> wrote:
> > Given how much trouble I went through to make it the default, I'd
> > rather not revert all that work... especially since the flag is
> > *required* for proper operation of the hardware on many of these
> > targets.
> > This patch will, or course, silently and obscurely break existing
> > code.
> And without the patch will break silently existing valid C11/C++11
> code on many targets. This is the whole point of the patch to follow
> the C/C++ standard here rather than breaking valid code.
> I rather see volatile on bitfields becoming an error rather than
> either of these patches.
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. :)
PS. Sorry, not currently planning on this.