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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [warn/] [Wbraces2.C] - Blame information for rev 801

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/20175
2
// { dg-options "-Wmissing-braces" }
3
int a[2][2] = { 0, 1, 2, 3 };                    // { dg-warning "missing braces" }
4
int b[2][2] = { { 0, 1 }, { 2, 3 } };
5
int c[2][2] = { { { 0 }, 1 }, { 2, 3 } };        // { dg-error "braces around scalar" }
6
struct S { char s[6]; int i; };
7
S d = { "hello", 1 };
8
S e = { { "hello" }, 1 };
9
S f = { { { "hello" } }, 1 };                    // { dg-error "braces around scalar" }
10
S g = { 'h', 'e', 'l', 'l', 'o', '\0', 1 };      // { dg-warning "missing braces" }
11
struct T { wchar_t s[6]; int i; };
12
T i = { L"hello", 1 };
13
T j = { { L"hello" }, 1 };
14
T k = { { { L"hello" } }, 1 };                   // { dg-error "braces around scalar" }
15
T l = { L'h', L'e', L'l', L'l', L'o', L'\0', 1 };// { dg-warning "missing braces" }

powered by: WebSVN 2.1.0

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