Commit 7d82e8e4 by Marek Polacek Committed by Marek Polacek

re PR c/65471 (type interpretation in _Generic)

	PR c/65471
	* gcc.dg/c11-generic-3.c: New test.

From-SVN: r237252
parent bd8099f9
2016-06-09 Marek Polacek <polacek@redhat.com>
PR c/65471
* gcc.dg/c11-generic-3.c: New test.
2016-06-08 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/init/array42.C: New.
......
/* Test C11 _Generic. Test we follow the resolution of DR#423. */
/* { dg-do compile } */
/* { dg-options "-std=c11 -pedantic-errors" } */
char const *a = _Generic ("bla", char *: "");
char const *b = _Generic ("bla", char[4]: ""); /* { dg-error "not compatible with any association" } */
char const *c = _Generic ((int const) { 0 }, int: "");
char const *d = _Generic ((int const) { 0 }, int const: ""); /* { dg-error "not compatible with any association" } */
char const *e = _Generic (+(int const) { 0 }, int: "");
char const *f = _Generic (+(int const) { 0 }, int const: ""); /* { dg-error "not compatible with any association" } */
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