summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cpp/strify1.c
blob: 35355401aeb47b33ffee7af38a58fb0073e41638 (plain)
1
2
3
4
5
6
7
8
9
10
/* Copyright (C) 2000 Free Software Foundation, Inc.  */

/* { dg-do preprocess } */

/* Test operator # semantics.  */

#define OK1 #		/* No problem.  */
#define OK2(x) x#x	/* No problem.  */
#define bad1(x) #	/* { dg-error "followed by a macro parameter" "#1" } */
#define bad2(x) #y	/* { dg-error "followed by a macro parameter" "#2" } */