1//===-- LangStandards.def - Language Standard Data --------------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9 10#ifndef LANGSTANDARD 11#error "LANGSTANDARD must be defined before including this file" 12#endif 13 14/// LANGSTANDARD(IDENT, NAME, DESC, FEATURES) 15/// 16/// \param IDENT - The name of the standard as a C++ identifier. 17/// \param NAME - The name of the standard. 18/// \param DESC - A short description of the standard. 19/// \param FEATURES - The standard features as flags, these are enums from the 20/// clang::frontend namespace, which is assumed to be be available. 21 22// C89-ish modes. 23LANGSTANDARD(c89, "c89", 24 "ISO C 1990", 25 C89 | ImplicitInt) 26LANGSTANDARD(c90, "c90", 27 "ISO C 1990", 28 C89 | ImplicitInt) 29LANGSTANDARD(iso9899_1990, "iso9899:1990", 30 "ISO C 1990", 31 C89 | ImplicitInt) 32 33LANGSTANDARD(c94, "iso9899:199409", 34 "ISO C 1990 with amendment 1", 35 C89 | Digraphs | ImplicitInt) 36 37LANGSTANDARD(gnu89, "gnu89", 38 "ISO C 1990 with GNU extensions", 39 LineComment | C89 | Digraphs | GNUMode | ImplicitInt) 40LANGSTANDARD(gnu90, "gnu90", 41 "ISO C 1990 with GNU extensions", 42 LineComment | C89 | Digraphs | GNUMode | ImplicitInt) 43 44// C99-ish modes 45LANGSTANDARD(c99, "c99", 46 "ISO C 1999", 47 LineComment | C99 | Digraphs | HexFloat) 48LANGSTANDARD(c9x, "c9x", 49 "ISO C 1999", 50 LineComment | C99 | Digraphs | HexFloat) 51LANGSTANDARD(iso9899_1999, 52 "iso9899:1999", "ISO C 1999", 53 LineComment | C99 | Digraphs | HexFloat) 54LANGSTANDARD(iso9899_199x, 55 "iso9899:199x", "ISO C 1999", 56 LineComment | C99 | Digraphs | HexFloat) 57 58LANGSTANDARD(gnu99, "gnu99", 59 "ISO C 1999 with GNU extensions", 60 LineComment | C99 | Digraphs | GNUMode | HexFloat) 61LANGSTANDARD(gnu9x, "gnu9x", 62 "ISO C 1999 with GNU extensions", 63 LineComment | C99 | Digraphs | GNUMode | HexFloat) 64 65// C11 modes 66LANGSTANDARD(c11, "c11", 67 "ISO C 2011", 68 LineComment | C99 | C11 | Digraphs | HexFloat) 69LANGSTANDARD(c1x, "c1x", 70 "ISO C 2011", 71 LineComment | C99 | C11 | Digraphs | HexFloat) 72LANGSTANDARD(iso9899_2011, 73 "iso9899:2011", "ISO C 2011", 74 LineComment | C99 | C11 | Digraphs | HexFloat) 75LANGSTANDARD(iso9899_201x, 76 "iso9899:2011", "ISO C 2011", 77 LineComment | C99 | C11 | Digraphs | HexFloat) 78 79LANGSTANDARD(gnu11, "gnu11", 80 "ISO C 2011 with GNU extensions", 81 LineComment | C99 | C11 | Digraphs | GNUMode | HexFloat) 82LANGSTANDARD(gnu1x, "gnu1x", 83 "ISO C 2011 with GNU extensions", 84 LineComment | C99 | C11 | Digraphs | GNUMode | HexFloat) 85 86// C++ modes 87LANGSTANDARD(cxx98, "c++98", 88 "ISO C++ 1998 with amendments", 89 LineComment | CPlusPlus | Digraphs) 90LANGSTANDARD(cxx03, "c++03", 91 "ISO C++ 1998 with amendments", 92 LineComment | CPlusPlus | Digraphs) 93LANGSTANDARD(gnucxx98, "gnu++98", 94 "ISO C++ 1998 with amendments and GNU extensions", 95 LineComment | CPlusPlus | Digraphs | GNUMode) 96 97LANGSTANDARD(cxx0x, "c++0x", 98 "ISO C++ 2011 with amendments", 99 LineComment | CPlusPlus | CPlusPlus11 | Digraphs) 100LANGSTANDARD(cxx11, "c++11", 101 "ISO C++ 2011 with amendments", 102 LineComment | CPlusPlus | CPlusPlus11 | Digraphs) 103LANGSTANDARD(gnucxx0x, "gnu++0x", 104 "ISO C++ 2011 with amendments and GNU extensions", 105 LineComment | CPlusPlus | CPlusPlus11 | Digraphs | GNUMode) 106LANGSTANDARD(gnucxx11, "gnu++11", 107 "ISO C++ 2011 with amendments and GNU extensions", 108 LineComment | CPlusPlus | CPlusPlus11 | Digraphs | GNUMode) 109 110LANGSTANDARD(cxx1y, "c++1y", 111 "Working draft for ISO C++ 2014", 112 LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus1y | Digraphs) 113LANGSTANDARD(gnucxx1y, "gnu++1y", 114 "Working draft for ISO C++ 2014 with GNU extensions", 115 LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus1y | Digraphs | 116 GNUMode) 117 118LANGSTANDARD(cxx1z, "c++1z", 119 "Working draft for ISO C++ 2017", 120 LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus1y | CPlusPlus1z | 121 Digraphs) 122LANGSTANDARD(gnucxx1z, "gnu++1z", 123 "Working draft for ISO C++ 2017 with GNU extensions", 124 LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus1y | CPlusPlus1z | 125 Digraphs | GNUMode) 126 127// OpenCL 128LANGSTANDARD(opencl, "cl", 129 "OpenCL 1.0", 130 LineComment | C99 | Digraphs | HexFloat) 131LANGSTANDARD(opencl11, "CL1.1", 132 "OpenCL 1.1", 133 LineComment | C99 | Digraphs | HexFloat) 134LANGSTANDARD(opencl12, "CL1.2", 135 "OpenCL 1.2", 136 LineComment | C99 | Digraphs | HexFloat) 137 138// CUDA 139LANGSTANDARD(cuda, "cuda", 140 "NVIDIA CUDA(tm)", 141 LineComment | CPlusPlus | Digraphs) 142 143#undef LANGSTANDARD 144