8sa1-gcc/gcc/testsuite/gcc.dg/cpp/syshdr.c
Zack Weinberg 537815242e syshdr.c: New test.
* gcc.dg/cpp/syshdr.c: New test.
	* gcc.dg/cpp/syshdr1.h, gcc.dg/cpp/syshdr2.h: New files.

From-SVN: r35099
2000-07-17 20:05:01 +00:00

13 lines
558 B
C

/* Test for proper suppression of warnings in system headers,
and only in system headers. */
/* FRAGILITY WARNING: The only way we have to distinguish the good error
from the bad error is that the good error is on line 4 and the bad is
on line 5 (of their respective files). dg.exp doesn't have any way to
condition error matchers on the file they're in. */
/* { dg-do preprocess } */
/* { dg-error "include_next" "good error" { target *-*-* } 4 } */
#include "syshdr1.h" /* { dg-error "" "In file included from:" } */
#include "syshdr2.h"