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:
Joseph Myers 2000-07-17 02:34:27 -06:00 committed by Jeff Law
parent 2c492eef0d
commit b9609a52f6
4 changed files with 82 additions and 7 deletions

View File

@ -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>

View 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;
}

View 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;
}

View 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;
}