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] - Diff between revs 298 and 338

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

Rev 298 Rev 338
/* { dg-do compile } */
/* { dg-do compile } */
/* { dg-options "-Wwrite-strings" } */
/* { dg-options "-Wwrite-strings" } */
/* The purpose of this test is to ensure that line numbers in diagnostics
/* The purpose of this test is to ensure that line numbers in diagnostics
   are accurate after macros whose arguments contain newlines and are
   are accurate after macros whose arguments contain newlines and are
   substituted multiple times.  The semicolons are on separate lines because
   substituted multiple times.  The semicolons are on separate lines because
   #line can only correct numbering on line boundaries.  */
   #line can only correct numbering on line boundaries.  */
#define one(x) x
#define one(x) x
#define two(x) x x
#define two(x) x x
#define four(x) two(x) two(x)
#define four(x) two(x) two(x)
 
 
int
int
main(void)
main(void)
{
{
  char *A;
  char *A;
 
 
  A = "text";           /* { dg-warning "discards qualifiers" "case zero" } */
  A = "text";           /* { dg-warning "discards qualifiers" "case zero" } */
  A = one("text"        /* { dg-warning "discards qualifiers" "case one" } */
  A = one("text"        /* { dg-warning "discards qualifiers" "case one" } */
          "text")
          "text")
        ;
        ;
  A = two("text"        /* { dg-warning "discards qualifiers" "case two" } */
  A = two("text"        /* { dg-warning "discards qualifiers" "case two" } */
          "text")
          "text")
        ;
        ;
  A = four("text"       /* { dg-warning "discards qualifiers" "case four" } */
  A = four("text"       /* { dg-warning "discards qualifiers" "case four" } */
           "text")
           "text")
        ;
        ;
 
 
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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