~ubuntu-branches/ubuntu/edgy/mcpp/edgy

« back to all changes in this revision

Viewing changes to cpp-test/test-t/e_23_3.c

  • Committer: Bazaar Package Importer
  • Author(s): NIIBE Yutaka
  • Date: 2004-10-23 23:18:57 UTC
  • Revision ID: james.westby@ubuntu.com-20041023231857-93z8ff2dgp7m7dpy
Tags: upstream-2.4.1
ImportĀ upstreamĀ versionĀ 2.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* e_23_3.c:    ## operator shall not occur at the beginning or at the end of
 
2
        replacement list for either form of macro definition.   */
 
3
 
 
4
/* { dg-do preprocess } */
 
5
 
 
6
/* 23.3:    In object-like macro.   */
 
7
#define con     ## name     /* { dg-error "'##' cannot appear at either end of a macro expansion| `##' at start of macro definition| No token before ##" } */
 
8
#define cat     12 ##       /* { dg-error "'##' cannot appear at either end of a macro expansion| No token after ##" } */
 
9
 
 
10
/* 23.4:    In function-like macro. */
 
11
#define CON( a, b)  ## a ## b   /* { dg-error "'##' cannot appear at either end of a macro expansion| `##' at start of macro definition| No token before ##" } */
 
12
#define CAT( b, c)  b ## c ##   /* { dg-error "'##' cannot appear at either end of a macro expansion| No token after ##" } */
 
13