OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [cpp/] [unc4.c] - Blame information for rev 823

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do preprocess } */
2
/* { dg-options "-fno-show-column" } */
3
 
4
/* Tests for un-terminated conditional diagnostics.
5
   Copyright (c) 1999 Free Software Foundation.
6
   Contributed by Zack Weinberg, who made it up all by himself.  */
7
 
8
#endif /* { dg-error "#endif" "#endif without #if" } */
9
 
10
#else  /* { dg-error "#else" "#else without #if" } */
11
#endif /* { dg-error "#endif" "#endif after #else without #if" } */
12
 
13
#elif 0 /* { dg-error "#elif" "#elif without #if" } */
14
#endif  /* { dg-error "#endif" "#endif after #else without #if" } */
15
 
16
#if 1  /* { dg-bogus "unterminated" "terminated true conditional" } */
17
blah
18
#endif
19
 
20
#if 0  /* { dg-bogus "unterminated" "terminated false conditional" } */
21
ignored
22
#endif
23
 
24
/* We shouldn't see unbalanced conditionals inside #if'ed out #includes.  */
25
#if 0
26
#include "unc1.c"
27
#endif
28
 
29
/* The ifdef below should not get an error just because there's a bad if
30
   inside the included file.
31
   The odd dg-error tag on the include matches the "In file included from"
32
   message.  */
33
#define FOO
34
#ifdef FOO  /* { dg-bogus "unterminated" "nested unterm" } */
35
#include "unc1.c"  /* { dg-error "" } */
36
#endif
37
 
38
/* dg.exp doesn't read the included files for tags, so we have to
39
   do them explicitly here.  */
40
/* { dg-error "#if" "unc1.c: unterminated #if" { target *-*-* } 4 } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.