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
Wextra-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wextra-2.C
307
utf_8
fd872aba23fcbd09e4b5cb3b61dbaadf
// { dg-options "-Wextra" } struct S { S(); }; struct T { private: int i; public: // There should be no warning about this data member because the // default constructor for "T" will invoke the default constructor // for "S", even though "S" is "const". const S s; // { dg-bogus "const" } };
google
chromium
Wstrict-aliasing-bogus-const
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-const.C
194
utf_8
ac260e0cd387ad68b172cae5830684be
/* { dg-do compile } */ /* { dg-options "-O2 -Wstrict-aliasing -fstrict-aliasing" } */ int foo(int* p) { const int& q = *p; /* { dg-bogus "const vs. non-const" } */ *p = 1; return q; }
google
chromium
Wparentheses-5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wparentheses-5.C
316
utf_8
2e05be0ce305723a94a4113e02835003
// { dg-do compile } // { dg-options -Wparentheses } // C++ version of gcc.dg/Wparentheses-1.c. int foo (int a, int b) { int c = (a && b) || 0; // { dg-bogus "suggest parentheses" } c = a && b || 0; // { dg-warning "suggest parentheses" } return (a && b && 1) || 0; // { dg-bogus "suggest parentheses" } }
google
chromium
Wstrict-aliasing-bogus-struct-included
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-struct-included.C
269
utf_8
73aa8fdd361564d9ba904d4252613717
/* { dg-do compile } */ /* { dg-options "-O2 -Wstrict-aliasing -fstrict-aliasing" } */ struct S { int i; float f; }; int foo () { struct S s; s.i = 7; float* f = &s.f; /* { dg-bogus "float included in struct S" } */ *f = 2.0; return s.i + (int)s.f; }
google
chromium
Wenum-compare
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wenum-compare.C
237
utf_8
37c21b63185cc6eb45eceb0b75e600a3
/* Test that we get the -Wenum-compare by default. See PR27975. */ /* { dg-do compile } */ /* { dg-options "" } */ enum E1 { a }; enum E2 { b }; int foo (E1 e1, E2 e2) { return e1 == e2; /* { dg-warning "comparison between" } */ }
google
chromium
Wunused-var-4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wunused-var-4.C
742
utf_8
62e5565091b4ee3f018515196f818bf3
/* { dg-do compile } */ /* { dg-options "-Wunused" } */ struct S { int e; }; int f1 (void) { int a; int b; int c; int d; S s; a = 1; b = 2; c = 3; d = 4; s.e = 5; __decltype (d) f; // { dg-warning "set but not used" } __decltype (s.e) g; // { dg-warning "set but not used" } e = 1; f = 1; g...
google
chromium
unit-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/unit-1.C
212
utf_8
832c8f08396e3bbd191312ba09d1d54e
/* { dg-do compile } */ /* { dg-options "-O2 -Wuninitialized" } */ struct a { int mode; }; int sys_msgctl (void) { struct a setbuf; return setbuf.mode; /* { dg-warning "'setbuf.a::mode' is used" "" } */ }
google
chromium
miss-format-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/miss-format-1.C
1,139
utf_8
ac5283758fae2b51b1d83629b3cbbb11
/* { dg-do compile } */ /* { dg-options "-Wmissing-format-attribute" } */ /* { dg-options "-Wmissing-format-attribute -Wno-abi" { target arm_eabi } } */ /* VxWorks does not provide vscanf, either in kernel or RTP mode. */ /* { dg-error "not declared" "" { target { *-*-solaris2.8 *-*-vxworks* alpha*-dec-osf* } } 26 } *...
google
chromium
Wparentheses-24
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wparentheses-24.C
150
utf_8
30a2aacc6bcdb30c12ed12f8648679cc
// { dg-do compile } // { dg-options "-Wparentheses" } extern int foo (int); bool a, b, c; bool bar () { c = a = b; foo (0); return a = b; }
google
chromium
Woverloaded-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Woverloaded-1.C
217
utf_8
4d3b7ed38b5e078db7e76014e7eab321
/* { dg-options "-Woverloaded-virtual" } */ class Base { public: virtual ~Base() { } }; class Derived: public Base { public: int Base() { // There should be no error here. return 5; } }; int main() { }
google
chromium
Wreturn-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wreturn-2.C
118
utf_8
6a9ad99dea244e7a1d6655a1e95ccfea
// { dg-do compile } int foo(int first) { while (true) { return first; } } // { dg-bogus "control reaches" }
google
chromium
pr30551-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/pr30551-2.C
361
utf_8
eb7f623d124b0bcc1f9722099c010844
// PR 30551 -Wmain is enabled by -pedantic/-pedantic-errors. // { dg-do compile } // { dg-options "-pedantic-errors" } // { dg-skip-if "-Wmain not enabled with -pedantic on SPU" { spu-*-* } } int main(char a) {} /* { dg-error "first argument of .*main.* should be .int." } */ /* { dg-error "main.* takes only zero or tw...
google
chromium
huge-val1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/huge-val1.C
623
utf_8
e81d20f2a65cb672129118ceab24cd3e
// PR c++/23139: HUGE_VAL definition should be accepted with -pedantic. // { dg-do link } // { dg-options "-pedantic-errors" } #include <math.h> double d = HUGE_VAL; #ifdef HUGE_VALF float f = HUGE_VALF; #endif #ifdef HUGE_VALL long double l = HUGE_VALL; #endif extern void link_failure (); int main () { #ifdef __GLIBC_...
google
chromium
pr36069
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/pr36069.C
401
utf_8
7bf21e020852a31958f06efe9a7f79d3
// PR c++/36069 Strange "warning: suggest parentheses around // assignment used as truth value" with volatile/non volatile bools // { dg-do compile } // { dg-options "-Wparentheses" } struct foo { bool a; volatile bool b,c; foo() { a = b = c = false; } // { dg-bogus "parentheses" } }; int main() { bool a; ...
google
chromium
Wreturn-type-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wreturn-type-1.C
123
utf_8
784c916e3f956afe80f26ff565b29be6
// PR c++/11725 // { dg-options "-Wreturn-type" } template <class T> struct A { int foo() { throw "Stop"; } };
google
chromium
pr11159
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/pr11159.C
383
utf_8
adea0a023eba0c3c51b6a4894014d35a
// PR c++/11159 : erroneous warning in copy ctor with virtual inheritance // { dg-do compile } // { dg-options "-Wall -Wextra" } struct A { A (); }; struct B : virtual A { B (); }; struct C : virtual A { C (); }; struct D : B, C { D (D const&){} }; template <typename Base> struct E : Base { E (); E (E ...
google
chromium
noreturn-6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/noreturn-6.C
240
utf_8
c5311890f0c28242d0882ede510185e1
// PR c++/30988 // { dg-do compile } // { dg-options "-O2 -Wall" } void f (const char *); template <typename T> struct A { int g () { f (__FUNCTION__); } // { dg-warning "no return statement in function returning non-void" } };
google
chromium
Wunused-16
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wunused-16.C
145
utf_8
aa054897a9a999252af634fb37c47a72
// { dg-do compile } // { dg-options "-Wunused-value" } extern void f1(); void f(bool b) { b ? f1(), 0 : 0; // { dg-bogus "has no effect" } }
google
chromium
delete-non-virtual-dtor
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/delete-non-virtual-dtor.C
1,499
utf_8
ec538e835511110c1adf4e4e9029da8d
// { dg-options "-std=gnu++0x -Wdelete-non-virtual-dtor" } // { dg-do compile } struct polyBase { virtual void f(); }; void f(polyBase* p, polyBase* arr) { polyBase pb; delete p; // { dg-warning "non-virtual destructor might" } delete [] arr; } struct polyDerived : polyBase { }; void f(polyDerived* p, po...
google
chromium
Wunused-var-8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wunused-var-8.C
434
utf_8
12fcfa7c307d6c91a9038bade9f8e105
// { dg-do compile } // { dg-options "-Wunused" } template <int N> void f1 (void) { extern int extvari; extvari = 1; } int extvarj; template <int N> void f2 (void) { extern int extvarj; extvarj = 1; } static int extvark; template <int N> void f3 (void) { extern int extvark; extvark = 1; } template <in...
google
chromium
noreturn-7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/noreturn-7.C
318
utf_8
f5f5c1617ee81b4a95bfe5a2c43b2cf3
// PR c++/30988 // { dg-do compile } // { dg-options "-O2 -Wall" } void f (const char *) __attribute__ ((noreturn)); void f (int); void f (double) __attribute__ ((noreturn)); template <typename T> struct A { int g () { f ((T) 0); } // { dg-warning "no return statement in function returning non-void" } };
google
chromium
Wsign-conversion
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wsign-conversion.C
3,684
utf_8
b338731942d8716fd302c4acb247e53a
/* Test for diagnostics for implicit conversions between signed and unsigned integer types. C++ equivalent of gcc/testsuite/gcc.dg/Wsign-conversion.c */ // { dg-do compile } // { dg-options "-fsigned-char -Wsign-conversion" } #include <limits.h> void fsc (signed char sc); void fuc (unsigned char uc); unsigne...
google
chromium
pr13358-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/pr13358-2.C
1,149
utf_8
5ea14e490362652b825c770f9d00d814
// PR c++/13358: g++ should accept a long long constant sans LL suffix // if -Wno-long-long is in use. // { dg-do compile } // { dg-require-effective-target int32plus } // { dg-options "-std=c++98 -pedantic-errors" } void use_longlong () { unsigned long long x1, x2, x3; // { dg-error "ISO C\\+\\+ 1998 does not supp...
google
chromium
pedantic1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/pedantic1.C
184
utf_8
a17c4c0444990921d3c66161e1a84c51
// PR10032 // { dg-options "-pedantic" } int main() { goto label; // { dg-error "" } int temp = 1; // { dg-error "" } label: // { dg-error "" } return 1; }
google
chromium
Wstrict-aliasing-5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-5.C
188
utf_8
f203af23e924be80d891b0c53a7bee3e
/* { dg-do compile } */ /* { dg-options "-Wstrict-aliasing=2 -O2" } */ float foo () { unsigned int MASK = 0x80000000; return (float &) MASK; /* { dg-warning "strict-aliasing" } */ }
google
chromium
Wstrict-aliasing-bogus-placement-new
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-placement-new.C
415
utf_8
f345b06fca626501d991adc9447c18e0
/* { dg-do compile } */ /* { dg-options "-O2 -Wstrict-aliasing" } */ inline void *operator new (__SIZE_TYPE__, void *__p) throw() { return __p; } struct Y { Y() {} int i; }; struct X { X() {} void construct(const Y& y) { new (&m_data[0]) Y(y); } bool initialized; char m_data[sizeof (Y)]; }; void...
google
chromium
Wstring-literal-comparison-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wstring-literal-comparison-1.C
374
utf_8
b2ac295c001e28b6659dd1cbaecfc2a9
/* PR c/7776 */ /* { dg-do compile } */ /* { dg-options "-Waddress" } */ int test1(char *ptr) { return ptr == "foo"; /* { dg-warning "comparison with string" } */ } int test2() { return "foo" != (const char*)0; } int test3() { return "foo" == (const char*)0; } int test4() { return (const char*)0 != "foo"; ...
google
chromium
Wunused-label-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wunused-label-1.C
574
utf_8
4b4d62ec49110404478b690512efb2fd
// { dg-do compile } // { dg-options "-Wunused-label" } extern void f9(); void f1() { l1: f9(); // { dg-warning "not used" } l3: ; f9(); // { dg-warning "not used" } l4: __attribute__ ((unused)) ; f9(); } void f2() { label: __attribute ((unused)) ; } void f3() { // The next line would be OK in C but is ...
google
chromium
deprecated-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/deprecated-2.C
305
utf_8
26bafcbe2a9f3729e0b0e2ff8ccf5317
/* Test __attribute__((deprecated)). Test merging with multiple declarations. Bug 7425 (C++ version). */ /* { dg-do compile } */ /* { dg-options "" } */ void func(void); void func(void) __attribute__((deprecated)); void f(void) { func(); /* { dg-warning "'void func\\(\\)' is deprecated" } */ }
google
chromium
Wunused-4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wunused-4.C
553
utf_8
3c7c2b442d4bd62310dcfdd99d91e1b2
// { dg-do compile } // { dg-options "-Wunused-parameter" } // PR c++/9848. Missing warning struct C1 { // Only use in-charge ctor C1(int bi) {} // { dg-warning "unused parameter" "" } }; struct C2 { // Only use base ctor C2(int bi) {} // { dg-warning "unused parameter" "" } }; struct D : C2 { D (int) : C2 ...
google
chromium
pr35711
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/pr35711.C
207
utf_8
218b3d28673859e6199d626c1bb65b1c
// PR 35711 // { dg-do compile } // { dg-options "-Wcast-qual" } int* foo (volatile int *p) { return (int*)p; // { dg-warning "cast from type 'volatile int\\*' to type 'int\\*' casts away qualifiers" } }
google
chromium
Wparentheses-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wparentheses-1.C
1,661
utf_8
d1f22f759809f81b1b677be34f938b02
// Test operation of -Wparentheses. Warnings for assignments used as // truth-values. Essentially the same as gcc.dg/Wparentheses-3.c. // { dg-do compile } // { dg-options "-Wparentheses" } int foo (int); int a, b, c; bool d; void bar (void) { if (a = b) // { dg-warning "assignment" "correct warning" } foo (0);...
google
chromium
new1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/new1.C
50
utf_8
f90f92d0ee11df948b19aaef9ca54cd1
void f() { new int[0]; // { dg-bogus "zero" } }
google
chromium
register-var-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/register-var-2.C
274
utf_8
ea73d6265dc16c3e8af8fcf468fbfdee
/* PR/18160 */ /* { dg-do compile } */ /* This should yield an error even without -pedantic. */ /* { dg-options "-Wall -W" } */ void g(int *); void f(void) { register int x; g(&x); /* { dg-warning "address requested for 'x', which is declared 'register'" } */ }
google
chromium
Wstrict-aliasing-bogus-escape-3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-escape-3.C
386
utf_8
ef9cbc9a3736627428296e32dffe78fd
/* { dg-do compile } */ /* { dg-options "-O2 -Wstrict-aliasing" } */ struct Node_base {}; struct Node : Node_base { int data; }; struct List { Node_base node, *prev; List() : prev(&node) { xyz(); } void xyz(); int back() { return static_cast<Node*>(prev)->data; } }; struct A { virtual ~A(); }; A* fo...
google
chromium
Wenum-compare-no
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wenum-compare-no.C
251
utf_8
0159dc16051c0a3deaba6db2eeae85f8
/* Test disabling -Wenum-compare (on by default). See PR27975. */ /* { dg-do compile } */ /* { dg-options "-Wno-enum-compare" } */ enum E1 { a }; enum E2 { b }; int foo (E1 e1, E2 e2) { return e1 == e2; /* { dg-bogus "comparison between" } */ }
google
chromium
format1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/format1.C
471
utf_8
931d147f4baed695f1a67ae899cebd03
// Test that formats get checked according to C94. // { dg-do compile } // { dg-options "-ansi -pedantic -Wformat" } #include <cstdio> void foo (int i, int *ip, __WINT_TYPE__ lc, wchar_t *ls) { std::printf ("%d%ls%lc\n", i, ls, lc); std::printf ("%d", ls); // { dg-warning "format" "printf warning" } std::scanf ("...
google
chromium
overflow-warn-4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/overflow-warn-4.C
4,871
utf_8
cc7188e3168c426884a67c341f5fb2ba
/* { dg-do compile } */ /* { dg-options "-pedantic-errors" } */ #include <limits.h> enum e { E0 = INT_MAX, /* Unsigned overflow wraps around. */ E1 = UINT_MAX + 1, /* Overflow in an unevaluated part of an expression is OK (example in the standard). */ E2 = 2 || 1 / 0, /* { dg-bogus "warning: division b...
google
chromium
undefined1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/undefined1.C
205
utf_8
81ccb812ec92857cf80d860b4ffa0d31
// PR 17256 inline static void f1(void); // { dg-warning "used but never" } void g1(void) { if (0) { f1(); } } inline void f2(void); // { dg-warning "used but never" } void g2(void) { if (0) { f2(); } }
google
chromium
noeffect5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/noeffect5.C
208
utf_8
66a1048126ecd634e1e4f71263be239e
/* PR middle-end/13325 */ /* { dg-do compile } */ /* { dg-options "-Wall" } */ void *memcpy(void *dest, const void *src, __SIZE_TYPE__ n); void f (void *dest, const void *src) { memcpy (dest, src, 0); }
google
chromium
Wstrict-aliasing-bogus-signed-unsigned
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-signed-unsigned.C
243
utf_8
443205fcd20b9b14da1367b1b8e16bce
/* { dg-do compile } */ /* { dg-options "-O2 -Wstrict-aliasing -fstrict-aliasing" } */ int foo () { int i; unsigned int* pu = reinterpret_cast<unsigned int*> (&i); /* { dg-bogus "signed vs. unsigned" } */ *pu = 1000000; return i; }
google
chromium
Wunused-9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wunused-9.C
779
utf_8
c028f96ef429d16acd56c46dd1ef7140
// PR c++/11224 // { dg-options "-Wunused" } struct someclass { bool isEmpty() const { return true; } }; int main() { bool bOk = false; someclass foo; bOk == foo.isEmpty(); // { dg-warning "not used" } return bOk; } int& f(); void g() { f() == 0; // { dg-warning "not used" } f() != 1; // { dg-warni...
google
chromium
Wparentheses-19
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wparentheses-19.C
4,264
utf_8
57e45fb814d74e86de9c4f3666a82e67
// { dg-do compile } // { dg-options "-Wparentheses" } // Template version of Wparentheses-10.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 "parentheses" ...
google
chromium
noreturn-3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/noreturn-3.C
276
utf_8
99162a062d0507c49cfdb62a0ec174e4
// { dg-do compile } // { dg-options "-Wall" } // PR c++/13106: No return warning when return type is a dependent type. template <typename T> T dummy() { } int main() { dummy<void>(); }
google
chromium
Wcast-qual1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wcast-qual1.C
150
utf_8
3667162d7aa037ab6197e7d3ffea1a6c
// PR c++/24667 // { dg-options "-Wcast-qual" } int main(int, char**) { const int foo[2] = {1,1}; ((int*)foo)[0] = 0; // { dg-warning "cast" } }
google
chromium
Wstrict-aliasing-bogus-base-derived
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-base-derived.C
286
utf_8
36c50018c4d8d64200e0e3bc6b163e6d
/* { dg-do compile } */ /* { dg-options "-O2 -Wstrict-aliasing -fstrict-aliasing" } */ class base { public: int x; }; class derived: public base { public: int y; }; base foo () { derived d; base* pb = &d; /* { dg-bogus "base vs. derived" } */ pb->x = 1; return d; }
google
chromium
pr13358-3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/pr13358-3.C
619
utf_8
68b276164795c804d4dcf77e6ff91300
// PR c++/13358: g++ should accept a long long constant sans LL suffix // if -Wno-long-long is in use // { dg-do compile } // { dg-require-effective-target int32plus } // { dg-options "-std=c++0x -pedantic-errors" } void use_longlong () { unsigned long long x1, x2, x3; // make sure it's ok with hex, decimal and...
google
chromium
pr30636
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/pr30636.C
409
utf_8
40f3a713eb0d35566b12333645fb0772
/* { dg-do compile } */ /* { dg-options "-O2 -Warray-bounds" } */ typedef char one_buffer[512]; static one_buffer emergency_buffer[4]; void free_exception (void *vptr) { char *base = (char *) &emergency_buffer[0][0]; char *ptr = (char *) vptr; if (ptr >= base && ptr < base + sizeof (emergency_buffer)) /* { dg-b...
google
chromium
pmf1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/pmf1.C
258
utf_8
acd9eb52e3298cbde90941f636efb15f
// { dg-do compile } // PR c++/10496: Incorrect pointer to member function diagnostics // for constant member functions. struct a { int f() const; }; int a::f() const { int (a::* b)() const = &f; // { dg-error "&a::f" } }
google
chromium
skip-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/skip-2.C
771
utf_8
4bf091c9b94c31660c0d977448470862
// { dg-do compile } // { dg-options "-Wall" } extern int f2(int); extern void f3(); void f1(int i) { if (1 == 1 || f2(i >> -10)) f3(); if (1 == 1 || f2(i >> 128)) f3(); if (1 == 1 || f2(i << -10)) f3(); if (1 == 1 || f2(i << 128)) f3(); if (1 == 1 || i < 0xffffffff) f3(); if (1 == 1 ||...
google
chromium
Wswitch-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wswitch-1.C
1,280
utf_8
1602bd10d4608c803844306d2ef03513
/* PR c/4475, PR c++/3780 */ /* { dg-do compile } */ /* { dg-options "-Wswitch" } */ enum e { e1, e2 }; int foo (int i, int j, enum e ei, enum e ej, enum e ek, enum e el, enum e em, enum e en, enum e eo, enum e ep) { switch (i) { case 1: return 1; case 2: return 2; } switch (j) { case...
google
chromium
sequence-pt-3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/sequence-pt-3.C
328
utf_8
ad593aaafdf4b211b08e5be6b3abc282
/* More sequence point warning tests */ /* { dg-do compile } */ /* { dg-options "-Wsequence-point" } */ void bar(int i, int j) { return; } void foo (int i) { int a = i-i++; (void)a; /* { dg-warning "undefined" "sequence point warning" } */ bar (i--, i++); /* { dg-warning "undefined" "sequence point warning"...
google
chromium
write-strings
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/write-strings.C
134
utf_8
473862097a6bfdb68fff708f505e14db
// { dg-do compile } // { dg-options -Wwrite-strings } int main() { char* p = "Asgaard"; // { dg-warning "deprecated" } }
google
chromium
effc1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/effc1.C
358
utf_8
5e598309e0a011e0e37afcaf0b658c4f
// { dg-options -Weffc++ } // { dg-do compile } // Bug 5719 class A { public: A & operator+=( int ); A & operator+( int ); // { dg-warning ".* should return by value" "" } A operator+=( float ); A operator+( float ); };
google
chromium
Wuninitializable-member-no
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wuninitializable-member-no.C
393
utf_8
0101ac7bc499a86bdbc20c8ef3cfa386
// Test disabling // { dg-do compile } // { dg-options "-Wall -Wextra -Wno-uninitialized" } class X { int & flag;// { dg-bogus "non-static reference 'int& X::flag' in class without a constructor" } public: void f(){ flag++ ; } }; class Y { const int var;// { dg-bogus "non-static const member 'const int Y::var'...
google
chromium
pr36999
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/pr36999.C
773
utf_8
b731b5d32c1f477ed23555d37dcf870a
/* PR36999: Erroneous "does not declare anything" warnings. */ /* { dg-do compile } */ class C1 { public: class C2 { }; }; void cf1 (class C1::C2, void*); // { dg-bogus "does not declare anything" } void cf2 (void*, class C1::C2); void cf3 (C1::C2, void*); namespace N { enum E1 { foo }; enum E2 { bar }; templ...
google
chromium
implicit-typename3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/implicit-typename3.C
273
utf_8
5d559af51cd6e5fbe0dbb5a62a5d3366
// { dg-do compile } // PR c++/11039: Implicit typename warning in friend class declaration. template <typename T> struct X { struct Y { struct Z {}; }; template <typename U> friend struct Y::Z f(U); };
google
chromium
anonymous-namespace-3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/anonymous-namespace-3.C
289
utf_8
ad010b6ac9d0b345a59f0fa8f97a81e9
// Test for the warning of exposing types from an anonymous namespace // { dg-do compile } // #include <memory> #include "anonymous-namespace-3.h" struct B { std::auto_ptr<A> p; }; #line 10 "foo.C" struct C // { dg-warning "uses the anonymous namespace" } { std::auto_ptr<A> p; };
google
chromium
Winline-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Winline-2.C
92
utf_8
0e30443ee25811cad88723354c525b24
// PR c++/10929 // { dg-options "-Winline -O3" } int foo (); int bar () { return foo (); }
google
chromium
Wconversion-null
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wconversion-null.C
1,221
utf_8
c0ce42965ebf4e59b1164a436748625c
// { dg-do link } // { dg-options "-Wconversion -Wno-conversion-null -Wno-pointer-arith" } #include <cstddef> void g(int) {} void g(long) {} void g(long long) {} extern void g(void*); template <int I> void h() {} void k(int) {} template <class T> void l(T); template <> void l(int) {} template <> void l(long) {}...
google
chromium
overflow-warn-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/overflow-warn-1.C
4,414
utf_8
cf64ec3395dd527364ec5df44cd81c7f
/* { dg-do compile } */ /* { dg-options "-fpermissive" } */ #include <limits.h> enum e { E0 = INT_MAX, /* Unsigned overflow wraps around. */ E1 = UINT_MAX + 1, /* Overflow in an unevaluated part of an expression is OK (example in the standard). */ E2 = 2 || 1 / 0, /* { dg-bogus "warning: division by ze...
google
chromium
conv3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/conv3.C
66
utf_8
cc281c397d45da8c573eee459fc65fa7
// PR c++/19457 int i=-1; unsigned int j= ~0; // { dg-bogus "" }
google
chromium
Walways-true-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Walways-true-1.C
1,434
utf_8
c93a1243159bc35416087275a8c45a38
// Test -Waddress for testing an address against NULL. // { dg-do compile } // { dg-options "-Waddress" } extern int foo (int); int i; void bar (int a) { lab: if (foo) // { dg-warning "always evaluate as" "correct warning" } foo (0); if (foo (1)) ; if (&i) // { dg-warning "always evaluate as" "correct wa...
google
chromium
template-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/template-1.C
351
utf_8
6f90eb3a0f4a4e7f096197fba7797aff
//PR c++/11490 //Since N is know at instantiation time, there // should be no warning about comparision between // unsinged and signed interegers. // { dg-do compile } // { dg-options "-W" } template <int N> bool f() { unsigned int i=0; return i!=N; // { dg-bogus "signed and unsigned" } } template bool f<2> ();
google
chromium
Wunused-var-10
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wunused-var-10.C
354
utf_8
898eca8edc4214a3f0d47032d1e29a12
// PR c++/44412 // { dg-do compile } // { dg-options "-Wunused" } struct S { static const int a = 3; static int b; int c; }; const int S::a; int S::b = 4; int f1 () { S s; return s.a; } int f2 () { S s; return s.b; } void f3 () { S s; // { dg-warning "set but not used" } s.c = 6; } int f4 () { ...
google
chromium
pr23075
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/pr23075.C
176
utf_8
9f46d0be09249c34a6a9b97b99dcec35
// PR c/23075 // { dg-do compile } // { dg-options "-O2 -Wreturn-type" } int foo (void) { return; // { dg-error "with no value" } } // { dg-warning "no return statement" }
google
chromium
Wunused-label-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wunused-label-2.C
338
utf_8
0c7d97044e723227e4b7e6aaa771fe52
// { dg-do compile } // { dg-options "-Wunused" } // If __attribute__ ((unused)) follows a label and precedes a // declaration, we should get a warning for the label, not the // declaration. void f1() { int i1; // { dg-warning "unused variable" } l1: __attribute__ ((unused)) int i2; // { dg-warning "label \[^\n...
google
chromium
Wbraces2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wbraces2.C
715
utf_8
c2debf54ffb3d60acfddad10573c458f
// PR c++/20175 // { dg-options "-Wmissing-braces" } int a[2][2] = { 0, 1, 2, 3 }; // { dg-warning "missing braces" } int b[2][2] = { { 0, 1 }, { 2, 3 } }; int c[2][2] = { { { 0 }, 1 }, { 2, 3 } }; // { dg-error "braces around scalar" } struct S { char s[6]; int i; }; S d = { "hello", 1 }; S e = { { "hello" }, 1 };...
google
chromium
null4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/null4.C
1,663
utf_8
6bf805aeb1fce3c4508783b3ce563adb
// PR c++/24745 : warnings for NULL constant. // { dg-do compile } // { dg-options "-Wpointer-arith -Wconversion " } #include <cstddef> int foo (void) { if (NULL == 1) return -1; // { dg-warning "NULL used in arithmetic" } if (NULL > NULL) return -1; // { dg-warning "NULL used in arithmetic" } if (NULL < ...
google
chromium
Wuninitialized-4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wuninitialized-4.C
303
utf_8
be5b47714ba41b25933660896d6c7427
// PR middle-end/39666 // { dg-do compile } // { dg-options "-O2 -Wuninitialized" } int foo (int i) { int j; switch (i) { case -__INT_MAX__ - 1 ... -1: j = 6; break; case 0: j = 5; break; case 1 ... __INT_MAX__: j = 4; break; } return j; }
google
chromium
Wunused-var-14
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wunused-var-14.C
260
utf_8
2e3edc42171a0504591e1cb9f346f40d
// PR c++/44682 // { dg-do compile } // { dg-options "-Wunused" } struct S { virtual ~S () {} }; struct T { virtual ~T () {} }; struct U : S, T {}; void f (U &); void g (void *v) { T *t = static_cast <T *> (v); U *u = static_cast <U *> (t); f (*u); }
google
chromium
Wshadow-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wshadow-1.C
1,059
utf_8
5f3bcedcf90b0a88ec7f6f5dc569ce69
/* { dg-do compile } */ /* { dg-options -Wshadow } */ /* Source: Neil Booth, 3 Nov 2001, and PR 16, 713. -Wshadow was giving a bunch of warnings we didn't want, and wasn't giving the location of the shadowed variable. */ struct status // { dg-bogus "shadowed declaration" } { int member; void foo2 (); in...
google
chromium
Wunused-var-12
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wunused-var-12.C
417
utf_8
0023541206b814fe5d60ed4865062f86
// PR c++/44444 // { dg-do compile } // { dg-options "-Wunused" } struct S { const int &u; const int &v; S (const int &a, const int &b) : u(a), v(b) { } }; bool f1 () { bool t = false; S z = S (1, 2); t |= z.u == 1; t |= z.v == 2; return t; } void f2 () { S z = S (1, 2); z.u; // { dg-warning "no...
google
chromium
Wparentheses-20
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wparentheses-20.C
3,598
utf_8
1fee47e73503ddfb98374f911b0e3801
// { dg-do compile } // { dg-options "-Wparentheses" } // Template version of Wparentheses-11.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 "parentheses" ...
google
chromium
Wunused-var-7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wunused-var-7.C
708
utf_8
b81dd316dd30881afe998cc16667340f
// { dg-do compile } // { dg-options "-Wunused" } template <int N> void f1 (void) { _Complex int a; // { dg-warning "set but not used" } _Complex double b; // { dg-warning "set but not used" } __real__ a = 1; __imag__ a = 2; __real__ b = 3.0; __imag__ b = 4.0; } template <int N> int f2 (void) { _Complex...
google
chromium
Wreturn-type-6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wreturn-type-6.C
394
utf_8
3fe72d5bf9ad4827aa6ca7d33f8ca73d
/* PR c++/40749 */ /* { dg-do compile } */ /* { dg-options "-Wreturn-type" } */ struct A {}; const A a() {} /* { dg-warning "no return statement" } */ const A& b() {} /* { dg-warning "no return statement" } */ const int c() {} /* { dg-warning "no return statement" } */ template<class T> const int foo(T t) {} /* { dg...
google
chromium
Wstrict-aliasing-8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-8.C
372
utf_8
71435332433246858548fb92a3a29591
/* { dg-do compile } */ /* { dg-options "-Wstrict-aliasing=2 -O2 -Wall" } */ int a[2]; double *foo1(void) { return (double *)a; /* { dg-warning "strict-aliasing" } */ } double *foo2(void) { return (double *)&a[0]; /* { dg-warning "strict-aliasing" } */ } __complex__ double x; int *bar(void) { return (int *)&_...
google
chromium
pr33738
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/pr33738.C
413
utf_8
b0ed5d848bb9a90bfc02060f663d1579
// { dg-do run } // { dg-options "-O2 -Wtype-limits -fstrict-enums" } extern void link_error (void); enum Alpha { ZERO = 0, ONE, TWO, THREE }; Alpha a2; int m1 = -1; int GetM1() { return m1; } int main() { a2 = static_cast<Alpha>(GetM1()); if (a2 == -1) { // { dg-warning "always false due" } link_error (); ...
google
chromium
Wfloat-equal-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wfloat-equal-1.C
430
utf_8
5eb7ea7761d111befc6050ff4baa1559
/* PR c/19999 */ /* { dg-do compile } */ /* { dg-options "-Wfloat-equal" } */ double a, b; _Complex double c, d; int f(void) { return a == b; } /* { dg-warning "comparing floating point" } */ int g(void) { return c == d; } /* { dg-warning "comparing floating point" } */ int h(void) { return a != b; } /* { dg-warning "...
google
chromium
Wparentheses-14
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wparentheses-14.C
586
utf_8
e151ff9706ff8f8d25eb870b6f099bc2
// { dg-do compile } // { dg-options "-Wparentheses" } // Template version of Wparentheses-2.C. int foo (int); int a, b, c; bool d; template<class T> void bar (T) { if (a += b) foo (0); if (a -= a) foo (1); if (b *= c) foo (2); else foo (3); if (b /= b) foo (4); else foo (5); w...
google
chromium
Wunused-parm-3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wunused-parm-3.C
914
utf_8
e2b1e313bf63113458031cd03d300763
// { dg-do compile } // { dg-options "-Wunused -W" } // Suppress a warning that is irrelevant to the purpose of this test. // { dg-options "-Wunused -W -Wno-abi" { target arm_eabi } } #include <stdarg.h> struct A { long a; A () : a (0) { } A (long x) : a (x) { } operator long () const { return a; } long ope...
google
chromium
Wstrict-aliasing-float-ref-int-obj
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C
374
utf_8
140519c3077f3a55faa2ca6cecef68de
/* { dg-do compile } */ /* { dg-options "-O2 -Wstrict-aliasing -fstrict-aliasing" } */ int foo() { int x; float& q = reinterpret_cast<float&> (x); /* { dg-message "dereferencing type-punned" "" { target *-*-* } } */ q = 1.0; /* { dg-warning "does break strict-aliasing" "" { xfail *-*-* } } */ return x; } /*...
google
chromium
pr8715
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/pr8715.C
192
utf_8
a6a330b9948ca9b7ebe194a6edd63903
/* { dg-do compile } */ /* { dg-options "-Wsign-compare" } */ int foo() { unsigned char b = '1'; bool x = ~b; /* { dg-warning "promoted ~unsigned is always non-zero" } */ return 0; }
google
chromium
pr30551
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/pr30551.C
315
utf_8
8cfb784bce12acc66c8663f55f1f3481
// PR 30551 -Wmain is enabled by default. // { dg-do compile } // { dg-options "" } // { dg-skip-if "-Wmain not enabled on SPU" { spu-*-* } } int main(char a) {} /* { dg-warning "first argument of .*main.* should be .int." } */ /* { dg-warning "main.* takes only zero or two arguments" "" { target *-*-* } 5 } */
google
chromium
pointer-integer-comparison
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/pointer-integer-comparison.C
790
utf_8
f8f2c98db3d6299492ead2d45e4b5e37
// { dg-do compile } // { dg-options "-fsyntax-only -fpermissive" } int foo (int i, void *p) { if (i == p) // { dg-warning "ISO C.. forbids comparison between pointer and integer" } return 0; else if (i != p) // { dg-warning "ISO C.. forbids comparison between pointer and integer" } return 1; } int bar (...
google
chromium
Wdouble-promotion
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wdouble-promotion.C
3,162
utf_8
4b97352d51a15b58d348e0360b5c76b2
/* { dg-do compile } */ /* { dg-options "-Wdouble-promotion" } */ #include <stddef.h> /* Some targets do not provide <complex.h> so we define I ourselves. */ #define I 1.0iF #define ID ((_Complex double)I) float f; double d; int i; long double ld; _Complex float cf; _Complex double cd; _Complex long double cld; siz...
google
chromium
Wparentheses-11
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wparentheses-11.C
3,515
utf_8
3be49cd413635d5c6d8228545da74c15
// { dg-do compile } // { dg-options "-Wparentheses" } // C++ version of gcc.dg/Wparentheses-8.c int foo (int); int bar (int a, int b, int c) { foo (a + b & c); // { dg-warning "parentheses" "correct warning" } foo ((a + b) & c); foo (a + (b & c)); foo (1 + 2 & c); // { dg-warning "parentheses" "correct warn...
google
chromium
ignored_typedef
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/ignored_typedef.C
830
utf_8
8ab4f00d5edff6f6c7baa38049347237
// PR c++/23689 // Test that malformed typedef's produce a compiler warning. typedef char valid_0; typedef int valid_1; typedef long valid_2; typedef float valid_3; typedef double valid_4; typedef unsigned valid_5; typedef int *valid_6; typedef struct valid_7 {} valid_8; typedef struct {} valid_9; typedef int temp_0; ...
google
chromium
pragma-system_header3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/pragma-system_header3.C
110
utf_8
731cdbbff9a041d6f86a91b8596ae256
// PR c++/32368 // { dg-options "-Wall -O" } #include "pragma-system_header3.h" int main() { return f(); }
google
chromium
Wparentheses-8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wparentheses-8.C
851
utf_8
1440e102f955e4e422a63b32d881465f
// { dg-do compile } // { dg-options "-Wparentheses" } // C++ version of gcc.dg/Wparentheses-5.c int foo (int); int bar (int a, int b, int c) { foo (a && b || c); // { dg-warning "parentheses" "correct warning" } foo ((a && b) || c); foo (a && (b || c)); foo (1 && 2 || c); // { dg-warning "parentheses" "corr...
google
chromium
noeffect6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/noeffect6.C
239
utf_8
58c48dbaffba495d57fb0bf370f50060
// { dg-options "-Wall" } // PR c++/15083 extern "C" int printf(const char*,...); struct Counter { Counter(){printf("Hello World.\n");} }; template< typename T > void resetData() { new Counter(); } int main() { resetData<int>(); }
google
chromium
pragma-system_header4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/pragma-system_header4.C
93
utf_8
1fdb0226c11f07a183a891197a82305b
// PR c++/32256 // { dg-options "-Wall" } #include "pragma-system_header4.h" void ok() { }
google
chromium
Wreturn-type-3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wreturn-type-3.C
142
utf_8
0877959d4ff69bc477955ce1ceadb231
// PR middle-end/19583 // { dg-options "-Wreturn-type -O" } struct E{}; inline int bar() throw(E) { return 0; } void foo () { bar(); }
google
chromium
Wconversion-null-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wconversion-null-2.C
1,413
utf_8
505d18bc54f888f6ca010fe74487e7e0
// { dg-do link } // { dg-options "" } #include <cstddef> void g(int) {} void g(long) {} void g(long long) {} extern void g(void*); template <int I> void h() {} void k(int) {} template <class T> void l(T); template <> void l(int) {} template <> void l(long) {} template <> void l(long long) {} int main() { i...
google
chromium
Wunused-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wunused-1.C
288
utf_8
d08f8f4d2f55349741193b20c16afa1a
// Test whether -Wunused handles empty classes the same as non-empty. // { dg-do compile } // { dg-options "-Wunused" } struct A {}; struct B { char c; }; void foo () { struct A a0, a1; struct B b0, b1 = { 25 }; a0 = a1; // { dg-bogus "value computed is not used" } b0 = b1; }
google
chromium
Wdiv-by-zero
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wdiv-by-zero.C
156
utf_8
c71f5fb3792e0ba57c0a4e43cd39038f
// test that division by zero warnings are enabled by default int breakme() { int x = 0; x /= 0; // { dg-warning "division by" } return x; }
google
chromium
Wswitch-3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wswitch-3.C
629
utf_8
d2e4a4d8e8ab5acfd1a2c4346dddffd3
/* { dg-do compile } */ /* { dg-options "-Wswitch" } */ enum E { A, B, C, D, E, F }; int f1 (enum E e) { switch (e) { case A: return 1; case B: return 2; case C: return 3; case D: return 4; case E: return 5; case F: return 6; case 7: return 7; /* { dg-warning "not in enumerated type"...
google
chromium
Wlogical-op-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wlogical-op-1.C
1,603
utf_8
90a871726cae9dea93ce0da4b5bb7b2c
// { dg-do compile } // { dg-options "-Wlogical-op" } enum { a, b1, b2 }; enum testenum { t1, t2}; extern int c; extern bool bool_a, bool_b; template<typename Enum> class QFlags { public: typedef void **Zero; int i; inline QFlags(Enum f) : i(f) {} inline operator int() const { return i;} }; Q...
google
chromium
Warray-bounds
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Warray-bounds.C
2,461
utf_8
b1f89524960615092626095cd38d9d33
/* { dg-do compile } */ /* { dg-options "-O2 -Warray-bounds" } */ int a[10]; extern "C" __SIZE_TYPE__ strlen(const char *s); static inline int n(void) { return strlen("12345"); } void g(int *p); void h(int p); int* f(void) { int b[10]; int i; struct { int c[10]; } c; a[-1] = 0; ...
google
chromium
Wnull-conversion-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/warn/Wnull-conversion-2.C
956
utf_8
7612268fc1d96d20aa8372be5730baee
// { dg-do compile } // { dg-options "-Wconversion-null" } #include <stddef.h> class Foo { public: template <typename T1, typename T2> static void Compare(const T1& expected, const T2& actual) { } template <typename T1, typename T2> static void Compare(const T1& expected, T2* actual) { } }; template<typen...