URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 298 |
Rev 384 |
/* Test for warnings for non-string-literal formats. */
|
/* Test for warnings for non-string-literal formats. */
|
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
|
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
|
/* { dg-do compile { target { *-*-mingw* } } } */
|
/* { dg-do compile { target { *-*-mingw* } } } */
|
/* { dg-options "-std=gnu99 -Wformat -Wformat-nonliteral" } */
|
/* { dg-options "-std=gnu99 -Wformat -Wformat-nonliteral" } */
|
|
|
#define USE_SYSTEM_FORMATS
|
#define USE_SYSTEM_FORMATS
|
#include "format.h"
|
#include "format.h"
|
|
|
void
|
void
|
foo (char *s, size_t i)
|
foo (char *s, size_t i)
|
{
|
{
|
printf ((const char *)i, i); /* { dg-warning "argument types" "non-literal" } */
|
printf ((const char *)i, i); /* { dg-warning "argument types" "non-literal" } */
|
printf (s, i); /* { dg-warning "argument types" "non-literal" } */
|
printf (s, i); /* { dg-warning "argument types" "non-literal" } */
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.