aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaType.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r--lib/Sema/SemaType.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp
index e898782f31..00bfb13561 100644
--- a/lib/Sema/SemaType.cpp
+++ b/lib/Sema/SemaType.cpp
@@ -170,8 +170,11 @@ QualType Sema::ConvertDeclSpecToType(const DeclSpec &DS) {
}
// Handle complex types.
- if (DS.getTypeSpecComplex() == DeclSpec::TSC_complex)
+ if (DS.getTypeSpecComplex() == DeclSpec::TSC_complex) {
+ if (getLangOptions().Freestanding)
+ Diag(DS.getTypeSpecComplexLoc(), diag::ext_freestanding_complex);
Result = Context.getComplexType(Result);
+ }
assert(DS.getTypeSpecComplex() != DeclSpec::TSC_imaginary &&
"FIXME: imaginary types not supported yet!");