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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [cpp/] [direct2s.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* Copyright (C) 2001 Free Software Foundation, Inc.
2
   Contributed by Nathan Sidwell 8 May 2001 <nathan@codesourcery.com> */
3
 
4
/* Test of prohibition on directives which result from macro
5
   expansion.  Same as direct2.c, with -save-temps applied; results
6
   should be identical.  */
7
 
8
/* { dg-do compile } */
9
/* { dg-options "-save-temps -ansi -pedantic-errors" } */
10
 
11
#define HASH #
12
#define HASHDEFINE #define
13
#define HASHINCLUDE #include
14
 
15
HASH include "somerandomfile" /*{ dg-error "stray" "non-include" }*/
16
/*{ dg-bogus "No such" "don't execute non-include" { target *-*-* } 15 }*/
17
int resync_parser_1; /*{ dg-error "parse|syntax|expected" "" { target *-*-* } 15 }*/
18
 
19
HASHINCLUDE <somerandomfile> /*{ dg-error "stray|expected" "non-include 2" }*/
20
/*{ dg-bogus "No such" "don't execute non-include 2" { target *-*-* } 18 }*/
21
int resync_parser_2;
22
 
23
void g1 ()
24
{
25
HASH define X 1 /* { dg-error "stray|unknown|expected" "# from macro" } */
26
  int resync_parser_3;
27
}
28
 
29
void g2 ()
30
{
31
HASHDEFINE  Y 1 /* { dg-error "stray|unknown|expected" "#define from macro" } */
32
  int resync_parser_4;
33
}
34
 
35
#pragma GCC dependency "direct2.c"
36
#
37
 
38
void f ()
39
{
40
  int i = X;    /* { dg-error "undeclared|for each" "no macro X" } */
41
  int j = Y;    /* { dg-error "undeclared|for each" "no macro Y" } */
42
}
43
 
44
/* { dg-final { cleanup-saved-temps } } */

powered by: WebSVN 2.1.0

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