[cfe-dev] RFC: switch default C language mode from gnu99 to gnu11
Richard Smith
richard at metafoo.co.uk
Thu Oct 16 12:58:51 PDT 2014
I have an additional suggestion: we treat tests that do not explicitly
specify a language standard as testing *all* language modes. By default, we
continue to run them only in the default language mode of the clang driver,
but we:
-- Add a driver and cc1 flag to set a default language mode for each
language
-- Add a buildbot that runs all tests with the default language mode set
to each possible value
This will prevent us from losing most of our C99 test coverage when we
switch our default (and would also prevent us from losing most of our C++98
test coverage if/when we switch our default C++ language mode to C++11).
The added driver flag might also be useful to people who aren't ready for
our new default yet.
For the new flag, how about -std-default=c99 ?
On Thu, Oct 16, 2014 at 5:10 AM, Aaron Ballman <aaron at aaronballman.com>
wrote:
> On Wed, Oct 15, 2014 at 6:22 PM, Richard Smith <richard at metafoo.co.uk>
> wrote:
> > I'd like to switch the default language mode for C compilations from
> gnu99
> > to gnu11. The only effect of this change would be to turn some extension
> > warnings off, change the default value of __STDC_VERSION__, and change
> the
> > default value of some __has_feature(...) checks; we allow all of C11 as
> an
> > extension in C99 mode anyway.
> >
> > Also of note: GCC trunk just switched from C89 to C11 by default.
>
> +1
>
> ~Aaron
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20141016/f23cfa5b/attachment.html>
More information about the cfe-dev
mailing list