diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-02-03 18:26:28 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2009-02-03 18:26:28 +0100 |
commit | 754ccf7c7c9db6326708936242365c2df354ffae (patch) | |
tree | b0a7814cdb76726cd1bc60f57e9f3dcfc99dd568 /gcc/cp | |
parent | a36c33ebfc595336528780a71a2897d2b8dbdb94 (diff) | |
download | gcc-754ccf7c7c9db6326708936242365c2df354ffae.zip gcc-754ccf7c7c9db6326708936242365c2df354ffae.tar.gz gcc-754ccf7c7c9db6326708936242365c2df354ffae.tar.bz2 |
re PR inline-asm/39059 (ICE with fixed-point type in inline-asm)
PR inline-asm/39059
* c-parser.c (c_parser_postfix_expression): If fixed point is not
supported, don't accept FIXED_CSTs.
* c-decl.c (finish_declspecs): Error if fixed point is not supported
and _Sat is used without _Fract/_Accum. Set specs->type to
integer_type_node for cts_fract/cts_accum if fixed point is not
supported.
* parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
* gcc.dg/nofixed-point-2.c: New test.
* g++.dg/ext/fixed1.C: Adjust expected diagnostics.
* g++.dg/ext/fixed2.C: Likewise.
* g++.dg/other/error25.C: Likewise.
* g++.dg/lookup/crash7.C: Likewise.
* g++.dg/cpp0x/decltype-38655.C: Likewise.
From-SVN: r143900
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/parser.c | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c84de88..9d425ab 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2009-02-03 Jakub Jelinek <jakub@redhat.com> + PR inline-asm/39059 + * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs. + PR c++/39056 * typeck2.c (digest_init_r): Don't call process_init_constructor for COMPLEX_TYPE. diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 138fe42..404e45a 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -3144,6 +3144,12 @@ cp_parser_primary_expression (cp_parser *parser, case CPP_WCHAR: case CPP_NUMBER: token = cp_lexer_consume_token (parser->lexer); + if (TREE_CODE (token->u.value) == FIXED_CST) + { + error ("%Hfixed-point types not supported in C++", + &token->location); + return error_mark_node; + } /* Floating-point literals are only allowed in an integral constant expression if they are cast to an integral or enumeration type. */ |