https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29129
zhonghao at pku dot org.cn changed:
What|Removed |Added
CC||zhonghao at pku dot org.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64480
zhonghao at pku dot org.cn changed:
What|Removed |Added
CC||zhonghao at pku dot org.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63495
zhonghao at pku dot org.cn changed:
What|Removed |Added
CC||zhonghao at pku dot org.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85696
zhonghao at pku dot org.cn changed:
What|Removed |Added
CC||zhonghao at pku dot org.cn
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follows:
typedef struct astruct_d
{
void *data;
} astruct;
/* Generate a whole bunch of unique fake mallocs, this
keeps the vartrack dump simpler
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
ZynAddSubFX is a musical synthesizer. I find a strange code in this project:
https://github.com/zynaddsubfx/zynaddsubfx/blob/master/src/Misc/MiddleWare.cpp
#if defined(__GNUC__) &&
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105905
--- Comment #2 from zhonghao at pku dot org.cn ---
A programmer answered me, and provided some details. Here, I copy his response:
"This code:
Vector2 v{Math::sin(37.0_degf), Math::cos(37.0_degf)};
Utility::print("{:.10}\n",
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
magnum is a data visualization library. I notice that its programmers
complained a rounding error in gcc. It occurs when compiling their code in the
release version. To fix the problem, they
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
zapret is a tool to bypass network blocking:
https://github.com/bol-van/zapret/blob/master/docs/readme.eng.md
I notice that its
: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code sample is as follows:
#include
struct real128
{
__float128 m_value;
template
constexpr bool get(T &rop) const
{
using value_type = typename T::value_
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
Torque3D is an open source game engine: https://torque3d.org/
When I read its code, I notice that it fixes a crash, and this crash can be
caused by GCC.
The bug report is https
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
Clang's comments say there is an `unsigned int`-sized "reserved" member here,
because when the objc4 modern runtime is used on LP64 platforms, there would
otherw
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follows:
template
struct infinity{};
template <> struct infinity<__float128> { static cons
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90925
--- Comment #2 from zhonghao at pku dot org.cn ---
A related code sample:
class A
{
virtual int String ();
};
class F: public A { };
template < typename V > class G
{
private: V value;
};
class D
{
template < int N > void Veri
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
My gcc is 10.0.0, and my code is:
class a {
private: template a &operator<<(b);
};
a c();
template a fn2() {
int d;
return c() << d;
}
gcc accepts the
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
My gcc is 10.0.0, and the code is:
class A
{
int m_fn1 (void *);
int m_fn2 (bool);
};
inline int
A::m_fn2 (bool)
{
static __attribute__ ((section ("")))
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
My gcc is 10.0.0, and the code is:
void x();
void rgb2yuv16bit_mmx422_row();
void x()
{
rgb2yuv16bit_mmx422_row();
}
void rgb2yuv16bit_mmx422_row()
{
__asm__ __volatile__
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
A previous bug report (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49171)
contains two samples:
//---
constexpr const char* c
at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
My gcc is 10.0.0, and the code is:
struct S { S (); S (int); ~S (); int i; };
struct A { S s[10]; };
void
foo ()
{
A a = {{}};
}
It takes several minutes to compile the code. With the following
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
My gcc is 10.0.0, and the code is:
template
class C
{
template
class C2 { };
};
template<> template
class C::C2 { };
template<> template
class C::C2 { };
gcc accepts the co
: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
My gcc is 10.0.0, and the code is:
template < typename = void >
class A
{
public:
A () : f0 ( 1 ) { }
A (int);
private:
typedef A<> f0;
};
A<> a;
The code comes from a p
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
A bug report (https://gcc.gnu.org/bugzilla/show_bug.cgi
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
My gcc is 10.0.0, and the code is:
template
void test() {
constexpr int N2 = N;
typedef int T alignas(N2);
// error: requested alignment is not an integer constant
}
int
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
A bug report complains that gcc shall warn braces around scalar initializer,
and a test case is as follows:
struct SA { int n[1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90833
--- Comment #1 from zhonghao at pku dot org.cn ---
Here is the url of the previous bug report:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88726
(In reply to zhonghao from comment #0)
> A previous bug report has a code sample:
>
>
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
A previous bug report has a code sample:
int main()
{
extern inline void f();
}
void f()
{
}
It says that gcc rejects the sample, but clang accepts it. The bug is marked as
dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
My gcc is 10.0.0, and the code is:
class B
{
template friend struct A;
B() {}
};
template
struct A
{
A() noexcept(sizeof(B{})) { }
};
struct C
{
C()
{
static_assert( sizeof(A{}), "" );
}
};
: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The bug report fixed a ICE:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70449
template
constexpr int f ()
{
enum E { a = f<0> () };
return 0;
}
Given the code, gcc 10.0.0 rejects th
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
My gcc is 10.0.0, and the code is:
void foo(float *f, double *r) {
#pragma acc kernels loop create(f) copy(r)
for(;;) {}
}
gcc accepts the
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
A bug report complains that there is endless recursion during mangling.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47202
It is marked as fixed. My gcc is 10.0.0. It takes me hours, but
: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
My gcc is 10.0.0, and my code is:
void f() {
union {
typeof
(
(
{
unsigned long __ptr;
(int *)(0);
}
)
)
__val;
};
}
gcc rejects it with the following message:
x86-64 gcc (trunk)
1
No
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
My gcc is 10.0.0, and the code is:
int f(int cmd)
{
switch (cmd) {
case 0x8018U:
return 1;
}
return 0;
}
gcc accepts the code, but clang can detect its overflow:
:4:7
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
My gcc is 10.0.0, and the code is:
int a(int b) {int (*c(void))[b];**c() = 2;}
gcc accepts the code, but clang, icc, and msvc all reject it
: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
My gcc is 10.0.0, and the code is:
struct S {};
struct T : S {};
void foo(T *t) { t->~S(); }
gcc accepts the code, but icc, msvc, and clang all reject it.
msvc:
(3): error C2300: 'T'
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
My gcc is 10.0.0, and the code is:
typedef unsigned int uint32_t;
struct CPUPPCState
{
uint32_t fpscr;
};
register struct CPUPPCState *env __asm__ ("ebp");
void
helpersetbit (ui
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90801
--- Comment #1 from zhonghao at pku dot org.cn ---
Here is the url of the previous bug report:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59659
(In reply to zhonghao from comment #0)
> A previous bug report complains that gcc hangs w
: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
A previous bug report complains that gcc hangs when compiling large
zero-initialized std::array, and it is marked as fixed. My gcc is 10.0.0, but
it still hangs given the following code sample:
#include
: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
My gcc is 10.0.0, and my code is:
#include
#include
void gather_swizzle(const __m128i *indices, float *buffer)
{
__m128i idx = *indices++;
uint32_t idx0 = static_cast(_mm_extract_epi32(idx, 0
: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
My gcc is 10.0.0, and my code is:
class a {
public:
int b(int a());
};
int x();
void y() {
a z; z.b(x);
}
The error message is:
:3:8: error: return type specification for constructor invalid
: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
My gcc is 10.0.0, and my code is:
#include
int run(int sz)
{
typedef double MAT[sz][sz];
MAT *a;
a = (MAT*) malloc(sizeof(MAT));
return (a==0);
}
int main(int argc, char* argv[])
{
return
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
My gcc is 10.0.0, and my code is:
void
f(void)
{
__asm volatile("" : : "i" (f));
}
It compiles well, but after adding -fPIC, I got a message:
source>: In f
: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
My gcc is 10.0.0, and my code is:
void x()
{
int a;
__asm__ (
"%0 %1"
:"=r"(a));
}
gcc accepts the code with the following parameters:
gcc -Os | gcc -O3 | gcc -O1 | g++ -Os
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follows:
This code:
class Base
{
virtual ~Base() = default;
};
class Derived : public Base
{
~Derived
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90789
zhonghao at pku dot org.cn changed:
What|Removed |Added
Summary|gcc |gcc complains cannot
gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90776
--- Comment #3 from zhonghao at pku dot org.cn ---
Shall g++ be compatible with Microsoft's compiler, when -fms-extensions is set?
(In reply to Jonathan Wakely from comment #2)
> Why do you think either of these should be accepted?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90776
--- Comment #1 from zhonghao at pku dot org.cn ---
Another code sample:
typedef union __declspec(align(64)) foo_t {
double a[8];
} foo_t;
foo_t bar;
ormal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is:
typedef struct a {} A;
void f() {
if (__builtin_alignof(A))
;
}
g++ -fms-extensions rejects the code:
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
My g++ is 10.0.0, and my code is as follows:
#include
#include
struct S {};
int begin(S);
template std::true_type has_cbegin(decltype(std::cbegin(T{})));
template std::false_type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86503
--- Comment #3 from zhonghao at pku dot org.cn ---
(In reply to Richard Biener from comment #1)
> You run out of memory or stack. Try ulimit -s unlimited
I tried ulimit -s unlimited. This time, the error messages are as follows:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86181
--- Comment #2 from zhonghao at pku dot org.cn ---
I reported the code to llvm. A developer of llvm said:
Clang follows the agreed direction for CWG issue 1839, which says that
redeclaration lookup for 'extern int i;' finds the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86718
--- Comment #2 from zhonghao at pku dot org.cn ---
My gcc:
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/9.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc9.0
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
gcc accepts the following code:
void a() {
typedef float v4sf __attribute__ ((vector_size (16)));
static v4sf q;
float* r = &q[0];
}
clang rejects it:
clang code1.c
code1.c:
: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
void g() {
__builtin_printf(
u8R"abcd(%.)abcd"
"*d");
}
gcc accepts it, but clang rejects it:
code1.c:3:2: error: use of undeclared identifier
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
unsigned char foo (unsigned char x)
{
static volatile unsigned char P1OUT __asm ("0x0021");
unsigned char tmp = P1OUT;
P1OUT = x;
return tmp;
}
clang a
: c
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code sample is as follow:
int main(void)
{
const int nFOO = 1;
int nFoo = 0;
switch(nFoo){
case nFOO:
exit(1);
}
exit(0);
}
gcc rejects the code:
gcc code1.c
: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
void __attribute__((noinline, noclone))
test(char *data, __SIZE_TYPE__ len)
{
static char const appended[] = "/./";
char *buf = __builtin_alloca (len + sizeo
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
#include
int
f (int a, int b[a++], int c, int d[c++])
{
printf ("%d %d\n", a, c);
}
int
main (void)
{
int dum
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
#define COLS 24000L
struct Matrix {
float data[COLS * COLS];
};
float mulv(float A[], float B[], int i, int j)
{
float result = 0.0;
{ int k; for
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
gcc allows ``short'' to appear with a typedef'd char:
typedef unsigned char __u8;
__u8 short slot_tablelen;
is accepted, but
unsigned char short slot_tablelen;
is not,
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
namespace Name {
template class Point;
}
using Name::Point;
template class Point {
public:
Point
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86652
--- Comment #1 from zhonghao at pku dot org.cn ---
A related code sample:
class C { public: template int (*f())() const; };
int foo(C c) { return (*c.f())(); }
The messages from clang++:
error: pointer to function type cannot have '
iority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
class C {
public:
template
int (*f())() const;
};
g++ accepts the code, but clang++ rejects it:
code4.cpp:4:7: error:
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
int x = reinterpret_cast(1.0f);
Consensus on IRC is that this is invalid.
g++ accepts it, but clang++ rejects it:
code0.cpp:1:9: error: reinterpret_cast from rvalue
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
g++ accepts this invalid code:
void f();
void f(int);
bool b = noexcept(f);
[over.over]p1: "An overloaded function name shall not be used wi
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
g++ accepts this:
struct S {
class T friend;
unsigned friend char;
};
Both of these are illegal by [class
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The following program should give a diagnostic message when trying to compile
it.
namespace X { class A
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
g++ support C99 hexadecimal literals as an extension in its C++ modes. This is
*almost* a conforming extension in C++98 mode, but it'
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
template struct A {};
typedef A<255> B;
int main() { return 0; }
g++ accepts the code, but clang++ rejects it:
char.cpp:3:11: error: no
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
#include
template
constexpr void for_sequence(std::integer_sequence, F&& f) {
us
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
struct T {
T() noexcept(false) { }
~T() noexcept(false) { }
};
struct A
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
template struct V {
union { int n; struct { int x,y; }; };
constexpr V() : x(0) {}
};
constexpr V v;
g++ does not check whether v is initialized. Instead, clang
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
struct S { S(const S&, int); S(int); }; S::S(const S& = S(0), int = 0) {}
g++ accepts without any warning messages. Instead, clang++ reports:
code0.cpp:1:5
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
template
bool greater()
{
T p = nullptr;
return p > nullptr;
}
int main ()
{
greater();
}
g++ accepts it, but clang++ reports a error message:
code0.cp
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
template void Fun(T A) {
typedef int __attribute__((__aligned__(A))) T1;
int k1[__alignof__(T1)];
}
g
normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
#include
namespace N {
struct X { };
}
using namespace N;
template
void log(const T& t) {
std:
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
template void f() {
struct S { void g(int n = T::error) noexcept(T::error); };
}
template void f();
g++ accepts it, but clang++ rejects it:
code0.cpp:2
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
struct foo {
static bool const value = false;
};
int main() {
int v(int(foo::value));
}
g++ accepts
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
struct T;
template
void f()
{
try
{}
catch(T const &)
{}
}
struct T
{};
int main()
{
f();
return 0;
}
g++ accepts, but clang++ rejects it:
code0.cpp:
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
struct Foo {
Foo() {}
Foo(const Foo&) {}
};
vo
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
struct S { int f(), g() = delete; };
g++ accepts the code, but clang++ rejects it:
error: '= delete' is
: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
template struct VI {};
template
struct IP
{
static const bool r = IP::r;
};
template struct V
{
VI::r> vi;
};
struct X;
struct Y
{
V v;
};
g++ produces the follow
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
template< bool c, class T >
struct enable_if {
typedef T type;
};
template< class T >
struct enable_if< true, T > {};
template< class
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
class Test
{
friend const int getInt(int inInt = 0);
};
g++ accepts it, but clang++ rejects it:
error
: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follows:
template < int V >
struct A
{
struct B
{
template < int > friend struct V;
};
};
A < 0 >::B a;
g++ accepts the code, but clang++ rejects it:
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
g++ incorrectly accepts this:
struct S { struct T {}; };
::decltype(S())::T st;
clang++ rejects it:
error: expected unqualified-id
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
g++ incorrectly accepts this:
auto l = [=]{};
Per C++1y [expr.lambda]p9 this is ill-formed: only local lambda expressions may
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
g++ rejects this valid C++11 code:
void f(char*);
int &f(...);
int &r = f("foo");
There is no conv
: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follows:
template
struct X
{};
template
void foo(X... a);
void test()
{
foo(X(), X());
}
g++ crashes when compiling the code:
code0.cpp: In substitution of 'template void
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follows:
typedef __attribute__((ext_vector_type(4))) int vi4;
const int &r = vi4(1).x;
g++ rejects it:
error: request for member 'x' in '
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follows:
template
struct A {
void f() noexcept(noexcept(m.f())) {
m.f();
}
T m;
};
struct B { void f(); };
int main
gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
I looked around to see if a bug was already filed on this and couldn't find
one.
CWG 1550, passed in Bristol, changes the value category of the result of a
conditional operator when one operand is an lvalu
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follows:
namespace PR5820 {
struct Base {};
struct D1 : public Base {};
struct D2 : public Base {};
struct Derived : public D1, public D2 {
void Inner() {
}
};
}
template
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follows:
namespace PR5820 {
struct Base {};
struct D1 : public Base {};
struct D2 : public Base {};
struct Derived : public D1, public D2 {
void Inner() {
}
};
}
template
at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
struct A {
static int const B = sizeof B;
};
g++ rejects the code:
error: 'B' was not declared in this scope
static int const B = sizeof B;
The PoD should should be i
: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
// snip
template
struct Const { typedef void const type; };
template
void f(T, typename Const::type*) { } // T1
template
void f(T, void const *) { } // T2
int main() { void
++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
struct A {
int* a;
A(int a) : a(new int(a)) {}
~A() { delete a; }
A(const A&) = delete;
A(A&& other) { a = other.a; other.a = 0; };
operator bool() {
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
template
struct A {
enum class B {
X = T::value
};
};
int main() {
A a;
}
g++ error:
code0.c.cpp:4:13: error: 'value' is not a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86306
--- Comment #9 from zhonghao at pku dot org.cn ---
(In reply to zhonghao from comment #8)
> (In reply to Jonathan Wakely from comment #7)
> > (In reply to Jonathan Wakely from comment #6)
> > > Because you are just blindly copyi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86306
--- Comment #8 from zhonghao at pku dot org.cn ---
(In reply to Jonathan Wakely from comment #7)
> (In reply to Jonathan Wakely from comment #6)
> > Because you are just blindly copying things from one bugzilla to the other,
> >
1 - 100 of 160 matches
Mail list logo