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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [cpp/] [avoidpaste1.c] - Diff between revs 298 and 338

Only display areas with differences | Details | Blame | View Log

Rev 298 Rev 338
/* Copyright (C) 2001, 2003 Free Software Foundation, Inc.  */
/* Copyright (C) 2001, 2003 Free Software Foundation, Inc.  */
 
 
/* { dg-do preprocess } */
/* { dg-do preprocess } */
/* { dg-options "-ansi" } */
/* { dg-options "-ansi" } */
 
 
/* This tests that we avoid accidental pasting only before and after
/* This tests that we avoid accidental pasting only before and after
   macros and arguments, and not when the tokens are already pasted
   macros and arguments, and not when the tokens are already pasted
   in the souce file (e.g. "::" in a C source file).
   in the souce file (e.g. "::" in a C source file).
 
 
   Neil Booth, 28 Jan 2001.  */
   Neil Booth, 28 Jan 2001.  */
 
 
#define f(x) x
#define f(x) x
#define g
#define g
#define tricky 1.0e ## -1
#define tricky 1.0e ## -1
 
 
/* This should preprocess as
/* This should preprocess as
 
 
:: : : : : :^: 1.0e- 1
:: : : : : :^: 1.0e- 1
: : : .. . 0 0 .
: : : .. . 0 0 .
 
 
It relies on the fact that even when preprocessing C we bother to separate
It relies on the fact that even when preprocessing C we bother to separate
the colons of C++'s :: operator.  If we confine this behavior to C++
the colons of C++'s :: operator.  If we confine this behavior to C++
in future, this test needs to change.  */
in future, this test needs to change.  */
 
 
:: :g: :f(): :f(^): tricky
:: :g: :f(): :f(^): tricky
:f(:): .. .__INCLUDE_LEVEL__ __INCLUDE_LEVEL__. /* Check builtins, too.  */
:f(:): .. .__INCLUDE_LEVEL__ __INCLUDE_LEVEL__. /* Check builtins, too.  */
 
 
/* { dg-final { scan-file avoidpaste1.i ":: : : : : :\\^: 1.0e- 1" } }
/* { dg-final { scan-file avoidpaste1.i ":: : : : : :\\^: 1.0e- 1" } }
   { dg-final { scan-file avoidpaste1.i ": : : \\\.\\\. \\\. 0 0 \\\." } } */
   { dg-final { scan-file avoidpaste1.i ": : : \\\.\\\. \\\. 0 0 \\\." } } */
 
 

powered by: WebSVN 2.1.0

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