8sa1-gcc/gcc/testsuite/gcc.dg/cpp/digraph2.c
Neil Booth 530d0ba53b c-common.h (flag_digraphs): New.
* c-common.h (flag_digraphs): New.
	* c-decl.c (c_decode_option): Set flag_digraphs as appropriate.
	* c-lex.c (yylex): Use flag_digraphs to decide whether to
	honour digraphs.

	* testsuite/gcc.dg/cpp/digraph1.c,
	testsuite/gcc.dg/cpp/digraph2.c,
	testsuite/gcc.dg/cpp/digraphs.c: New tests.

From-SVN: r35010
2000-07-13 10:12:08 +00:00

20 lines
496 B
C

/* Copyright (C) 2000 Free Software Foundation, Inc. */
/* { dg-do compile } */
/* { dg-options "-std=c89" } */
/* Just simple check that digraphs are not on in c89, for both
preprocessor and compiler. digraphs.c is the general test. */
int main (int argc, char *argv[])
{
return 0;
%> /* { dg-error "parse error" } */
/* Place this after main () so we get to test both the compiler above
and the preprocessor below. */
%:define glue
#ifdef glue
#error glue is defined!
#endif