[PATCH] D18708: Set C99 as default C Standard for PS4 target

Warren Ristow via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 5 15:22:49 PDT 2016


wristow added a subscriber: wristow.
wristow added a comment.

In http://reviews.llvm.org/D18708#390183, @dyung wrote:

> In http://reviews.llvm.org/D18708#390166, @rsmith wrote:
>
> > In http://reviews.llvm.org/D18708#390150, @dyung wrote:
> >
> > > From my understanding, there are 2 issues that block us. The first is that we currently do not ship all of the header files for C11. The second is that we do not yet fully have C11 library support yet for our platform.
> >
> >
> > How do things go wrong if Clang is used in C11 mode against a C99 library? Do you have code that conditionally uses C11 library features if they're available? (And thanks for explaining, by the way; this is useful information for when we next consider changing the default language mode -- we'll likely be changing the default C++ language mode soon.)
> >
> > Anyway, it seems reasonable for the PS4 toolchain to control its defaults here, and the patch itself LGTM.
>
>
> My understanding is that we currently do not ship all of the headers required for C11, so if users tried to use anything from those, they would be unable to do so. I am also under the impression that C11 requires some library support which we do not yet provide.


To confirm and more directly answer your questions, we haven't encountered any situations where things have gone wrong when compiling in C11 mode against a C99 library.  As far as we're aware, Clang doesn't have any problems in that area (e.g., we don't know of any situations where Clang in C11 mode is rejecting valid C99 code).  We're just being conservative, in that since we don't provide C11 libraries and headers (and therefore we officially tell our customers we don't support C11), we don't want to run into situations where customers might conditionally enable a C11 library feature.  We may revisit that approach sometime in the future depending on customer demand for C11 features, but at this point, we're defaulting to C99 just to be conservative.


Repository:
  rL LLVM

http://reviews.llvm.org/D18708





More information about the cfe-commits mailing list