diff options
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/c90-const-expr-2.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/c99-const-expr-2.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/compound-lvalue-1.c | 12 |
4 files changed, 20 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8390d01..9cf4afd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2003-11-08 Joseph S. Myers <jsm@polyomino.org.uk> + + * gcc.dg/compound-lvalue-1.c: New test. + * gcc.dg/c90-const-expr-2.c, gcc.dg/c99-const-expr-2.c: Remove + some XFAILs. + 2003-11-06 Geoffrey Keating <geoffk@apple.com> * gcc.dg/altivec-varargs-1.c: New test. diff --git a/gcc/testsuite/gcc.dg/c90-const-expr-2.c b/gcc/testsuite/gcc.dg/c90-const-expr-2.c index 746093b..7363e2a 100644 --- a/gcc/testsuite/gcc.dg/c90-const-expr-2.c +++ b/gcc/testsuite/gcc.dg/c90-const-expr-2.c @@ -30,7 +30,7 @@ foo (void) ASSERT_NPC ((void *)0); ASSERT_NOT_NPC ((void *)(void *)0); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */ ASSERT_NOT_NPC ((void *)(char *)0); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */ - ASSERT_NOT_NPC ((void *)(0, 0)); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */ + ASSERT_NOT_NPC ((void *)(0, 0)); /* { dg-bogus "incompatible" "bogus null pointer constant" } */ ASSERT_NOT_NPC ((void *)(&"Foobar"[0] - &"Foobar"[0])); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */ /* This last one is a null pointer constant in C99 only. */ ASSERT_NOT_NPC ((void *)(1 ? 0 : (0, 0))); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */ diff --git a/gcc/testsuite/gcc.dg/c99-const-expr-2.c b/gcc/testsuite/gcc.dg/c99-const-expr-2.c index c9f8e0f..1ba1b4a 100644 --- a/gcc/testsuite/gcc.dg/c99-const-expr-2.c +++ b/gcc/testsuite/gcc.dg/c99-const-expr-2.c @@ -30,7 +30,7 @@ foo (void) ASSERT_NPC ((void *)0); ASSERT_NOT_NPC ((void *)(void *)0); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */ ASSERT_NOT_NPC ((void *)(char *)0); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */ - ASSERT_NOT_NPC ((void *)(0, 0)); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */ + ASSERT_NOT_NPC ((void *)(0, 0)); /* { dg-bogus "incompatible" "bogus null pointer constant" } */ ASSERT_NOT_NPC ((void *)(&"Foobar"[0] - &"Foobar"[0])); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */ /* This last one is a null pointer constant in C99 only. */ ASSERT_NPC ((void *)(1 ? 0 : (0, 0))); diff --git a/gcc/testsuite/gcc.dg/compound-lvalue-1.c b/gcc/testsuite/gcc.dg/compound-lvalue-1.c new file mode 100644 index 0000000..c77403d --- /dev/null +++ b/gcc/testsuite/gcc.dg/compound-lvalue-1.c @@ -0,0 +1,12 @@ +/* Test for deprecation of compound expressions as lvalues. */ +/* Origin: Joseph Myers <jsm@polyomino.org.uk> */ +/* { dg-do compile } */ +/* { dg-options "" } */ + +int x, y; + +void +foo (void) +{ + (x, y) = 1; /* { dg-warning "lvalue" "compound expression as lvalue deprecated" } */ +} |