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/] [macro10.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* Copyright (C) 2001 Free Software Foundation, Inc.  */
2
 
3
/* { dg-do preprocess } */
4
 
5
/* Source: Neil Booth, 23 Sep 2001.
6
 
7
   A tricky, pathological corner case we used to get wrong.  Expansion
8
   should go as follows.  The asterisk indicates the token has "blue
9
   paint" can no longer be macro expanded.  We used to lose that
10
   information when parsing arguments and dropping to the lexer to get
11
   the ')'.
12
 
13
   foo )
14
   bar foo* )
15
   func (foo* )
16
   foo*
17
 
18
   If we try and expand the final foo, we get an "unterminated
19
   argument list invoking macro <func>" error.  If we do the right
20
   thing and leave it as is, no diagnostics are emitted.  */
21
 
22
#define func(x) x
23
#define bar func(
24
#define foo bar foo
25
foo )

powered by: WebSVN 2.1.0

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