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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [warn/] [format4.C] - Rev 801

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

// { dg-do compile }
// { dg-options "-Wformat=2" }

extern "C" int printf (const char*, ...);

void foo(int i)
{
        printf("Hello World %d!\n", i);
        printf(&"Hello World %d!\n"[0], i);
        printf(&"Hello World %d!\n"[6], i);
        printf(&"Hello World %d!\n"[8]-2, i);
        printf(&"Hello World %d!\n"[4]+2, i);
}

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

powered by: WebSVN 2.1.0

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