accept (but warn) '_Complex' without additional specifiers
authorMatthias Braun <matze@braunis.de>
Tue, 11 Dec 2012 10:07:28 +0000 (11:07 +0100)
committerMatthias Braun <matze@braunis.de>
Tue, 11 Dec 2012 10:17:17 +0000 (11:17 +0100)
parser.c

index 470e36c..830d08f 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -3009,6 +3009,10 @@ warn_about_long_long:
                                                errorf(pos, "no type specifiers given in declaration");
                                        }
                                }
+                       } else if (type_specifiers == SPECIFIER_COMPLEX) {
+                               warningf(WARN_OTHER, pos, "_Complex requires a type specifier; assuming '_Complex double'");
+                               atomic_type = ATOMIC_TYPE_DOUBLE;
+                               break;
                        } else if ((type_specifiers & SPECIFIER_SIGNED) &&
                                  (type_specifiers & SPECIFIER_UNSIGNED)) {
                                errorf(pos, "signed and unsigned specifiers given");