OSDN Git Service

* c-common.c (combine_strings): Complain if concatenating
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / concat.c
1 /* Copyright (C) 2001 Free Software Foundation, Inc.  */
2
3 /* { dg-do compile } */
4
5 /* Test we output a warning for concatenation of artifical strings.
6
7    Neil Booth, 10 Dec 2001.  */
8
9 void foo ()
10 {
11   char str1[] = __FUNCTION__ ".";       /* { dg-warning "deprecated" } */
12   char str2[] = __PRETTY_FUNCTION__ ".";/* { dg-warning "deprecated" } */
13   char str3[] = "." __FUNCTION__;       /* { dg-warning "deprecated" } */
14   char str4[] = "." __PRETTY_FUNCTION__;/* { dg-warning "deprecated" } */
15   char str5[] = "." ".";        /* No warning.  */
16 }