Commit fa5da7de by Joseph Myers Committed by Joseph Myers

c-common.c (reswords): Add _Imaginary.

	* c-common.c (reswords): Add _Imaginary.
	* c-common.c (enum rid): Add RID_IMAGINARY.

testsuite:
	* gcc.dg/c99-complex-3.c: New test.

From-SVN: r147075
parent 2ddd5020
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.
......
......@@ -730,6 +730,7 @@ const struct c_common_resword c_common_reswords[] =
{
{ "_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 },
......
......@@ -63,6 +63,10 @@ enum rid
/* 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>
......
/* 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" } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment