g++ (GCC) 4.1.2 (Gentoo 4.1.2 p1.1) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
int main() {
<%"\?"<:0:>;%>
}
{"\?"[0];}
which is equivalent to simply '?';.
int main() {
char file_pattern[] = "all-??-of-20";
}
src/trigraph.cc:2:30: warning: trigraph ??- ignored, use -trigraphs to enable
int main() {
int x,y=x?:y;
}
#define assert(a) FOO
#include <assert.h>
#undef assert
#include <assert.h>
int main() {
assert(0);
}
#define foo bar
#define foo bar
int main() {}
class Bar {};
Bar Bar();
int main() {}
class Bar {};
Bar Bar;
int main() {}
class Bar {};
typedef Bar Bar;
int main() {}
typedef int int;
int main() {}
src/int_typedef.cc:1: error: multiple types in one declaration src/int_typedef.cc:1: error: declaration does not declare anything
int main() {
int i();
return ++i;
}
src/int_init.cc: In function 'int main()': src/int_init.cc:3: error: ISO C++ forbids incrementing a pointer of type 'int (*)()' src/int_init.cc:3: error: invalid lvalue in increment
int i = 08;
int main() {}
src/int_number.cc:1:9: error: invalid digit "8" in octal constant
int i = i;
int main() {}
int main() {
int i, j;
(+ +i+++ + ++++j);
}
int main() { int i; i++++; }
src/plus_post2.cc: In function 'int main()': src/plus_post2.cc:1: error: invalid lvalue in increment
#include <algorithm>
int main() {
int a;
unsigned int b = 0;
return std::max(a, b);
}
src/max.cc: In function 'int main()': src/max.cc:5: error: no matching function for call to 'max(int&, unsigned int&)'
int main() {
return main();
}
#include <vector>
template <class T> void Foo(std::vector<T> in) {
for (std::vector<T>::iterator i = in.begin(); i != in.end(); ++i) {}
}
int main() {}
src/template.cc: In function 'void Foo(std::vector<T, std::allocator<_CharT> >)': src/template.cc:4: error: expected `;' before 'i' src/template.cc:4: error: 'i' was not declared in this scope