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/] [line3.c] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-Wwrite-strings" } */
3
/* The purpose of this test is to ensure that line numbers in diagnostics
4
   are accurate after macros whose arguments contain newlines and are
5
   substituted multiple times.  The semicolons are on separate lines because
6
   #line can only correct numbering on line boundaries.  */
7
#define one(x) x
8
#define two(x) x x
9
#define four(x) two(x) two(x)
10
 
11
int
12
main(void)
13
{
14
  char *A;
15
 
16
  A = "text";           /* { dg-warning "discards qualifiers" "case zero" } */
17
  A = one("text"        /* { dg-warning "discards qualifiers" "case one" } */
18
          "text")
19
        ;
20
  A = two("text"        /* { dg-warning "discards qualifiers" "case two" } */
21
          "text")
22
        ;
23
  A = four("text"       /* { dg-warning "discards qualifiers" "case four" } */
24
           "text")
25
        ;
26
 
27
  return 0;
28
}

powered by: WebSVN 2.1.0

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