URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
/* Test for format diagnostics. */
|
/* Test for format diagnostics. */
|
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
|
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
|
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-options "-std=gnu99 -Wformat" } */
|
/* { dg-options "-std=gnu99 -Wformat" } */
|
|
|
#include "format.h"
|
#include "format.h"
|
|
|
void
|
void
|
foo (double d)
|
foo (double d)
|
{
|
{
|
/* This should get a message referring to `hh', not to `H'. */
|
/* This should get a message referring to `hh', not to `H'. */
|
printf ("%hhf", d); /* { dg-warning "hh" "%hhf warning" } */
|
printf ("%hhf", d); /* { dg-warning "hh" "%hhf warning" } */
|
/* This should get a message referring to `ll', not to `q'. */
|
/* This should get a message referring to `ll', not to `q'. */
|
printf ("%llf", d); /* { dg-warning "ll" "%llf warning" } */
|
printf ("%llf", d); /* { dg-warning "ll" "%llf warning" } */
|
/* This should get a message referring to 'size_t', not to
|
/* This should get a message referring to 'size_t', not to
|
'unsigned int' or similar. */
|
'unsigned int' or similar. */
|
printf ("%zu", d); /* { dg-warning "size_t" "size_t format warning" } */
|
printf ("%zu", d); /* { dg-warning "size_t" "size_t format warning" } */
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.