* c-common.c (enum rid): Add RID_IMAGINARY.
testsuite:
* gcc.dg/c99-complex-3.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147075
138bc75d-0d04-0410-961f-
82ee72b054a4
+2009-05-03 Joseph Myers <joseph@codesourcery.com>
+
+ * c-common.c (reswords): Add _Imaginary.
+ * c-common.c (enum rid): Add RID_IMAGINARY.
+
2009-05-03 Paolo Bonzini <bonzini@gnu.org>
* tree.h (TYPE_VECTOR_OPAQUE): Fix documentation.
{
{ "_Bool", RID_BOOL, D_CONLY },
{ "_Complex", RID_COMPLEX, 0 },
+ { "_Imaginary", RID_IMAGINARY, D_CONLY },
{ "_Decimal32", RID_DFLOAT32, D_CONLY | D_EXT },
{ "_Decimal64", RID_DFLOAT64, D_CONLY | D_EXT },
{ "_Decimal128", RID_DFLOAT128, D_CONLY | D_EXT },
/* ObjC */
RID_IN, RID_OUT, RID_INOUT, RID_BYCOPY, RID_BYREF, RID_ONEWAY,
+ /* C (reserved and imaginary types not implemented, so any use is a
+ syntax error) */
+ RID_IMAGINARY,
+
/* C */
RID_INT, RID_CHAR, RID_FLOAT, RID_DOUBLE, RID_VOID,
RID_ENUM, RID_STRUCT, RID_UNION, RID_IF, RID_ELSE,
2009-05-03 Joseph Myers <joseph@codesourcery.com>
+ * gcc.dg/c99-complex-3.c: New test.
+
+2009-05-03 Joseph Myers <joseph@codesourcery.com>
+
* gcc.dg/cpp/utf8-5byte-1.c: New test.
2009-05-02 Joseph Myers <joseph@codesourcery.com>
--- /dev/null
+/* Test for _Imaginary: when imaginary types are not implemented, this
+ is still a keyword and must give a syntax error if used rather than
+ being treated as an identifier. */
+/* { dg-do compile } */
+/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
+
+float _Imaginary; /* { dg-error "expected" } */