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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [cpp/] [avoidpaste2.c] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* Copyright (C) 2001, 2003 Free Software Foundation, Inc.  */
2
 
3
/* { dg-do preprocess } */
4
 
5
/* This tests that we avoid accidental pasting, as well as gratuitous
6
   space insertion, in various nasty places _inside_ a macro's
7
   replacement list: on either side of a paste, and on either side of
8
   an argument.  It also tests that we don't pass empty macro leading
9
   whitespace to the next line - this problem use to break Emacs
10
   preprocessor abuse.
11
 
12
   Neil Booth, 1 Feb 2001.  */
13
 
14
#define EMPTY_WITH_LEADING_SPACE
15
#define f(x, y) :x: -y##> -##y>
16
#define g(x, y) :x: :y##2 2##y:
17
 
18
/* This should preprocess as
19
 
20
: : : - > - >
21
:2: :22 22:
22
 
23
We used to get a space at the start of the line.  */
24
 
25
 EMPTY_WITH_LEADING_SPACE
26
f(:,)
27
g(2, 2)
28
 
29
/* { dg-final { scan-file avoidpaste2.i "(^|\\n): : : - > - >" } }
30
   { dg-final { scan-file avoidpaste2.i "(^|\\n):2: :22 22:" } } */

powered by: WebSVN 2.1.0

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