summaryrefslogtreecommitdiffstats
path: root/clang/test/Headers/stdbool.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add -fgnuc-version= to control __GNUC__ and other GCC macrosReid Kleckner2019-10-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed that compiling on Windows with -fno-ms-compatibility had the side effect of defining __GNUC__, along with __GNUG__, __GXX_RTTI__, and a number of other macros for GCC compatibility. This is undesirable and causes Chromium to do things like mix __attribute__ and __declspec, which doesn't work. We should have a positive language option to enable GCC compatibility features so that we can experiment with -fno-ms-compatibility on Windows. This change adds -fgnuc-version= to be that option. My issue aside, users have, for a long time, reported that __GNUC__ doesn't match their expectations in one way or another. We have encouraged users to migrate code away from this macro, but new code continues to be written assuming a GCC-only environment. There's really nothing we can do to stop that. By adding this flag, we can allow them to choose their own adventure with __GNUC__. This overlaps a bit with the "GNUMode" language option from -std=gnu*. The gnu language mode tends to enable non-conforming behaviors that we'd rather not enable by default, but the we want to set things like __GXX_RTTI__ by default, so I've kept these separate. Helps address PR42817 Reviewed By: hans, nickdesaulniers, MaskRay Differential Revision: https://reviews.llvm.org/D68055 llvm-svn: 374449
* In stdbool.h, define bool, false, true only in gnu++98Stephan Bergmann2017-12-081-5/+11
| | | | | | | | | | GCC has meanwhile corrected that with the similar <https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=216679> "C++11 explicitly forbids macros for bool, true and false." Differential Revision: https://reviews.llvm.org/D40167 llvm-svn: 320135
* Reinstate r173952, this time limiting it to exactly the formDouglas Gregor2013-01-301-0/+5
| | | | | | | | #define X X for which there is no point warning, ever. llvm-svn: 173991
* Revert "[preprocessor] Don't warn about "disabled expansion of recursive macro""Argyrios Kyrtzidis2013-01-301-5/+0
| | | | | | This reverts commit r173952 llvm-svn: 173970
* [preprocessor] Don't warn about "disabled expansion of recursive macro"Argyrios Kyrtzidis2013-01-301-0/+5
| | | | | | | | | for "#define X X". This is a pattern that, for example, stdbool.h uses. rdar://12435773 llvm-svn: 173952
* Define _Bool, bool, true, and false macros in <stdbool.h> when we'reDouglas Gregor2010-09-291-0/+14
in a GNU-compatible C++ dialect. Fixes <rdar://problem/8477819>. llvm-svn: 115028
OpenPOWER on IntegriCloud