aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-09-11 00:18:58 +0000
committerDouglas Gregor <dgregor@apple.com>2009-09-11 00:18:58 +0000
commit043cad21b78c6b02597cdc7b6ead32388e27ebc7 (patch)
treead0022b00750e4610ff168ab898cdb6fa1c4903a /include/clang/Basic
parent8b26cbd4e4c01cb7a06ec2f794f2fce3b58cf4d0 (diff)
Diagnose VLAs as an error in C++.
Also, treat the GNU __null as an integral constant expression to match GCC's behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81490 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic')
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index c9bfaaf55b..f9f2f15af0 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -67,6 +67,9 @@ def ext_flexible_array_init : Extension<
// Declarations.
def ext_vla : Extension<
"variable length arrays are a C99 feature, accepted as an extension">;
+def err_vla_cxx : Error<
+ "variable length arrays are not permitted in C++">;
+
def ext_anon_param_requires_type_specifier : Extension<
"type specifier required for unnamed parameter, defaults to int">;
def err_bad_variable_name : Error<
@@ -2135,6 +2138,9 @@ def err_objc_array_of_interfaces : Error<
"array of interface %0 is invalid (probably should be an array of pointers)">;
def ext_c99_array_usage : Extension<
"use of C99-specific array features, accepted as an extension">;
+def err_c99_array_usage_cxx : Error<
+ "C99-specific array features are not permitted in C++">;
+
def err_invalid_protocol_qualifiers : Error<
"invalid protocol qualifiers on non-ObjC type">;
def warn_ivar_use_hidden : Warning<