[PATCH] Add support for -funsigned-bitfields

Richard Smith metafoo at gmail.com
Tue Jan 28 13:10:45 PST 2014


On Tue Jan 28 2014 at 6:11:13 AM, Tim Northover <t.p.northover at gmail.com>
wrote:

> Hi Artyom,
>
> > C++1y does indeed forbid such implementation, so the flag will need to be
> > rejected in -std=c++1y
>
> I'm sure Richard will be along with the full details later, but as I
> recall we apply Defect Reports on the language (as opposed to
> features) retroactively, on the grounds that the original standard was
> broken in such cases.
>
> This one comes from
> http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#739,
> which makes it fairly clear there would be serious issues with
> allowing it.
>

Exactly so: this was a bug in every revision of C++, and our C++98 and
C++11 modes track the base standard *plus all relevant defect reports*. The
intent of the committee was that this should never have been allowed in C++.

On Tue Jan 28 2014 at 5:52:28 AM, Artyom Skrobov <Artyom.Skrobov at arm.com>
wrote:

> > What is the motivation for allowing this?
>
> Compatibility with GCC and other compilers that allow both options.


Compatibility with GCC is a means to an end -- we primarily aim to be
compatible with GCC in order to make it easy for people to move code
between GCC and Clang. Is there some particular code that relies on this?
Is there a good reason to think it's better to implement this feature in
Clang rather than fixing the code that relies on it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140128/adef8456/attachment.html>


More information about the cfe-commits mailing list