OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [Woverlength-strings-pedantic-c90.c] - Blame information for rev 316

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* -Woverlength-strings complains about string constants which are too long
2
   for the C standard's "minimum maximum" limits.  It is off by default,
3
   but implied by -pedantic.  */
4
 
5
/* { dg-options "-std=c90 -pedantic" } */
6
 
7
#define TEN "xxxxxxxxxx"
8
#define HUN TEN TEN TEN TEN TEN  TEN TEN TEN TEN TEN
9
#define THO HUN HUN HUN HUN HUN  HUN HUN HUN HUN HUN
10
 
11
/* C89's minimum-maximum is 509. */
12
const char x510[] = HUN HUN HUN HUN HUN TEN; /* { dg-warning "greater than" } */
13
 
14
/* C99's minimum-maximum is 4095.  */
15
const char x4096[] =
16
  THO THO THO THO     /* 4000 */
17
  TEN TEN TEN TEN TEN /* 4050 */
18
  TEN TEN TEN TEN     /* 4090 */
19
  "123456";  /* { dg-warning "greater than" } */

powered by: WebSVN 2.1.0

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