plateform stringclasses 1
value | repo_name stringclasses 2
values | name stringlengths 1 78 | ext stringclasses 2
values | path stringlengths 15 1.11k | size int64 1 8.55M | source_encoding stringclasses 11
values | md5 stringlengths 32 32 | text stringlengths 0 8.49M |
|---|---|---|---|---|---|---|---|---|
google | chromium | Wparentheses-23 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wparentheses-23.C | 2,365 | utf_8 | afd55c2d3666a85abefca5bb44baed64 | // { dg-do compile }
// { dg-options "-Wparentheses" }
// Template version of Wparentheses-22.C.
int foo (int);
class C
{
public:
C()
: b(0)
{ }
// Use default assignment constructor.
// Provide conversion to bool so that an instance of this class will
// work as a condition.
operator bool() const... |
google | chromium | Wparentheses-21 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wparentheses-21.C | 1,057 | utf_8 | f5f50acbe2a146e13079538cc1b650f3 | // { dg-do compile }
// { dg-options "-Wparentheses" }
// Template version of Wparentheses-12.C. Note that we currently warn
// when we initially parse the template, not when we are instantiating
// it. That seems reasonable since the template parameters can not
// affect the syntax parsing.
int foo (int);
int a, b, ... |
google | chromium | implicit-typename1 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/implicit-typename1.C | 422 | utf_8 | d75c242679a546679f0392d6a34e741e | // The -pedantic option must be omitted to trigger the crash.
// { dg-do compile }
// { dg-options "" }
// PR c++/7982: Crash warning about implicit typename.
// The base class refers to another typename, while the
// name lookup finds a template.
template <typename T> struct X {};
template <typename T> struct C {
... |
google | chromium | oldcast1 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/oldcast1.C | 384 | utf_8 | 33e37856b8391737e80c51371895ce7d | // { dg-do compile }
// { dg-options "-ansi -pedantic-errors -Wold-style-cast" }
// PR 5089. old style cast to void should be permitted (think assert)
void foo ()
{
int i;
float f = (float)i; // { dg-warning "use of old-style cast" "" }
(void)i;
} |
google | chromium | conv2 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/conv2.C | 106 | utf_8 | 8cdb559ffcb9d887ccbede485723468a | // PR c++/13932
// { dg-options "-Wconversion" }
int i = 1.;
int j = 1.1; // { dg-warning "conversion" }
|
google | chromium | Wunused-6 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wunused-6.C | 205 | utf_8 | 716f99b28cebbf385c168497daeff7ae | /* PR middle-end/14203 */
/* { dg-do compile } */
/* { dg-options "-Wall" } */
void foo()
{
if (false)
if (int i=0) // { dg-warning "unused" "" }
int j=0; // { dg-warning "unused" "" }
}
|
google | chromium | pr36921 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/pr36921.C | 1,008 | utf_8 | fb0ed1392cbdeb787735900d17b8c33a | /* PR 36921: comparison operator can be overloaded. Do not emit
warnings in such case.
{ dg-do compile }
{ dg-options "-Wparentheses" }
*/
struct A {};
A operator<(A, A) { return A(); }
A operator>(A, A) { return A(); }
A operator<=(A, A) { return A(); }
A operator>=(A, A) { return A(); }
A operator==(A, A) { retu... |
google | chromium | format2 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/format2.C | 1,489 | utf_8 | 77cfd7b8f34afd97ff68bc102b6c6fc6 | // Test for format attributes: test applying them to types in C++.
// { dg-do compile }
// { dg-options "-Wformat" }
__attribute__((format(printf, 1, 2))) void (*tformatprintf0) (const char *, ...);
void (*tformatprintf1) (const char *, ...) __attribute__((format(printf, 1, 2)));
void (__attribute__((format(printf, 1, ... |
google | chromium | Wparentheses-16 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wparentheses-16.C | 2,967 | utf_8 | 9bf24a91b61b697e120b73ae40901d68 | // { dg-do compile }
// { dg-options "-Wparentheses" }
// Template version of Wparentheses-7.C.
int foo (int);
template<class T>
void
bar (T a, T b, T c)
{
foo (a + b << c); // { dg-warning "parentheses" "correct warning" }
foo ((a + b) << c);
foo (a + (b << c));
foo (1 + 2 << c); // { dg-warning "parenthese... |
google | chromium | Wconversion-real-integer | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wconversion-real-integer.C | 3,022 | utf_8 | 778d5f6c7ca820866b90899853dc4fa7 | /* Test for diagnostics for Wconversion between floating-point and
integers. C++ equivalent of
gcc/testsuite/gcc.dg/Wconversion-real-integer.c */
/* { dg-do compile }
/* { dg-options "-Wconversion" } */
/* { dg-require-effective-target int32plus } */
#include <limits.h>
void fsi (signed int x);
void fui (unsign... |
google | chromium | Wstrict-aliasing-bogus-escape-2 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-escape-2.C | 221 | utf_8 | 7d718e1471f9c88db63a362d36027ca2 | /* { dg-do compile } */
/* { dg-options "-O2 -Wstrict-aliasing" } */
#include<list>
struct A
{
virtual ~A();
};
A* foo();
void bar(std::list<int> x)
{
std::list<int> y = x;
if (*y.rbegin())
delete foo();
}
|
google | chromium | incomplete2 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/incomplete2.C | 236 | utf_8 | c4c3995f1aa28a37cb3873e5212a7682 | // PR c++/33501
// { dg-do compile }
class A; // { dg-error "forward declaration" }
int f (A); // { dg-error "initializing" }
const A &make ();
int
main ()
{
return f (make ()); // { dg-error "invalid use of incomplete type" }
}
|
google | chromium | Wstrict-aliasing-bogus-char-1 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-char-1.C | 204 | utf_8 | d4573ac3640698442e2e693aacce94bb | /* { dg-do compile } */
/* { dg-options "-O2 -Wstrict-aliasing -fstrict-aliasing" } */
int foo () {
int i;
char* c= reinterpret_cast<char*>(&i); /* { dg-bogus "char" } */
c[1] = 1;
return i;
}
|
google | chromium | sequence-pt-pr17880 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/sequence-pt-pr17880.C | 2,561 | utf_8 | df6eec31c99dfed294a6e4192dd69f3f | // PR 17880
// { dg-do compile }
// { dg-options "-Wsequence-point" }
int
foo (int x)
{
unsigned int a;
int b;
b = (a += 5) > a; // { dg-warning "undefined" "sequence point warning" }
b = (a += 5) + a == 10; // { dg-warning "undefined" "sequence point warning" }
b = (a -= 5) > a; // { dg-warning "undefin... |
google | chromium | no-write-strings | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/no-write-strings.C | 98 | utf_8 | 941aec727045c0f85cb4623dd4ce20f1 | // { dg-do compile }
// { dg-options -Wno-write-strings }
int main()
{
char* p = "Asgaard";
}
|
google | chromium | pr26785 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/pr26785.C | 166 | utf_8 | fb38f2b2dda09170136a0c3ac84bcb3a | // PR 26785
// { dg-do compile }
// { dg-options "-fshow-column" }
class foo {
foo::foo // { dg-error "3:extra qualification" }
(int a,
int b,
int c);
};
|
google | chromium | multiple-overflow-warn-3 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/multiple-overflow-warn-3.C | 301 | utf_8 | 2979544e46142cf2eb10573c7d884767 | /* PR 30465 : Test for duplicated warnings in a conversion. */
/* { dg-do compile } */
/* { dg-options "-Woverflow" } */
short int
g (void)
{
short int wc = ((short int)1 << 31) - 1; /* { dg-bogus "overflow .* overflow" } */
/* { dg-warning "overflow" "" { target *-*-* } 8 } */
return wc;
}
|
google | chromium | Wunused-12 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wunused-12.C | 132 | utf_8 | ed6fbf0a414b22ad6579cf9a3fbe6c2f | // PR c++/24302
// { dg-options "-Wunused" }
static union
{
unsigned char FLT4ARR[4];
float FLT4;
}; // { dg-warning "used" }
|
google | chromium | if-empty-1 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/if-empty-1.C | 484 | utf_8 | 450618a497d9ab1567d9bc1ed188ded4 | /* { dg-do compile } */
/* { dg-options "-Wempty-body" } */
void
f (int x)
{
if (x)
; /* { dg-warning "suggest braces around empty body in an" } */
if (x)
; /* By design we don't warn in this case. */
else
(void)0;
if (x)
(void)0;
else
; /* { dg-warning "suggest braces around empty body i... |
google | chromium | pragma-system_header1 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/pragma-system_header1.C | 123 | utf_8 | 4cf78b7f61fb98cbc6e1ef39bf3dc758 | // PR c++/30500
// { dg-options "-Wconversion" }
#include "pragma-system_header1.h"
void f()
{
g<int>();
h<int>();
}
|
google | chromium | effc2 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/effc2.C | 701 | utf_8 | ea529389c86d5a43c531a82630dfde8b | // { dg-do compile }
// { dg-options "-Weffc++" }
// Contributed by Benjamin Kosnik <bkoz at redhat dot com>
// PR c++/16169 : Improve -Weffc++ rule 15
struct A {
const A& foo();
const A& operator=(int)
{ return foo(); }
};
struct B {
B& foo();
B& operator=(int)
{ return foo(); }
};
struct C {
C& operator... |
google | chromium | translate-ice-1 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/translate-ice-1.C | 971 | utf_8 | 6f5999bf56f2861a257750422cda17b6 | // Test ICE in caching printable names for a function.
// { dg-options "-std=c++98 -pedantic -O2" }
void g (int a) __attribute__((warning("g")));
void g2 (int a, int *p);
static inline __attribute__((__always_inline__)) void
gg (int a)
{
if (a == 0)
return g(a); // { dg-warning "attribute" }
__extension__ int ... |
google | chromium | Wsequence-point-3 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wsequence-point-3.C | 550 | utf_8 | 21e8a0380962b41685ed2da030d6e679 | // PR c++/46401
// { dg-do compile }
// { dg-options "-Wsequence-point" }
struct S
{
S ();
S &operator<< (const char *);
S (const S &);
};
#define N1(n) << #n
#define N2(n) N1(n)
#define N3(n) N2(n##0) N2(n##1) N2(n##2) N2(n##3) N2(n##4) \
N2(n##5) N2(n##6) N2(n##7) N2(n##8) N2(n##9)
#define N4(n) N3(n##... |
google | chromium | vector3 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/vector3.C | 128 | utf_8 | 06e44a4208434952189cfd9cd55ae2d8 | /* { dg-do compile } */
/* { dg-options "" } */
// PR c++/28302
int __attribute__((vector_size(8))) x;
void foo()
{
~x;
}
|
google | chromium | dllexport5 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/dllexport5.C | 1,378 | utf_8 | e15e69aa13aaf21f69fe2db927332420 | // { dg-do link }
// { dg-require-dll "" }
// { dg-additional-sources "dllexport5a.cc" }
// { dg-options "-O2 -fkeep-inline-dllexport" }
/* Test that inline functions declared "dllexport" appear in object files,
even if they are not called, when -fkeep-inline-dllexport is supplied.
This behavior is required by ... |
google | chromium | attrib15 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/attrib15.C | 84 | utf_8 | 39e052366a96099f26b671796340eb37 | // PR c++/15317
struct A
{
A(char);
};
A::A(__attribute__((unused)) char i2)
{}
|
google | chromium | has_nothrow_assign_odr | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/has_nothrow_assign_odr.C | 258 | utf_8 | 0c4a4d6a159a48a564551033ebb89c18 | // PR c++/36870
// { dg-do run }
#include <cassert>
struct S { const S& operator= (const S&); };
bool f ();
int main ()
{
assert (__has_nothrow_assign (S) == f ());
}
const S& S::operator= (const S&) { }
bool f () { return __has_nothrow_assign (S); }
|
google | chromium | has_nothrow_copy-3 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/has_nothrow_copy-3.C | 191 | utf_8 | 342fa7cf8c1da3204825904ac42f1aaa | // PR c++/36871
// { dg-do run }
#include <cassert>
struct F {
F (const F&) throw () { }
template <class T> F (T) throw () { }
};
int main ()
{
assert (__has_nothrow_copy (F));
}
|
google | chromium | utf8-1 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/utf8-1.C | 1,847 | utf_8 | 4f718b93ad8d20584103892a54ab1740 | // { dg-do run }
// { dg-require-iconv "ISO-8859-2" }
// { dg-options "-std=c++0x -fexec-charset=ISO-8859-2" }
const char *str1 = "h\u00e1\U0000010Dky ";
const char *str2 = "\u010d\u00E1rky\n";
const char *str3 = u8"h\u00e1\U0000010Dky ";
const char *str4 = u8"\u010d\u00E1rky\n";
const char *str5 = "h\u00e1\U0000010Dk... |
google | chromium | tmplattr3 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/tmplattr3.C | 942 | utf_8 | ff67a3df89d9e5bed9e2259c840fd1c3 | // PR c++/17743
template<typename T>
struct X {
typedef char layout_type[sizeof(T)]
__attribute ((aligned(__alignof(double))));
layout_type data;
};
template<typename T>
struct Y {
typedef char layout_type[sizeof(T)]
__attribute ((aligned(__alignof(T))));
layout_type data;
};
template<typename T>
struct ... |
google | chromium | oper1 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/oper1.C | 449 | utf_8 | 8f3e3432664712c939fe6dea74deb533 | // { dg-do run }
// Make sure the GNU extension of accepting dropping cv-qualifiers for
// the implicit this argument does not kick in when taking the address
// of an object, since this extension would change the meaning of a
// well-defined program.
struct A {
A* operator&() { return 0; }
};
int main ()
{
const A... |
google | chromium | array1 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/array1.C | 159 | utf_8 | 691a47a228a5fa12f281a771f2c53825 | // PR c++/13574
// { dg-options "" }
class A {
public:
A() : argc(0), argv() { };
private:
int argc;
char* argv[];
};
int main() {
A y;
}
|
google | chromium | utf32-1 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/utf32-1.C | 947 | utf_8 | 372b29c6fdb5613760a00a19b01a0604 | /* Test the support for char32_t character constants. */
/* { dg-do run } */
/* { dg-options "-std=c++0x -Wall -Werror" } */
extern "C" void abort (void);
const static char32_t c0 = U'a';
const static char32_t c1 = U'\0';
const static char32_t c2 = U'\u0024';
const static char32_t c3 = U'\u2029';
const static char32_t ... |
google | chromium | ms-1 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/ms-1.C | 288 | utf_8 | 8d8589b0df08fd0ae97cc680893df8f1 |
// MS allows more things to be pointers to member functions
// { dg-options "-fms-extensions" }
struct X
{
void Foo (X *);
void Bar ();
};
void Quux (void (X::*) ());
void X::Foo (X *ptr) // { dg-message "candidate" }
{
Quux (Foo); // { dg-error "no matches" }
Quux (Bar);
}
|
google | chromium | typeof11 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/typeof11.C | 249 | utf_8 | 4d1f0cfba2837e6c477d300cc30990c4 | // PR c++/37920
template<typename T> T& ensure_obj(const T&);
template <typename T>
void func2(T& t)
{
typedef __typeof__(ensure_obj(t)) ttt;
struct ttt1
{
ttt1( ttt arg0 ){}
} tttt ( t );
}
int main()
{
double d = 5;
func2(d);
}
|
google | chromium | dllimport7 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/dllimport7.C | 813 | utf_8 | fb8210a8ae361b2f2903fa711da2a84f | // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
// Report errors on definition of dllimport'd static data member .
struct Baz
{
Baz(int a_ =0) : a(a_) {}
int a;
};
class __declspec(dllimport) Bar
{
public:
enum {one = 1};
static const int two = 2;
static const int ... |
google | chromium | cleanup-6 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/cleanup-6.C | 286 | utf_8 | d9e45b781a97ee5ac71b788011eae52c | /* { dg-do compile } */
/* { dg-options "-O" } */
/* Verify that a cleanup marked "inline" gets inlined. */
static inline void xyzzy(void *p __attribute__((unused)))
{
}
void doit(void)
{
int x __attribute__((cleanup (xyzzy)));
}
/* { dg-final { scan-assembler-not "xyzzy" } } */
|
google | chromium | pragmaweak1 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/pragmaweak1.C | 138 | utf_8 | ad117686eb16e680b29f2f5e45ebe0df | // PR c++/25999
// { dg-final { scan-assembler-not "_Z3Foov" } }
extern "C" {
void Foo();
}
#pragma weak Random_Symbol
void Foo() { }
|
google | chromium | case-range2 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/case-range2.C | 639 | utf_8 | c01084c124adab852656539df4dce559 | // { dg-do compile }
// Tests if case ranges (a GNU extension) correctly emit messages
// about overlapping ranges.
// { dg-options "" }
const int low = -2;
const int high = 15;
template <typename T>
T f2 (T i)
{
switch (i)
{
case low ... high : return i + 1; // { dg-error "previously" }
case 5 : return ... |
google | chromium | vector2 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/vector2.C | 372 | utf_8 | a74f644ad1795f7b948fde6bec0f0e1e | // PR c++/23337; caused an ICE in component_ref_field_offset
// { dg-options "" }
// { dg-options "-mmmx" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
// { dg-prune-output "mangled name" }
typedef int vec __attribute__ ((vector_size (8)));
extern int bar (vec);
int
foo (int i)
{
vec a[] = { (vec) { 0, i }, (v... |
google | chromium | altivec-cell-1 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/altivec-cell-1.C | 1,476 | utf_8 | dd9c52efe2c8d9b6297333f40984600a | /* { dg-do compile { target powerpc*-*-* } } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* { dg-options "-maltivec" } */
/* Basic test for the new VMX intrinsics. */
#include <altivec.h>
int f(vector int a, int b)
{
return vec_extract (a, b);
}
short f1(vector short a, int b)
{
return vec_extrac... |
google | chromium | cleanup-4 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/cleanup-4.C | 573 | utf_8 | 95a700f1b361b8b7247dd036428905d7 | /* { dg-do run } */
/* { dg-options "" } */
/* Verify cleanup execution on non-trivial exit from a block. */
extern "C" void exit(int);
extern "C" void abort(void);
static int counter;
static void
handler(int *p)
{
counter += *p;
}
static void __attribute__((noinline))
bar(void)
{
}
static void doit(int n, int ... |
google | chromium | attrib27 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/attrib27.C | 167 | utf_8 | 2c1f177fcc72b3e947f945d29d8570e6 | //PR c++/29980
struct A { typedef int X; }; // { dg-error "previous declaration" }
struct __attribute__((unused)) A::X; // { dg-error "typedef-name" }
|
google | chromium | altivec-16 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/altivec-16.C | 378 | utf_8 | 1f347fa1c57370132e750e4fb8b77f9d | // PR c++/36662
// { dg-do compile { target powerpc*-*-* } }
// { dg-require-effective-target powerpc_altivec_ok }
// { dg-options "-maltivec" }
#define vector __attribute__((altivec (vector__)))
template <typename c> struct S {};
template <> struct S<vector float>
{
static vector float zero;
};
template <int>
vo... |
google | chromium | attrib12 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/attrib12.C | 222 | utf_8 | c460ffd02f4c4ad800649b58a60f30e1 | // PR c++/13791
template <typename T> struct O {
struct __attribute__((packed)) I {
int i;
char c;
};
I* foo();
};
template <typename T>
typename O<T>::I*
O<T>::foo() { return 0; }
template class O<int>;
|
google | chromium | is_pod | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/is_pod.C | 1,150 | utf_8 | 0c75de786038aaf47f8b0e7b502d064c | // { dg-do run }
// { dg-options "-std=c++0x" }
#include <cassert>
struct A
{
double a;
double b;
};
struct B
{
B() { }
};
struct C
: public A { };
template<typename T>
bool
f()
{ return __is_pod(T); }
template<typename T>
class My
{
public:
bool
f()
{ return !!__is_pod(T); }
};
templat... |
google | chromium | complex4 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/complex4.C | 199 | utf_8 | 35b7aa6c0d6fc7e40536c9546a810234 | // { dg-do compile }
// This code used to be rejected as there was no conversion from int to float __complex__
#include <vector>
typedef float __complex__ fcomplex;
std::vector<fcomplex> vfc(10);
|
google | chromium | asmspecInvalid | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/asmspecInvalid.C | 534 | utf_8 | 81d7f5132402c3b9c67ba05f4d092697 | // tests that the asm directive is correctly handled for static fields
// in structures and classes. This only applies to C++; such
// directives generate errors in C. Assembler directives for local
// variables should be tested by the C test suite.
//
// { dg-do compile }
struct Foo {
// This should reference a ... |
google | chromium | underlying_type3 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/underlying_type3.C | 1,161 | utf_8 | f315a8ef4a948535442d97395b5a4ff9 | // { dg-do compile }
// { dg-options "-std=c++0x" }
template<typename T1, typename T2>
struct is_same
{ static const bool value = false; };
template<typename T>
struct is_same<T, T>
{ static const bool value = true; };
enum E1 : unsigned { };
enum E2 : char { };
enum class E3 { };
enum class E4 : unsigned ch... |
google | chromium | packed8 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/packed8.C | 536 | utf_8 | 92e127333ad0ef733158621f0c931974 | // PR c++/18378
// NOTE: This test assumes packed structure layout differs from unpacked
// structure layout. This isn't true, e.g., with the default
// arm-none-elf options.
// { dg-options "-mstructure-size-boundary=8" { target arm*-*-* } }
class A
{
public:
int i;
A() {}
A(const A& a) { i = a.i;... |
google | chromium | align2 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/align2.C | 251 | utf_8 | 9b72806f0ff8dd6bff6e2ef84f0ce102 | // PR c++/10179
struct __attribute((aligned(__alignof(double)))) A
{ /* empty */ };
struct T : public A
{
char c;
};
template<bool> struct StaticAssert;
template<> struct StaticAssert<true> {};
StaticAssert<__alignof(T) == __alignof(double)> d;
|
google | chromium | altivec-cell-5 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/altivec-cell-5.C | 1,368 | utf_8 | 29cab7a77633102be8f79fea8bd692b1 | /* { dg-do compile { target powerpc*-*-* } } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* { dg-options "-maltivec" } */
/* Basic test for the new VMX intrinsics and error messages. */
#include <altivec.h>
int main(int argc, char **argv)
{
vector float t;
vec_promote(); /* {... |
google | chromium | utf-badconcat | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/utf-badconcat.C | 921 | utf_8 | 3e8f2dc091110c881df8e144f0891477 | /* Test unsupported concatenation of char16_t/char32_t* string literals. */
/* { dg-do compile } */
/* { dg-options "-std=c++0x" } */
const void *s0 = u"a" "b";
const void *s1 = "a" u"b";
const void *s2 = u"a" U"b"; /* { dg-error "non-standard concatenation" } */
const void *s3 = U"a" u"b"; /* { dg-error "non-standar... |
google | chromium | underlying_type6 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/underlying_type6.C | 758 | utf_8 | ecc2a7adc1574f7f6ce27d9c3d5c9458 | // { dg-do compile }
// { dg-options "-std=c++0x" }
template<typename T1, typename T2>
struct is_same
{ static const bool value = false; };
template<typename T>
struct is_same<T, T>
{ static const bool value = true; };
enum E1 : unsigned { };
enum E2 : char { };
enum class E3 { };
enum class E4 : unsigned ch... |
google | chromium | attr-ifunc-4 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/attr-ifunc-4.C | 717 | utf_8 | bd27697247540ba2feb467794ccaa56d | /* { dg-do run } */
/* { dg-require-ifunc "" } */
/* { dg-options "-Wno-pmf-conversions" } */
#include <stdio.h>
struct Klass
{
virtual int magic () = 0;
};
struct Klassier : Klass
{
int implementation ();
int magic ();
static void *resolver ();
};
int Klassier::implementation (void)
{
printf ("'ere I am... |
google | chromium | altivec-cell-3 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/altivec-cell-3.C | 841 | utf_8 | 141d17972ddb9632037c663fb3999e80 | /* { dg-do run { target { powerpc*-*-* && vmx_hw } } } */
/* { dg-do compile { target { powerpc*-*-* && { ! vmx_hw } } } } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* { dg-options "-maltivec" } */
/* Test the vec_splats and vec_promote VMX intrinsics. */
#include <altivec.h>
extern "C" void abo... |
google | chromium | builtin-object-size3 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/builtin-object-size3.C | 672 | utf_8 | 40741adc7f2c6007d3a4b1ea58cbdfc8 | // { dg-do compile }
// { dg-options "-O2" }
void baz (int *, int *);
#define MEMCPY(d,s,l) __builtin___memcpy_chk (d, s, l, __builtin_object_size (d, 0))
int
foo ()
{
int *p = new int;
int *q = new int[4];
MEMCPY (p, "abcdefghijklmnopqrstuvwxyz", sizeof (int));
MEMCPY (q, "abcdefghijklmnopqrstuvwxyz", 4 * s... |
google | chromium | has_trivial_destructor-2 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/has_trivial_destructor-2.C | 83 | utf_8 | a24f991beb2c5296f2e8144630b7bb1a | // PR c++/36855
typedef char assert_0 [__has_trivial_destructor (int&) ? 1 : -1];
|
google | chromium | has_trivial_constructor | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/has_trivial_constructor.C | 1,426 | utf_8 | 74cd33bd9a4a20798b22a38804c96e73 | // { dg-do run }
#include <cassert>
struct A
{
double a;
double b;
};
union U
{
double a;
double b;
};
struct B
{
B() { }
};
struct C
: public B { };
struct D
: public A { };
struct E
{
A a;
};
struct F
{
B b;
};
template<typename T>
bool
f()
{ return __has_trivial_constructor(T); }
template<typ... |
google | chromium | underlying_type10 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/underlying_type10.C | 627 | utf_8 | a20beeabe8b4f36b3998cd08071f5308 | // { dg-do run }
// { dg-options "-std=c++0x" }
#include <cassert>
enum E1 : unsigned { E1_en = 1 };
enum E2 : char { E2_en = 1 };
enum class E3 { a = -1 };
enum class E4 : unsigned char { c = 1 };
enum class E5 : int { a = -1, b = 1 };
enum class E6 : long { c = __LONG_MAX__ };
template<typename T>
struct underly... |
google | chromium | no-asm-1 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/no-asm-1.C | 309 | utf_8 | d8aab6d07f244c4b9f78c15a01c07e27 | // { dg-do compile }
// { dg-options "" }
// Verify that asm and the GNU extension typeof are recognized as
// keywords.
int asm; // { dg-error "before .asm." }
int typeof; // { dg-error "expected" }
// { dg-error "multiple types" "" { target *-*-* } 8 }
// { dg-error "declaration" "" { target *-*-* } 8 }
|
google | chromium | interface1 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/interface1.C | 161 | utf_8 | 3a16bb49d1e751989bc6c5980e68cc41 | // PR c++/22252
// { dg-do link }
// { dg-additional-sources "interface1a.cc" }
// { dg-options "-fno-inline" }
#pragma implementation
#include "interface1.h"
|
google | chromium | altivec-types-4 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/altivec-types-4.C | 497 | utf_8 | 44353ecc66faa31e60f8e0a690173f56 | /* { dg-do compile { target powerpc*-*-linux* } } */
/* { dg-require-effective-target ilp32 } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* { dg-options "-maltivec -mno-vsx -mno-warn-altivec-long" } */
/* These should not get warnings for 32-bit code when the warning is
disabled. */
__vector long... |
google | chromium | gnu-inline-global-reject | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/gnu-inline-global-reject.C | 1,576 | utf_8 | ec07725f3e673e809231a2712e0ed157 | /* Test __attribute__((gnu_inline)).
Check that we reject various forms of duplicate definitions.
*/
/* { dg-do compile } */
/* { dg-options " -ansi -Wno-long-long" } */
#include "gnu-inline-common.h"
#undef fn
#define fn pfx(func_decl_inline_before)
decl(inline, fn) // { dg-error "previous" "" }
gnuindef(fn, 0)... |
google | chromium | selectany2 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/selectany2.C | 675 | utf_8 | af4cf9e10b51c0d0d85459ba3a539f33 | // { dg-do compile { target i?86-pc-cygwin } }
// { dg-do compile { target i?86-*-mingw* x86_64-*-mingw* } }
// Check for errors with invalid usage of selectany attribute.
extern int foo;
__declspec (selectany) int foo = 1; // OK
struct d
{
static int foo;
};
__declspec (selectany) int d::foo = 1; // OK
struct... |
google | chromium | dllimport12 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/dllimport12.C | 545 | utf_8 | afc4278f4fe70314e5eae58b9633dfd1 | // PR target/27650
// Don't use dllimport semantics on virtual methods when initializing
// vtables
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
// Use import lib thunk for vtable entry of explicitly virtual method,
struct base
{
virtual void key_method();
__attribute__((dllimport))... |
google | chromium | max | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/max.C | 80 | utf_8 | fc916d98d36fed4d9da40614102d5fdd | struct s_t {
};
void foo(void) {
s_t s; int i;
s<?=i; // { dg-error "" }
}
|
google | chromium | fixed2 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/fixed2.C | 97 | utf_8 | 2dec269695cc75bd9f6561ca76c86464 | // PR c++/35319
// { dg-options "" }
void foo()
{
throw 0r; // { dg-error "not supported" }
}
|
google | chromium | utf-gnuxx98 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/utf-gnuxx98.C | 856 | utf_8 | 508336efcb6722ef394c26643ffcbcc8 | /* Expected errors for char16_t/char32_t in gnu++98. */
/* Ensure u and U prefixes are parsed as separate tokens in gnu++98. */
/* { dg-do compile } */
/* { dg-options "-std=gnu++98" } */
const static char16_t c0 = 'a'; /* { dg-error "not name a type" } */
const static char32_t c1 = 'a'; /* { dg-error "not name a type"... |
google | chromium | underlying_type8 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/underlying_type8.C | 1,058 | utf_8 | 819188cf995bfe4f050c911b2bc9b5ca | // { dg-do compile }
// { dg-options "-std=c++0x" }
enum E1 : unsigned { E1_en = 1 };
enum E2 : char { E2_en = 1 };
enum class E3 { a = -1 };
enum class E4 : unsigned char { c = 1 };
enum class E5 : int { a = -1, b = 1 };
enum class E6 : long { c = __LONG_MAX__ };
template<typename T1, typename T2>
struct is_same
... |
google | chromium | complex7 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/complex7.C | 126 | utf_8 | a2e70aa0695a209f89997a3a585cda4e | // { dg-options "" }
class A
{
static const _Complex double x = 1.0 + 2.0i;
};
// { dg-prune-output "constexpr. needed" }
|
google | chromium | is_class_error2 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/is_class_error2.C | 1,552 | utf_8 | 35547c60a5cca63fa7784b899fd77954 | // PR c++/33464
template<int> void foo()
{
__has_nothrow_assign(int)(); // { dg-error "'__has_nothrow_assign\\(int\\)' cannot be used" }
__has_trivial_assign(int)(); // { dg-error "'__has_trivial_assign\\(int\\)' cannot be used" }
__has_nothrow_constructor(int)(); // { dg-error "'__has_nothrow_constructor\\(int\... |
google | chromium | label4 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/label4.C | 213 | utf_8 | 745640ccb4853caedd76af8799204a4b | // PR c++/20563: ICE (--enable-checking), infinite loop (--disable-checking)
// { dg-do compile }
__label__ *l; // { dg-error "not at the beginning of" } |
google | chromium | underlying_type1 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/underlying_type1.C | 620 | utf_8 | 2d00fabaabfea70460cb4cf6b8746dd6 | // { dg-do compile }
struct B { };
union U { };
template<typename T>
struct underlying_type
{ typedef __underlying_type(T) type; }; // { dg-error "not an enumeration" }
__underlying_type(int) i1; // { dg-error "not an enumeration|invalid" }
__underlying_type(A) i2; // { dg-error "expected" }
__underlying_type(... |
google | chromium | selectany1 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/selectany1.C | 505 | utf_8 | 9b5ee55248ed64a182e8649894580ade | // { dg-do compile { target i?86-pc-cygwin } }
// { dg-do compile { target i?86-*-mingw* x86_64-*-mingw* } }
// Check that selectany attribute puts symbols into link-once sections.
// { dg-final { scan-assembler "\.section\t\.data\\\$foo\[^\n\]*\n\t\.linkonce discard" } }
// { dg-final { scan-assembler "\.section\t\.... |
google | chromium | attrib38 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/attrib38.C | 136 | utf_8 | 6aad86aa351b64bdf2a3f9b4513ff87b | // PR c++/36625
template <int N>
struct A {
struct S { short f[3]; } __attribute__ ((aligned (N)));
};
int main ()
{
A<4>::S s;
}
|
google | chromium | label3 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/label3.C | 656 | utf_8 | 2f937b0172f68361eedae818d69b598b | // Bug: we were removing the p = q assignment in dce, and then reinserting
// it *after* the try/catch in out-of-ssa. Oops.
// testcase reduced from libjava/interpret.cc.
// { dg-do run }
// { dg-options "-O2" }
extern "C" int printf (const char *, ...);
bool b;
int main()
{
__label__ one, two, done;
void *la... |
google | chromium | gnu-inline-class | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/gnu-inline-class.C | 508 | utf_8 | 3e9228fd78fc3a72b584e4e2eaab7d3f | /* { dg-do compile } */
/* { dg-options "-O" } */ // such that static functions are optimized out
/* { dg-final { scan-assembler "func1" } } */
/* { dg-final { scan-assembler "func2" } } */
/* { dg-final { scan-assembler-not "func3" } } */
/* { dg-final { scan-assembler "func4" } } */
/* { dg-final { scan-assembler "fu... |
google | chromium | always_inline-3 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/always_inline-3.C | 412 | utf_8 | 501bf92c734eebe5c5c57a9e64a340e1 | // { dg-options "-O0" }
// { dg-do compile }
// PR C++/34715
namespace X
{
template <class T>
inline __attribute__ ((always_inline)) const T& min123(const T& a, const T& b);
}
template <class T>
inline __attribute__ ((always_inline)) const T& X::min123(const T& a, const T& b)
{
return a < b ? a : b;
}
int main()... |
google | chromium | complit6 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/complit6.C | 138 | utf_8 | 493a8222f8737e0b1e764acebae321f4 | // PR c++/20103
// { dg-options "" }
struct A
{
A(const A&);
};
struct B
{
A a;
};
void foo(B);
void bar(A &x)
{
foo((B){x});
}
|
google | chromium | builtin5 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/builtin5.C | 249 | utf_8 | d5df191d84dcd12a562ac24a79aa0e8d | // Verify that builtin is used when declared in namespace std
// { dg-do compile }
// { dg-options "-Wall" }
namespace std {
extern "C" int printf(const char*,...);
}
void foo() {
std::printf("%d"); // { dg-warning "expects a matching" }
}
|
google | chromium | attrib37 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/attrib37.C | 200 | utf_8 | d849127808e4deaa150bc4ee81a01d1e | // PR c++/43093
// { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } }
struct S {
int x;
S(const S &s) {}
};
S __attribute__((__stdcall__)) getS();
void test()
{
S s = getS();
}
|
google | chromium | packed11 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/packed11.C | 283 | utf_8 | 9cb80a2f0d2b2720aea9e37828f44d0f | // PR c++/26670
struct nonpod {
nonpod();
};
struct nonpod_pack {
nonpod n; // { dg-warning "ignoring packed attribute" }
} __attribute__ ((packed));
struct nonpod_pack2 {
nonpod_pack p; // { dg-warning "ignoring packed attribute" }
} __attribute__ ((packed));
|
google | chromium | static1 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/static1.C | 363 | utf_8 | 0cc2b837a96214f4ba420513a4d610a8 | // PR c++/23699
// { dg-options "" }
template<typename _CharT > class basic_string;
typedef basic_string<char> string;
template<typename _CharT>
struct basic_string
{
static const int npos = -1;
};
template<typename _CharT>
const int basic_string<_CharT>::npos;
extern template class basic_string<char>;
struct A
{
... |
google | chromium | no-gnu-keywords-1 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/no-gnu-keywords-1.C | 293 | utf_8 | d5f662860124db72994e984fae6aac16 | // { dg-do compile }
// { dg-options "-fno-gnu-keywords" }
// Verify that the keyword asm is recognized and that the GNU
// extension typeof is not recognized as a keyword when using
// -fno-gnu-keywords.
int asm; // { dg-error "before .asm." }
int typeof; // { dg-bogus "before .typeof." }
|
google | chromium | sync-3 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/sync-3.C | 229 | utf_8 | 96d325d0b1cb729ac3fd1b3d32a6b67b | // PR debug/41801
// { dg-do compile }
// { dg-options "-O2 -g" }
struct T
{
void
foo () volatile
{
__sync_lock_release (&t);
__sync_synchronize ();
}
bool t;
};
int
main ()
{
T t = { false };
t.foo ();
}
|
google | chromium | builtin7 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/builtin7.C | 223 | utf_8 | f75543f5ea1a62d2e49f182ac3ff8f36 | // PR c++/19628
// Verify that __builtin_constant_p may appear in a constant-expression.
// { dg-do run }
int main()
{
switch (3) {
case (__builtin_constant_p(7) ? 3 : 8):
return 0;
default:
return 1;
}
}
|
google | chromium | asm4 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/asm4.C | 48 | utf_8 | f8da779ccf232ebdb2dee94530a1bf48 | void f ()
{
__asm__ __volatile__ ("" : : );
}
|
google | chromium | builtin3 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/builtin3.C | 384 | utf_8 | 2c3efda13a896fee107d939ea59c8e75 | // Verify that declaring builtin in namespace std doesn't give us
// declaration in global namespace
// { dg-do compile }
// { dg-options "" }
namespace std {
extern "C" int printf(char*, ...); // { dg-message "std::printf" }
}
void foo() {
printf("abc"); // { dg-error "not declared" }
// { dg-message "suggest... |
google | chromium | typeof4 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/typeof4.C | 264 | utf_8 | bb35b4ce331483ff19b91d62234fac6b | // { dg-do compile }
// { dg-options "" }
// PR c++/9459: typeof in return type of template function
void foo (int) {}
void foo (double) {}
template <typename C>
typeof(foo(1))
bar () { return foo(1); } |
google | chromium | attrib14 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/attrib14.C | 359 | utf_8 | cdd8170c3003199a19ce5299f8dd1d17 | // PR c++/13170
// The bogus attribute is ignored, but was in TYPE_ATTRIBUTES during
// parsing of the class, causing some variants to have it and some not.
struct __attribute__((bogus)) A
{ // { dg-warning "ignored" "" }
virtual ~A();
void foo(const A&);
void bar(const A&);
};
void A::foo(const A&) ... |
google | chromium | always_inline-2 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/always_inline-2.C | 373 | utf_8 | 44b18dc394b2fe02bfec7111c89c3315 | // { dg-options "-O0" }
// { dg-do compile }
// PR C++/34715
namespace X
{
template <class T>
const T& min123(const T& a, const T& b);
}
template <class T>
inline __attribute__ ((always_inline)) const T& X::min123(const T& a, const T& b)
{
return a < b ? a : b;
}
int main()
{
int a, b;
return X::min123(a, b);
... |
google | chromium | builtin9 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/builtin9.C | 84 | utf_8 | 9ec34b90151fc823df34413d59729df4 | // PR c++/21619
// { dg-options "" }
int f[__builtin_constant_p(&"Hello"[0])?1:-1];
|
google | chromium | typedef-init | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/typedef-init.C | 1,281 | utf_8 | c2ab0a5977a08b46134ba61eb8b22222 | /* { dg-do compile } */
/* { dg-options "-fpermissive" } // suppress default -pedantic-errors */
/* This code used to be a legitimate, if dubious, extension. However,
it's been broken since GCC 3.0 (caused ICE) and we have now removed
the extension. See PR c/7353.
For cases A and C, C++ issues a warning in... |
google | chromium | attrib11 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/attrib11.C | 444 | utf_8 | 7d199628520ab2d84e8e00fc3200e683 | // { dg-do compile }
// { dg-options "-Wall" }
// PR c++/13507, spurious warning due to attribute clobbering
extern "C" {
extern int printf (__const char *__restrict __format, ...) throw ();
extern int scanf (__const char *__restrict __format, ...) throw ();
}
void foo(unsigned int x)
{
printf ("%d\n", x);
} |
google | chromium | vla4 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/vla4.C | 336 | utf_8 | 96ef8e77465b89de054095f26955d054 | // PR c++/29318
// { dg-options "" }
#include <typeinfo>
void f(int i) {
try {
int a[i];
throw &a; // { dg-error "variable size" }
} catch (int (*)[i]) { // { dg-error "variable size" }
}
}
int main()
{
int i = 5;
int va[i];
const std::type_info& info(typeid(&va)); // { dg-error "variable size" }... |
google | chromium | packed5 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/packed5.C | 124 | utf_8 | 16a931c57f92231bf11258bf8610b8ca | // PR c++/14173
struct A;
void foo(const A&);
struct A
{
A(const A&);
};
struct B
{
A a;
A bar() { return a; }
};
|
google | chromium | complit3 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/complit3.C | 192 | utf_8 | 7c0cfd2335d61954c46222aa7517e055 | // { dg-options "" }
int Compound_Literals_0()
{
static int y[] = (int []) {1, 2, 3}; // { dg-error "init" }
static int z[] = (int [3]) {1}; // { dg-error "init" }
return y[0]+z[0];
}
|
google | chromium | attrib31 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/attrib31.C | 201 | utf_8 | 871bf59c89d9fdf913b212ba40c878a1 | // PR c++/35097
template<int> struct A;
template<> struct A<0>
{
typedef int X __attribute((aligned(4)));
};
template<typename T> void foo(const A<0>::X&, T);
void bar()
{
foo(A<0>::X(), 0);
}
|
google | chromium | anon-struct2 | .C | native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/anon-struct2.C | 1,026 | utf_8 | 0e1fc7f945fafc3c224a24b23c1c2a76 | /* { dg-options "" } */
/* In GNU C++ mode, we recognize the anonymous struct extension,
but not Microsoft C extensions. */
struct A { char a; };
struct B {
struct A; /* forward decl of B::A. */
char b;
};
char testB[sizeof(B) == sizeof(A) ? 1 : -1];
struct C {
struct D { char d; }; /* decl of C::D. */
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.