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
This commit is contained in:
parent
d882fe5150
commit
537815242e
@ -1,3 +1,8 @@
|
||||
2000-07-17 Zack Weinberg <zack@wolery.cumb.org>
|
||||
|
||||
* gcc.dg/cpp/syshdr.c: New test.
|
||||
* gcc.dg/cpp/syshdr1.h, gcc.dg/cpp/syshdr2.h: New files.
|
||||
|
||||
2000-07-17 Neil Booth <neilb@earthling.net>
|
||||
|
||||
* gcc.dg/cpp/cmdlne-dM.c: New test.
|
||||
|
12
gcc/testsuite/gcc.dg/cpp/syshdr.c
Normal file
12
gcc/testsuite/gcc.dg/cpp/syshdr.c
Normal file
@ -0,0 +1,12 @@
|
||||
/* 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"
|
4
gcc/testsuite/gcc.dg/cpp/syshdr1.h
Normal file
4
gcc/testsuite/gcc.dg/cpp/syshdr1.h
Normal file
@ -0,0 +1,4 @@
|
||||
/* This file should generate an error because #include_next is not a
|
||||
standard directive. */
|
||||
|
||||
#include_next <stdio.h>
|
5
gcc/testsuite/gcc.dg/cpp/syshdr2.h
Normal file
5
gcc/testsuite/gcc.dg/cpp/syshdr2.h
Normal file
@ -0,0 +1,5 @@
|
||||
/* This file would generate an error because of #include_next, but the
|
||||
#pragma marks it a system header, so the error is suppressed. */
|
||||
|
||||
#pragma GCC system_header
|
||||
#include_next <stdio.h>
|
Loading…
Reference in New Issue
Block a user