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 | spec32 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/template/spec32.C | 118 | utf_8 | f2a0b8ac9757fbcaba8addb591bb1e06 | //PR c++/28861
struct A
{
template<template<int> class B> struct B<0>; // { dg-error "name of class shadows" }
};
|
google | chromium | overload1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/template/overload1.C | 456 | utf_8 | 6cba2353f6c7917dd350506e390d9379 | // { dg-options "-w" }
// PR c++/9420
// Bug: We were instantiating B<int> during overload resolution for E<0.
// This is wrong; the contents of B<int> are not relevant, since we can't
// use its constructors (because we'd already be using a constructor for
// C).
enum { E };
template <typename T> struct A {
static... |
google | chromium | qualttp12 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/template/qualttp12.C | 348 | utf_8 | f5d74cc14dee1391fe409d4d0258396e | // { dg-do link }
struct A
{
template <class T> class B {};
};
template <template <class> class TT> void f()
{
TT<int> y;
}
template <class T> struct C
{
void g() { f<T::template B>(); }
};
int main()
{
C<A> c;
c.g();
} |
google | chromium | anon4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/template/anon4.C | 153 | utf_8 | 66a2a8fd730ed0d9822656e2f45bc924 | // PR c++/28407
// A declaration in the anonymous namespace still has external linkage.
template <int *P> class A { };
namespace
{
int i;
}
A<&i> a;
|
google | chromium | miss-format-5 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/miss-format-5.C | 1,043 | utf_8 | e8e1065301c5aeeb1cd383514614b891 | /* { dg-do compile } */
/* { dg-options "-Wmissing-format-attribute" } */
/* { dg-options "-Wmissing-format-attribute -Wno-abi" { target arm_eabi } } */
#include <stdarg.h>
typedef void (*noattr_t) (const char *, ...);
typedef noattr_t __attribute__ ((__format__(__printf__, 1, 2))) attr_t;
typedef void (*vnoattr_t) (co... |
google | chromium | noeffect4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/noeffect4.C | 1,664 | utf_8 | 47abb50388371f2e04be3021b86e14cf | // { dg-do compile }
// { dg-options "-Wall" }
// PR 12037.
struct X
{
int operator+(int);
int operator-(int);
int operator*(int);
int operator/(int);
int operator%(int);
int operator>>(int);
int operator<<(int);
int operator&(int);
int operator|(int);
int operator^(int);
int operator&&(int);
in... |
google | chromium | Wparentheses-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wparentheses-2.C | 734 | utf_8 | ea3c2716291fc812b8d00190b207f31b | // Test operation of -Wparentheses. Warnings for assignments used as
// truth-values shouldn't apply other than for plain assignment.
// Essentially the same as gcc.dg/Wparentheses-10.c.
// { dg-do compile }
// { dg-options "-Wparentheses" }
int foo (int);
int a, b, c;
bool d;
void
bar (void)
{
if (a += b)
foo (... |
google | chromium | Wuninitialized-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wuninitialized-2.C | 1,134 | utf_8 | 21fc5ac0f1ee255b648d071723254d87 | /* { dg-do compile } */
/* { dg-options "-O -Wuninitialized" } */
struct S8 { template<typename T> S8(T) { } };
template<typename T> struct S10;
template<typename T> struct S10<T()> { typedef T S12; typedef S8 S1(); };
template<typename T> struct S3 { };
template<typename T> struct S11 { S11(S3<T>); };
struct S2
{
... |
google | chromium | pr12242 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/pr12242.C | 1,443 | utf_8 | ce1abb041d2bb27e9f937c6116b0ee0b | // PR 12242: should warn about out-of-range int->enum conversions
// { dg-do compile }
// { dg-options "-Wconversion -fpermissive" }
enum X { A };
enum Y { B, C, D };
void example ()
{
int i = 5;
X x;
Y y;
x = 10; // { dg-warning "invalid conversion from .int. to .X." }
// { dg-warning "unspecifi... |
google | chromium | Wstrict-aliasing-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-1.C | 161 | utf_8 | 44dc4b5572b60846a2322e12b0510783 | /* { dg-do compile } */
/* { dg-options "-Wstrict-aliasing=2 -O2" } */
double x;
int *foo(void)
{
return (int *)&x; /* { dg-warning "strict-aliasing" } */
}
|
google | chromium | Wparentheses-13 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wparentheses-13.C | 1,597 | utf_8 | 5ec4281a5ed051f3e732c3a823a04787 | // { dg-do compile }
// { dg-options "-Wparentheses" }
// Template version of Wparentheses-1.C.
int foo (int);
int a, b, c;
bool d;
template<class T>
void
bar (T)
{
if (a = b) // { dg-warning "assignment" "correct warning" }
foo (0);
if ((a = b))
foo (1);
if (a = a) // { dg-warning "assignment" "corre... |
google | chromium | Wtype-limits | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wtype-limits.C | 3,287 | utf_8 | 22df2210e32160eed4b3f51bb9773e8b | /* { dg-do compile } */
/* { dg-options "-Wtype-limits" } */
extern void assert (int);
void a (unsigned char x)
{
if (x < 0) return;/* { dg-warning "comparison is always false due to limited range of data type" } */
if (x >= 0) return;/* { dg-warning "comparison is always true due to limited range of data type" ... |
google | chromium | Wunused-10 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wunused-10.C | 142 | utf_8 | 09723811a7331dcc7580068bdfe05710 | // PR c++/19190
// { dg-options "-Wunused" }
struct breakme
{
void setAction( unsigned char a ) { act = a; }
unsigned int act:8;
};
|
google | chromium | deprecated-3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/deprecated-3.C | 307 | utf_8 | 2fc2da2424134931e2b72759c1c0e59d | /* PR 17947 bad warning with implicit conversion and __attribute__((deprecated)) */
/* { dg-do compile } */
/* { dg-options "" } */
struct Foo
{
operator int() __attribute__((deprecated));
};
void g(void)
{
Foo f;
(int)f; // { dg-warning "'Foo::operator int\\(\\)' is deprecated \\(declared at" }
}
|
google | chromium | deprecated-4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/deprecated-4.C | 159 | utf_8 | 98c2c2dc0644115f45902f826dc56a04 | // PR c++/15269
struct B {
virtual int foo() __attribute__((deprecated));
};
int main(void) {
((B*)0)->foo(); // { dg-warning "deprecated" }
}
|
google | chromium | ctor-init-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/ctor-init-1.C | 148 | utf_8 | 85dc72a0303b57c698ce2804c195f5b0 | // PR c++/11554
// { dg-options "-Wall" }
struct Y {
Y ();
int i1, i2; // { dg-warning "" }
};
Y::Y () : i2(0), i1(0) {} // { dg-warning "" }
|
google | chromium | register-var-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/register-var-1.C | 296 | utf_8 | 91dd53b7d7d2954e6728c3851a3a75e9 | /* PR/18160 */
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
/* This should yield an error even without -pedantic. */
/* { dg-options "-ansi" } */
void g(int *);
void f(void)
{
register int x __asm ("eax");
g(&x); /* { dg-error "address of explicit register variable" } */
}
|
google | chromium | Wstrict-aliasing-6 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-6.C | 166 | utf_8 | c92cdb0aebb5d139da6039eb73219857 | /* { dg-do compile } */
/* { dg-options "-Wstrict-aliasing=2 -O2" } */
int foo ()
{
char buf[8];
return *((int *)buf); /* { dg-warning "strict-aliasing" } */
}
|
google | chromium | deprecated | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/deprecated.C | 3,818 | utf_8 | 966c33cf349322b3b99faf7895c5cca3 | /* Test __attribute__ ((deprecated)) */
/* { dg-do compile } */
/* { dg-options "-Wdeprecated-declarations -fmessage-length=0" } */
#if 1
typedef int INT1 __attribute__((deprecated));
typedef INT1 INT2 __attribute__ ((__deprecated__));
typedef INT1 INT1a; /* { dg-warning "'INT1' is deprecated" "" } */
typedef INT1... |
google | chromium | ctor1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/ctor1.C | 165 | utf_8 | 450b64494a8df8181368be08d23e5bf9 | // PR c++/35734
// { dg-options "-W" }
struct A
{
A();
template<typename T> A(const T&);
};
struct B : A
{
B(const B&) {} // { dg-warning "base class" }
};
|
google | chromium | Wchar-subscripts | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wchar-subscripts.C | 228 | utf_8 | 405a43ec2fe3003f95668d54092d08b1 | // { dg-do compile }
// { dg-options "-Wchar-subscripts" }
int main()
{
int ary[256] = { 0 };
return ary['a'];
} |
google | chromium | conv4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/conv4.C | 251 | utf_8 | e668b1c05f8d62f23aa769b40e21b385 | // { dg-do compile }
// This file should compile cleanly by default and not warn on the conversions.
int func1(int i)
{
return i;
}
int main()
{
float f;
long l;
unsigned long ul;
f = 1.5f;
l = f;
ul = -1;
func1(f);
return 0;
}
|
google | chromium | Wreturn-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wreturn-1.C | 171 | utf_8 | 39d7f3f2b6a28c609038dedf0f24d03c | // { dg-options "-Wreturn-type" }
// PR c++/15742
extern void exit(int) __attribute__ ((noreturn));
template<typename T>
struct A {
int find_cmp(void) { exit(1); }
};
|
google | chromium | unused-result1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/unused-result1.C | 246 | utf_8 | c3c7b4b0c968cb9b44b95aca9b7f230c | // PR c++/27371
class QByteArray {
public:
QByteArray(const QByteArray &);
};
class QString {
QByteArray toLocal8Bit() const __attribute__ ((warn_unused_result));
void fooWarnHere() const { toLocal8Bit(); } // { dg-warning "ignoring" }
};
|
google | chromium | Wtype-limits-Wextra | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wtype-limits-Wextra.C | 3,334 | utf_8 | 633c61179699c1cca2e51dfaf2b48aa2 | /* Test that -Wtype-limits is enabled by -Wextra. */
/* { dg-do compile } */
/* { dg-options "-Wextra" } */
extern void assert (int);
void a (unsigned char x)
{
if (x < 0) return;/* { dg-warning "comparison is always false due to limited range of data type" } */
if (x >= 0) return;/* { dg-warning "comparison is ... |
google | chromium | implicit-typename2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/implicit-typename2.C | 246 | utf_8 | f69540cf16bb392d5bf1e5edfc8e067e | // { dg-do compile }
// PR c++/11039: Implicit typename warning in friend class declaration.
template <typename T> struct X {
struct Y {
struct Z {};
};
friend struct Y::Z;
}; |
google | chromium | miss-format-6 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/miss-format-6.C | 952 | utf_8 | aa07b1519cde34fc8f8e23f6aa2bb1ab | /* { dg-do compile } */
/* { dg-options "-Wmissing-format-attribute" } */
/* { dg-options "-Wmissing-format-attribute -Wno-abi" { target arm_eabi } } */
#include <stdarg.h>
typedef void (*noattr_t) (const char *, ...);
typedef noattr_t __attribute__ ((__format__(__printf__, 1, 2))) attr_t;
typedef void (*vnoattr_t) (co... |
google | chromium | noreturn-4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/noreturn-4.C | 196 | utf_8 | 779a5460d67225b277c3918f1550c055 | // PR c++/30988
// { dg-do compile }
// { dg-options "-O2 -Wall" }
void f (const char *) __attribute__ ((noreturn));
template <typename T> struct A
{
int g ()
{
f (__FUNCTION__);
}
};
|
google | chromium | Wstrict-aliasing-bogus-union | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-union.C | 241 | utf_8 | 81024e5e796ea1637204d6a421f3c1bb | /* { dg-do compile } */
/* { dg-options "-O2 -Wstrict-aliasing -fstrict-aliasing" } */
union U {
int i;
float f;
};
float foo () {
union U u;
float* f = &u.f; /* { dg-bogus "unions are holy in GCC" } */
u.i = 2;
return *f;
}
|
google | chromium | main-3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/main-3.C | 130 | utf_8 | 43a7ad018e2ced981acc916d2df8f96b | // PR c++/29735
// { dg-do compile }
int __attribute__ ((vector_size (8))) main () // { dg-error "must return" }
{
return 0;
}
|
google | chromium | Wshadow-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wshadow-2.C | 166 | utf_8 | 6a6527871d476c4275232fa53d041994 | /* { dg-options "-Wshadow" } */
struct A {
void a1 () {
struct B { B() {} }; // There should be no warning here.
}
void a2 () {
struct B { };
}
};
|
google | chromium | Wbraces1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wbraces1.C | 105 | utf_8 | d489a76c7b7ab5b0e165f2342a4e6974 | // PR c++/19755
// { dg-options "-Wmissing-braces" }
int a[2][2] = { 0, 1 , 2, 3 }; // { dg-warning "" }
|
google | chromium | Wstrict-aliasing-bogus-escape | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-escape.C | 330 | utf_8 | fd3e58149ce1fbe517a6bbeb205ae2d9 | /* { dg-do compile } */
/* { dg-options "-O2 -Wstrict-aliasing" } */
#include <string>
#include <list>
class A;
class B {
public:
void foo(A&);
std::string s;
};
class A {
public:
A& qaz() {
l.push_back( new A() );
return *l.back();
}
std::list<A*> l;
};
void bar()
{
A a;
B b;
b.foo(a.q... |
google | chromium | format3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/format3.C | 209 | utf_8 | 449301e4fc095134d15ba50f081d6eb2 | // PR c++/13070
// { dg-do compile }
// { dg-options "-Wformat" }
extern "C" int printf (const char*, ...);
int main()
{
printf("%d\n", 1, 1); // { dg-warning "too many" "printf warning" }
return 0;
}
|
google | chromium | noreturn-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/noreturn-1.C | 835 | utf_8 | acf9323dc369473d47e1a02ca5461933 | // Test that noreturn attributes are properly set.
// { dg-do compile }
// { dg-options "-Wall -O2" }
#include <cstdlib>
int foo1 (int i)
{
switch (i)
{
case 1:
case 2:
return i;
}
abort();
}
int foo2 (int i)
{
switch (i)
{
case 1:
case 2:
return i;
}
std::abort();
}
... |
google | chromium | forward-inner | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/forward-inner.C | 2,238 | utf_8 | 1f0476e3269f2970342394b1b77e8639 | // Check that the compiler warns about inner-style forward declarations in
// contexts where they're not actually illegal, but merely useless.
// Verify warnings for and within classes, and by extension, struct and union.
class C1;
class C1::C2; // { dg-error "does not name a type" }
class C1::C2::C3; // { dg-er... |
google | chromium | Winline-3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Winline-3.C | 114 | utf_8 | e5e6d08567eb0a03fffadca1da754cde | // { dg-options "-Winline -O" }
#include <vector>
using namespace std;
int main(void)
{
vector<int> v(10);
}
|
google | chromium | Wparentheses-7 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wparentheses-7.C | 2,882 | utf_8 | 6123d47b0c90e76bcd5c6a33cbd024bd | // { dg-do compile }
// { dg-options "-Wparentheses" }
// C++ copy of gcc.dg/Wparentheses-4.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 war... |
google | chromium | Wuninitialized-5 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wuninitialized-5.C | 349 | utf_8 | b57532e54618b9d07b92a66d0300d597 | // PR middle-end/39666
// { dg-do compile }
// { dg-options "-O2 -Wuninitialized" }
int
foo (int i)
{
int j; // { dg-warning "may be used uninitialized" }
switch (i)
{
case -__INT_MAX__ - 1 ... -1:
j = 6;
break;
case 0:
j = 5;
break;
case 2 ... __INT_MAX__:
j = 4;
... |
google | chromium | Winline-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Winline-1.C | 139 | utf_8 | 99a0635e430cefd28c2908b5aaf4a487 | // { dg-options "-Winline -O2" }
static inline int foo(int x);
int main()
{
return(foo(17));
}
inline int foo(int x) { return(x); }
|
google | chromium | Wextra-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wextra-1.C | 421 | utf_8 | d267dddcbfdc3e1208a643c82d1c0886 | // { dg-options "-Wextra" }
struct T {
// If the implicitly-declared default constructor for "T" is
// required, an error will be issued because "i" cannot be
// initialized. And, this class is not an aggregate, so it cannot
// be brace-initialized. Thus, there is no way to create an object
// of this clas... |
google | chromium | ctor-dtor-privacy-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/ctor-dtor-privacy-1.C | 180 | utf_8 | d5fcd483303360915cb089b93fa1cd74 | // { dg-options "-Wctor-dtor-privacy" }
struct C { // { dg-warning "" }
static bool result;
private:
static bool check();
};
bool C::result = check();
|
google | chromium | Wvla-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wvla-2.C | 171 | utf_8 | 5efc219075389443353d3000bb084e7f | /* { dg-do compile } */
/* { dg-options "-pedantic-errors -Wvla" } */
void func (int i)
{
int array[i]; /* { dg-error "ISO C.* forbids variable.* array 'array'" } */
}
|
google | chromium | return-reference2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/return-reference2.C | 208 | utf_8 | 4c118508219f3e8fd47de507e2333e9c | // PR c++/26671
class A
{
public:
int first;
int second;
};
int &f()
{
A a; // { dg-warning "local" }
return a.second;
}
int &g()
{
int ar[42]; // { dg-warning "local" }
return ar[20];
}
|
google | chromium | overflow-warn-5 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/overflow-warn-5.C | 204 | utf_8 | 5e58c6b8aa194d77a49a2b3f377f2bdd | /* PR c/27273 */
/* { dg-do compile } */
/* { dg-options "-Woverflow" } */
unsigned char rx_async(unsigned char p) {
return p & 512; /* { dg-warning "overflow in implicit constant conversion" } */
}
|
google | chromium | miss-format-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/miss-format-2.C | 465 | utf_8 | 16abc69e85d22f8f70a63462a1b1b3a7 | /* Test for warnings for missing format attributes. Don't warn if no
/* { dg-do compile } */
/* { dg-options "-Wmissing-format-attribute" } */
#include <stdio.h>
#include <stdarg.h>
void
foo (int i, ...)
{
va_list ap;
va_start (ap, i);
vprintf ("Foo %s bar %s", ap); /* { dg-bogus "candidate" "bogus printf attrib... |
google | chromium | Wreturn-3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wreturn-3.C | 234 | utf_8 | d0e225992bc2f0e5e2e51d846e21a8b4 | // { dg-options "-Wreturn-type" }
// PR c++/20624
struct fpos {
fpos(int __pos) {}
};
struct g {
g();
~g();
};
fpos seekoff(int b, int c)
{
g __buf;
if (b != -1 && c >= 0)
return fpos(-1);
else
return fpos(-1);
}
|
google | chromium | Wconversion-pr34389 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wconversion-pr34389.C | 1,074 | utf_8 | 2c4607ce27b629a3ea583bebe9da3a48 | /* PR 34389 */
/* { dg-do compile } */
/* { dg-options "-Wconversion -Wsign-conversion" } */
/* { dg-require-effective-target int32plus } */
short mask1(short x)
{
short y = 0x7fff;
return x & y; /* { dg-bogus "conversion" "bogus warning" } */
}
short mask2(short ssx)
{
short ssy;
short ssz;
ssz = ((int)s... |
google | chromium | conversion-function-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/conversion-function-1.C | 183 | utf_8 | a13aaa30037789e1fbc1e83bdcbaff93 | // { dg-options "-Wno-conversion" }
struct A {
operator A&();
}; |
google | chromium | Wreturn-type-4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wreturn-type-4.C | 1,146 | utf_8 | c67eecc224709de2dbabbe0dfa18cef4 | /* PR c++/18313 */
/* { dg-do compile } */
/* { dg-options "-Wignored-qualifiers" } */
volatile void bar(); /* { dg-warning "type qualifiers ignored" } */
struct A
{
const int bla(); /* { dg-warning "type qualifiers ignored" } */
static const A getA(); /* { dg-bogus "type qualifiers" } */
};
template<typenam... |
google | chromium | sentinel | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/sentinel.C | 348 | utf_8 | 5e583edd642b46c07735de366c4d0f59 | /* { dg-do compile } */
/* { dg-options "-Wall" } */
extern void ex (int i, ...) __attribute__ ((__sentinel__(0)));
void f()
{
ex (1, 0); /* { dg-warning "missing sentinel in function call" "" } */
ex (1, 0L); /* { dg-warning "missing sentinel in function call" "" } */
ex (1, (void *)0);
ex (1, __null); /* {... |
google | chromium | Wparentheses-12 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wparentheses-12.C | 812 | utf_8 | c35ecaecfd511c9ca7d99d1d0c295518 | // { dg-do compile }
// { dg-options "-Wparentheses" }
// C++ version of gcc.dg/Wparentheses-9.c
int foo (int);
int a, b, c;
int
bar (void)
{
if (a)
foo (0);
if (b)
foo (1);
else
foo (2);
foo (8);
else
foo (9);
else
foo (10);
if (a)
if (b)
foo (15);
else
foo (16);
e... |
google | chromium | main-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/main-2.C | 295 | utf_8 | c10ffa59cbc975e37cf002ed2e59ae32 | // { dg-do compile }
// Make sure that the type of f1 does not change
// after the error of main about not returning
// int.
// PR c++/23229
void f1();
void
main() /* { dg-error "must return" } */
{
f1();
}
void f1()
{
} |
google | chromium | weak1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/weak1.C | 412 | utf_8 | ba589737ac3b06a0d9c482001bbcf422 | // { dg-do run }
// { dg-require-weak "" }
// The PA HP-UX dynamic loader doesn't support unsatisfied weak symbols.
// { dg-skip-if "No unsat" { hppa*-*-hpux* } { "*" } { "" } }
// The darwin loader does, but they do need to exist at link time.
// { dg-skip-if "No link unsat" { *-*-darwin* } { "*" } { "" } }
extern vo... |
google | chromium | pr34985 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/pr34985.C | 275 | utf_8 | 78c676c6637b4d7cf784aaf33aaa6b18 | /* PR34985: Warning "defined but not used" despite __attribute__((__used__)) */
/* { dg-do compile } */
/* { dg-options "-Wall -Wextra -O2" } */
static void xxyyzz (void);
static void __attribute__((__used__)) xxyyzz(void)
{
}
/* { dg-final { scan-assembler "xxyyzz" } } */
|
google | chromium | Wvla-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wvla-1.C | 153 | utf_8 | 88cbfbefd99299b6c8b18623d110b670 | /* { dg-do compile } */
/* { dg-options "-Wvla" } */
void func (int i)
{
int array[i]; /* { dg-warning "variable length array 'array' is used" } */
}
|
google | chromium | Wparentheses-6 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wparentheses-6.C | 2,202 | utf_8 | 707ccbf6767343299198f33f687b6ec0 | // { dg-do compile }
// { dg-options "-Wparentheses" }
// C++ version of gcc.dg/Wparentheses-2.c.
int foo (int);
int
bar (int a, int b, int c)
{
foo (a <= b <= c); // { dg-warning "comparison" "correct warning" }
foo ((a <= b) <= c);
foo (a <= (b <= c));
foo (1 <= 2 <= c); // { dg-warning "comparison" "corre... |
google | chromium | Walways-true-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Walways-true-2.C | 1,273 | utf_8 | 72a7c932ad74d7d7a693d30ccd2d397c | // Make sure we don't assume that a weak symbol is always non-NULL.
// This is just like Walways-true-1.C, except that it uses a weak
// symbol.
// { dg-do compile}
// { dg-options "-Waddress" }
// { dg-require-weak "" }
extern int foo (int) __attribute__ ((weak));
int i __attribute__ ((weak));
void
bar (int a)
{
lab:... |
google | chromium | Wunused-3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wunused-3.C | 158 | utf_8 | 19f1d5b223a75e9107f8207c10aa080c | // { dg-do compile }
// { dg-options "-Wunused -O" }
void do_cleanups();
class Cleanup {
public:
~Cleanup() { do_cleanups();}
};
static Cleanup dummy;
|
google | chromium | inline1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/inline1.C | 548 | utf_8 | 0c33b46fd2f31938e2ff6fb7fc3f0b90 | // { dg-do compile }
// PR 4803. Used inline functions must have a definition.
inline void Foo1 (); // { dg-warning "inline function" "" }
inline void Bar1 ();
template <typename T> inline void Foo2(T); // { dg-warning "inline function" "" }
template <typename T> inline void Bar2(T);
void Baz ()
{
Foo1 ();
Foo2 ... |
google | chromium | Wparentheses-10 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wparentheses-10.C | 4,181 | utf_8 | 8c1be4fe2c44958f9fdf70a20cd94fbe | // { dg-do compile }
// { dg-options "-Wparentheses" }
// C++ version of gcc.dg/Wparentheses-7.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 | inline2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/inline2.C | 245 | utf_8 | 7c84293b9be13f3fdd30d3803765a5c4 | // PR c++/21627
template<typename T>
struct TPL
{
TPL (){}
~TPL (){}
void method () {}
};
template <> TPL<int>::TPL ();
template <> TPL<int>::~TPL ();
template <> void TPL<int>::method ();
void Foo ()
{
TPL<int> i;
i.method ();
}
|
google | chromium | Wuninitialized-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wuninitialized-1.C | 246 | utf_8 | fe4c6303d7ec13423e71cfb150c05d00 | /* { dg-options "-O2 -Wuninitialized" } */
struct Empty { Empty() {} }; /* { dg-bogus "uninitialized" } */
struct Other {
Other(const Empty& e_) : e(e_) {}
Empty e;
};
void bar(Other&);
void foo()
{
Empty e;
Other o(e);
bar(o);
}
|
google | chromium | conv1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/conv1.C | 477 | utf_8 | 85be959a24d4346758266af7cda69d72 | // { dg-do compile }
// PR 10337, unneeded warning
class A {
public:
A() {}
};
class B : public A {
public:
B() {}
void operator=(const A& b) {}
void operator=(const B& b) {}
};
class C {
public:
C() {}
operator B &() { return _b; }
operator const B &() const { return _b; }
B _b;
};
int main() ... |
google | chromium | Woverflow-3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Woverflow-3.C | 111 | utf_8 | c8cfeb1be8b9ab6b1a5bf044e67e73e2 | /* { dg-do compile } */
/* { dg-options "-O2 -Wno-overflow" } */
#include <limits.h>
int foo = INT_MAX + 1;
|
google | chromium | Wstring-literal-comparison-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wstring-literal-comparison-2.C | 370 | utf_8 | c608f5d02a06d2e24d8ab0ca0d977f67 | /* PR c/7776 */
/* { dg-do compile } */
/* { dg-options "-Wall" } */
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";
}
i... |
google | chromium | Wvla-3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wvla-3.C | 112 | utf_8 | 43ab54c8c4c6f2ba5ea4192d282a669e | /* { dg-do compile } */
/* { dg-options "-pedantic-errors -Wno-vla" } */
void func (int i)
{
int array[i];
}
|
google | chromium | Wuninitialized-3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wuninitialized-3.C | 246 | utf_8 | ff7e55750a566580a7e5b746cf7dfa22 | // PR C++/38908
// { dg-options "-Wuninitialized -O" }
struct empty {};
struct dfs_visitor {
dfs_visitor() { }
empty m_vis;
};
void bar(const dfs_visitor&);
void foo(void)
{
dfs_visitor vis;
dfs_visitor vis2 = vis;
bar (vis2);
}
|
google | chromium | deprecated-5 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/deprecated-5.C | 123 | utf_8 | 9fb0087e50484de53d979d8e849be2eb | // PR c++/16370
struct Foo { int i; } __attribute__ ((deprecated));
void foo() { Foo f; } // { dg-warning "deprecated" }
|
google | chromium | multiple-overflow-warn-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/multiple-overflow-warn-1.C | 357 | utf_8 | 1843c11c874c72ec8512fdb7ee86990e | /* PR c/19978 : Test for duplicated warnings (unary operators). */
/* { dg-do compile } */
/* { dg-options "-Woverflow" } */
#include <limits.h>
int
g (void)
{
return - - - - -INT_MIN; /* { dg-bogus "integer overflow in expression.*integer overflow in expression" } */
/* { dg-warning "integer overflow in expres... |
google | chromium | Woverflow-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Woverflow-1.C | 138 | utf_8 | 7256cd2e505f10c051c8ac833ca88513 | /* { dg-do compile } */
/* { dg-options "-O2" } */
#include <limits.h>
int foo = INT_MAX + 1; /* { dg-warning "integer overflow" } */
|
google | chromium | pedantic2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/pedantic2.C | 167 | utf_8 | 4c8c625ae79211ff8d60b894c8b21b81 | // { dg-options "-pedantic" }
class foo
{
foo() {};
void bar() {};
foo(int) {};; // { dg-warning "extra" }
void bar(int) {};; // { dg-warning "extra" }
};
|
google | chromium | Wshadow-3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wshadow-3.C | 110 | utf_8 | c6d10f027652eb4c20869c7eaeebb358 | // PR c++/18530
// { dg-options "-Wshadow" }
struct A {
A();
~A();
void foo (int __ct, int __dt) {}
};
|
google | chromium | Wparentheses-17 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wparentheses-17.C | 937 | utf_8 | f7114375773644b335efb9f920f9b201 | // { dg-do compile }
// { dg-options "-Wparentheses" }
// Template version of Wparentheses-8.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 "parent... |
google | chromium | pr28943 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/pr28943.C | 498 | utf_8 | a7158d5a1d0acfa018bf80fecfe8aa6e | // PR c++/28943 void and non-void in conditional expression
// { dg-do compile }
// { dg-options "" }
void debug (const char * string)
{
return;
}
int f()
{
( true == false ? 0 : debug ("Some string")); // { dg-error "third operand .* type 'void'.* second operand is neither a throw-expression nor of type 'void'" ... |
google | chromium | Warray-bounds-3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Warray-bounds-3.C | 225 | utf_8 | de22eb15ae2420b77fbb90f3b584c785 | /* { dg-do compile } */
/* { dg-options "-O2 -Wall" } */
extern void function(void * x);
struct A {
long x;
char d[0];
};
void test(A * a) {
function((char *)a - 4); /* { dg-bogus "below array bounds" } */
}
|
google | chromium | miss-format-4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/miss-format-4.C | 902 | utf_8 | ed4e1a2fb0bdeb0c706fbaea8bc05dfa | /* { dg-do compile } */
/* { dg-options "-Wmissing-format-attribute" } */
/* { dg-options "-Wmissing-format-attribute -Wno-abi" { target arm_eabi } } */
#include <stdarg.h>
typedef void (*noattr_t) (const char *, ...);
typedef noattr_t __attribute__ ((__format__(__printf__, 1, 2))) attr_t;
typedef void (*vnoattr_t) (co... |
google | chromium | Wconversion-real | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wconversion-real.C | 2,078 | utf_8 | 9edc88a9888f500419aa84c03e8b5c77 | /* Test for diagnostics for Wconversion for floating-point.
C++ equivalent of gcc/testsuite/gcc.dg/Wconversion-real.c */
/* { dg-do compile }
/* { dg-options "-Wconversion" } */
float vfloat;
double vdouble;
long double vlongdouble;
void ffloat (float f);
void fdouble (double d);
void flongdouble (long double ... |
google | chromium | pr11492 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/pr11492.C | 259 | utf_8 | f257fca4d00c8c67aa2b9d6e43ee906f | // PR11492
// { dg-do compile }
// { dg-options "-Wsign-compare" }
int main( void )
{
unsigned int a;
unsigned char b;
for ( a = 0, b = 2; a > b * 1000; a++ ) /* { dg-bogus "comparison between signed and unsigned integer" } */
{ ; }
return 0;
}
|
google | chromium | pragma-system_header5 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/pragma-system_header5.C | 137 | utf_8 | ead08695035c4edabe2cbf3251983089 | // PR c++/36760
// { dg-options "-Wextra" }
#include "pragma-system_header5.h"
void f()
{
g<const double>();
g<volatile void>();
}
|
google | chromium | anonymous-namespace-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/anonymous-namespace-2.C | 516 | utf_8 | f8ad5a1b952230262de883716c47bcdd | // Test for the warning of exposing types from an anonymous namespace
// { dg-do compile }
//
#include "anonymous-namespace-2.h"
namespace {
struct good { };
}
struct g1 {
good * A;
};
struct g2 {
good * A[1];
};
struct g3 {
good (*A)[1];
};
#line 21 "foo.C"
struct b1 { // { dg-warning "uses the anon... |
google | chromium | sequence-pt-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/sequence-pt-1.C | 5,925 | utf_8 | f29205fe73b9b7871a2d5a931504281d | /* Test for sequence point warnings. */
/* Origin: Michael Meeks in
<URL:http://gcc.gnu.org/ml/gcc-patches/1998-06/msg00316.html>,
/* { dg-do compile } */
/* { dg-options "-Wsequence-point" } */
struct s
{
int a;
};
extern int fn (int);
extern int fnb (int, int);
extern int fnc (int *);
extern int sprintf (char *... |
google | chromium | Wsequence-point-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wsequence-point-1.C | 140 | utf_8 | 78a781a7fee9227b3174b6dee0ac20b3 | // { dg-do compile }
// { dg-options "-Wsequence-point" }
struct C
{
~C() throw();
};
void t_test1 (C* mapping)
{
delete [] mapping;
}
|
google | chromium | Wreturn-type-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wreturn-type-2.C | 192 | utf_8 | 1d81b4c94aef9d2c63d5599d4508e03a | // PR middle-end/16558
// { dg-options "-Wreturn-type" }
struct C
{
C ();
~C ();
};
int getref (int ndx)
{
C d;
if (ndx != 0) {
C base;
return 0;
}
else
return 0;
}
|
google | chromium | main | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/main.C | 180 | utf_8 | 217f0311161c670d6ef0fbd06a3c6b91 | // { dg-do compile }
// PR c++/4494: Incorrect diagnostics about return type of main.
typedef int int_t;
int_t main() {
} |
google | chromium | Warray-bounds-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Warray-bounds-2.C | 221 | utf_8 | 798433d4099cd8d7572fde802e640896 | /* { dg-do compile } */
/* Test that -Warray-bounds is enabled by -Wall */
/* { dg-options "-O2 -Wall" } */
int a[10];
int* f(void) {
a[-1] = 0; /* { dg-warning "array subscript" } */
return a;
}
|
google | chromium | Wno-div-by-zero | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wno-div-by-zero.C | 91 | utf_8 | 13048d07bf8630f21562df0b77b67343 | // { dg-options "-Wno-div-by-zero" }
int breakme()
{
int x = 0;
x /= 0;
return x;
}
|
google | chromium | Wswitch-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wswitch-2.C | 754 | utf_8 | 063811cae4064dfe33ddbcd11e9f93ee | /* Further -Wswitch tests. */
/* { dg-do compile } */
/* { dg-options "-Wswitch" } */
enum e { e1 = 0, e2 = 1, e3 = 1, e4 = 2 };
int
foo (enum e ei, int j)
{
switch (ei)
{
case e1: return 1;
case e3: return 2;
case e4: return 3;
} /* No warning here since e2 has the same value as e3. */
swit... |
google | chromium | Wstrict-aliasing-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-2.C | 215 | utf_8 | 414da1b51217d31e1c2f4c076e8fe650 | /* { dg-do compile } */
/* { dg-options "-Wstrict-aliasing=2 -O2" } */
double x;
template <typename T>
T *foo(void)
{
return (T *)&x; /* { dg-bogus "strict-aliasing" } */
}
template double *foo<double>(void);
|
google | chromium | Wall-write-strings | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wall-write-strings.C | 138 | utf_8 | 38c1d3bcd70aac8e2e1f0e19b075e6a9 | // PR 8586
// { dg-do compile }
// { dg-options "-Wall" }
char* foo = "foo"; // { dg-warning "" }
const char* bar = "bar";
|
google | chromium | switch1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/switch1.C | 313 | utf_8 | cbeb61a079567f59bdce9faa40877398 | // { dg-do compile { target { int32plus } } }
signed char sc;
void
foo (void)
{
switch (sc)
{
case 1:
case 2 * __SCHAR_MAX__ + 3: // { dg-warning "case label value exceeds maximum" }
case - 2 * __SCHAR_MAX__ - 1: // { dg-warning "case label value is less than minimum" }
break;
}
}
|
google | chromium | incomplete1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/incomplete1.C | 681 | utf_8 | 5dc2eb037ac5530c74f0ae8e9052adb9 | // { dg-do compile }
// Contributed by Brian Gaeke; public domain.
// 5 If the object being deleted has incomplete class type at the
// point of deletion and the complete class has a non-trivial
// destructor or a deallocation function, the behavior is undefined.
// (But the deletion does not constitute an ill-forme... |
google | chromium | Wparentheses-18 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wparentheses-18.C | 4,249 | utf_8 | a161987df2474d8488c67b358fe0c962 | // { dg-do compile }
// { dg-options "-Wparentheses" }
// Template version of Wparentheses-9.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 | Wstrict-aliasing-bogus-nested-arrays | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-nested-arrays.C | 227 | utf_8 | b84015e5a6773bd08e2a0f87ad5c4641 | /* { dg-do compile } */
/* { dg-options "-O2 -Wstrict-aliasing -fstrict-aliasing" } */
int foo () {
int buffer[10][10];
int* pi = &buffer[0][0]; /* { dg-bogus "same element type" } */
*pi = 10;
return buffer[0][0];
}
|
google | chromium | Wunused-8 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wunused-8.C | 194 | utf_8 | 0d99e205a486cf3984dae4b4c82a1c4f | // PR c++/16029
// { dg-options "-Wunused" }
int main ()
{
// We should not see an "unused" warning about "whatever" on the
// next line.
return whatever (); // { dg-error "declared" }
}
|
google | chromium | Wreturn-type-5 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wreturn-type-5.C | 240 | utf_8 | ac4f08dd2a157d7c72adbbb04354e082 | // PR c++/36254
// { dg-do compile }
// { dg-options "-Wreturn-type" }
int i, j, k;
struct X { X (); ~X (); };
bool
foo ()
{
X x;
if (i && j)
{
if (k)
return true;
else
return false;
}
else
return false;
}
|
google | chromium | Winline-4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Winline-4.C | 486 | utf_8 | 401a1cfacaa701f3e1459d7dcaf225d9 | // { dg-do compile }
// { dg-options "-O2 -Winline" }
// Origin: <markus at oberhumer dot com>
// PR 17115: We should not emit -Winline warning for functions marked with
// noinline
struct Foo {
__attribute__((noinline)) int a(int r) { return r & 1; }
virtual __attribute__((noinline)) int b(int r) { return r & 1;... |
google | chromium | Wstring-literal-comparison-3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wstring-literal-comparison-3.C | 318 | utf_8 | a0b497dc1f8dc8ce49f81bc391f0deb1 | /* PR c/7776 */
/* { dg-do compile } */
/* { dg-options "" } */
int test1(char *ptr)
{
return ptr == "foo";
}
int test2()
{
return "foo" != (const char*)0;
}
int test3()
{
return "foo" == (const char*)0;
}
int test4()
{
return (const char*)0 != "foo";
}
int test5()
{
return (const char*)0 == "foo";
}
|
google | chromium | friend | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/friend.C | 260 | utf_8 | 0163a6a329fdf7f5efa7b908b04848a0 | /* { dg-do compile } */
/* { dg-options -Wredundant-decls } */
/* Test to see if spurious warnings about redundant
declarations are emiited because of the friend
declaration. */
class Foo
{
friend void bar (Foo);
public:
};
extern void bar (Foo);
|
google | chromium | Wparentheses-15 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/warn/Wparentheses-15.C | 2,287 | utf_8 | 6550ed73f75ed13c7d925453010445d0 | // { dg-do compile }
// { dg-options "-Wparentheses" }
// Template version of Wparentheses-6.C.
int foo (int);
template<class T>
void
bar (T a, T b, T c)
{
foo (a <= b <= c); // { dg-warning "comparison" "correct warning" }
foo ((a <= b) <= c);
foo (a <= (b <= c));
foo (1 <= 2 <= c); // { dg-warning "compari... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.