c90-digraph-1.c, [...]: New tests.
* gcc.dg/c90-digraph-1.c, gcc.dg/c94-digraph.c, gcc.dg/c99-digraph.c: New tests. From-SVN: r35078
This commit is contained in:
parent
2c492eef0d
commit
b9609a52f6
@ -1,15 +1,18 @@
|
||||
2000-07-17 Joseph S. Myers <jsm28@cam.ac.uk>
|
||||
|
||||
* gcc.dg/c90-digraph-1.c, gcc.dg/c94-digraph.c,
|
||||
* gcc.dg/c99-digraph.c: New tests.
|
||||
|
||||
* gcc.dg/c90-hexfloat-1.c, gcc.dg/c90-hexfloat-2.c,
|
||||
gcc.dg/c99-hexfloat-1.c, gcc.dg/c99-hexfloat-2.c: New tests.
|
||||
* gcc.dg/c99-hexfloat-1.c, gcc.dg/c99-hexfloat-2.c: New tests.
|
||||
|
||||
* gcc.dg/c90-enum-comma-1.c, gcc.dg/c90-idem-qual-1.c,
|
||||
gcc.dg/c90-impl-decl-1.c, gcc.dg/c90-impl-int-1.c,
|
||||
gcc.dg/c90-longlong.c, gcc.dg/c90-restrict-1.c,
|
||||
gcc.dg/c90-return-1.c, gcc.dg/c99-enum-comma-1.c,
|
||||
gcc.dg/c99-idem-qual-1.c, gcc.dg/c99-impl-decl-1.c,
|
||||
gcc.dg/c99-impl-int-1.c, gcc.dg/c99-longlong-1.c,
|
||||
gcc.dg/c99-restrict-1.c, gcc.dg/c99-return-1.c: New tests.
|
||||
* gcc.dg/c90-impl-decl-1.c, gcc.dg/c90-impl-int-1.c,
|
||||
* gcc.dg/c90-longlong.c, gcc.dg/c90-restrict-1.c,
|
||||
* gcc.dg/c90-return-1.c, gcc.dg/c99-enum-comma-1.c,
|
||||
* gcc.dg/c99-idem-qual-1.c, gcc.dg/c99-impl-decl-1.c,
|
||||
* gcc.dg/c99-impl-int-1.c, gcc.dg/c99-longlong-1.c,
|
||||
* gcc.dg/c99-restrict-1.c, gcc.dg/c99-return-1.c: New tests.
|
||||
|
||||
Mon Jul 17 00:41:57 2000 Greg McGary <greg@mcgary.org>
|
||||
|
||||
|
24
gcc/testsuite/gcc.dg/c90-digraph-1.c
Normal file
24
gcc/testsuite/gcc.dg/c90-digraph-1.c
Normal file
@ -0,0 +1,24 @@
|
||||
/* Test for recognition of digraphs: should be recognised in C94 and C99
|
||||
mode, but not in C90 mode. Also check correct stringizing.
|
||||
*/
|
||||
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
|
||||
/* { dg-do run { xfail *-*-* } } */
|
||||
/* { dg-options "-std=iso9899:1990 -pedantic-errors" } */
|
||||
|
||||
#define str(x) xstr(x)
|
||||
#define xstr(x) #x
|
||||
#define foo(p, q) str(p %:%: q)
|
||||
|
||||
extern void abort (void);
|
||||
extern int strcmp (const char *, const char *);
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
const char *t = foo (1, 2);
|
||||
const char *u = str (<:);
|
||||
if (strcmp (t, "1 %:%: 2") || strcmp (u, "<:"))
|
||||
abort ();
|
||||
else
|
||||
return 0;
|
||||
}
|
24
gcc/testsuite/gcc.dg/c94-digraph-1.c
Normal file
24
gcc/testsuite/gcc.dg/c94-digraph-1.c
Normal file
@ -0,0 +1,24 @@
|
||||
/* Test for recognition of digraphs: should be recognised in C94 and C99
|
||||
mode, but not in C90 mode. Also check correct stringizing.
|
||||
*/
|
||||
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
|
||||
/* { dg-do run } */
|
||||
/* { dg-options "-std=iso9899:199409 -pedantic-errors" } */
|
||||
|
||||
#define str(x) xstr(x)
|
||||
#define xstr(x) #x
|
||||
#define foo(p, q) str(p %:%: q)
|
||||
|
||||
extern void abort (void);
|
||||
extern int strcmp (const char *, const char *);
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
const char *t = foo (1, 2);
|
||||
const char *u = str (<:);
|
||||
if (strcmp (t, "12") || strcmp (u, "<:"))
|
||||
abort ();
|
||||
else
|
||||
return 0;
|
||||
}
|
24
gcc/testsuite/gcc.dg/c99-digraph-1.c
Normal file
24
gcc/testsuite/gcc.dg/c99-digraph-1.c
Normal file
@ -0,0 +1,24 @@
|
||||
/* Test for recognition of digraphs: should be recognised in C94 and C99
|
||||
mode, but not in C90 mode. Also check correct stringizing.
|
||||
*/
|
||||
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
|
||||
/* { dg-do run } */
|
||||
/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
|
||||
|
||||
#define str(x) xstr(x)
|
||||
#define xstr(x) #x
|
||||
#define foo(p, q) str(p %:%: q)
|
||||
|
||||
extern void abort (void);
|
||||
extern int strcmp (const char *, const char *);
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
const char *t = foo (1, 2);
|
||||
const char *u = str (<:);
|
||||
if (strcmp (t, "12") || strcmp (u, "<:"))
|
||||
abort ();
|
||||
else
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user