: c
Assignee: unassigned at gcc dot gnu.org
Reporter: blitzrakete at gmail dot com
Target Milestone: ---
Consider:
int main(void) {
struct { int a; } **p;
p->a; // error
}
gcc gives me:
: In function 'main':
:3:6: error: '*p' is a point
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blitzrakete at gmail dot com
Target Milestone: ---
template struct C {
friend C(T::fn)(); // not implicit typename context, declarator-id of friend
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blitzrakete at gmail dot com
Target Milestone: ---
#include
int main() {
std::make_unique();
}
If I compile this with -std=c++11, I get:
: In function 'int main()':
:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89642
--- Comment #2 from Nicolas Lesser ---
Sorry, I forgot the most important part of the bug report: This is C++20. clang
doesn't implement this feature (yet), so it would naturally reject it as is
valid in pre C++20. icc has a bug since it accepts
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blitzrakete at gmail dot com
Target Milestone: ---
template
void f(T t) {
static_cast(t); // gcc rejects, but this is well-formed
}
gcc rejects the above with:
: In function 'void f(T)':
:3:18: error
: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blitzrakete at gmail dot com
Target Milestone: ---
namespace N {
inline namespace A { template int f(typename T::type); }
inline namespace
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88358
--- Comment #4 from Nicolas Lesser ---
Almost the same fix has to apply when the declarator is unqualified: Always
treat T::something as a value, never as a type. This is not part of the allowed
contexts in P0634. I don't know which core discussi
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blitzrakete at gmail dot com
Target Milestone: ---
Consider the following (compiled with `-std=c++2a`):
template
void f(T::type); // ill-formed, gcc accepts
++
Assignee: unassigned at gcc dot gnu.org
Reporter: blitzrakete at gmail dot com
Target Milestone: ---
gcc (with no flags) rejects the following code:
// 'auto' parameter not permitted in this context
template
void f();
This is bogus because anywhere where a non-gene
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87971
Nicolas Lesser changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blitzrakete at gmail dot com
Target Milestone: ---
gcc allows the following code with -std=c++17 without any warnings or errors
even with -Wall -Wextra -pedantic -pedantic-errors.
namespace
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blitzrakete at gmail dot com
Target Milestone: ---
Compiled with -std=c++17 (https://godbolt.org/z/fO32Pd)
int main() {
static_assert(2); // ill-formed, gcc accepts
if constexpr (2
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blitzrakete at gmail dot com
Target Milestone: ---
Gcc (no flags) doesn't compile the following code:
using F = void();
struct X {
virtual F f;
};
struct Y : X {
F f ove
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87035
--- Comment #4 from Nicolas Lesser ---
Nice, thank you!
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87035
--- Comment #2 from Nicolas Lesser ---
Huh, interesting. TIL. Where's that rule in the standard? Because I can't find
it in [class.mem]. Is it somewhere else or did I just overlook it?
ormal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blitzrakete at gmail dot com
Target Milestone: ---
const int N = 5;
struct X {
int Array[N]; // int[5]
enum { N }; // fails, redeclaration
};
This is well-formed, as the enum value N
NCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blitzrakete at gmail dot com
Target Milestone: ---
void test() -> void; // fail => ok
using function = void() -> int; // allowed?!?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86870
--- Comment #1 from Nicolas Lesser ---
Oops, I missed to define a default constructor for `X`. This however, does not
change the bug report and gcc still incorrectly parses the second statement as
a declaration.
++
Assignee: unassigned at gcc dot gnu.org
Reporter: blitzrakete at gmail dot com
Target Milestone: ---
struct X {
void operator=(int);
} x;
int main() {
1 + 1, X(x) = 4; // ok
X(x) = 4, 1 + 1; // gcc fails
}
gcc cannot compile the second statement, because it thinks it is a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86703
Nicolas Lesser changed:
What|Removed |Added
CC||blitzrakete at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86369
Nicolas Lesser changed:
What|Removed |Added
CC||blitzrakete at gmail dot com
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blitzrakete at gmail dot com
Target Milestone: ---
Compiles with clang, doesn't under gcc 8.1.0:
template struct is_same {
static constexpr bool value = false;
};
template struct is_same {
static constexpr
22 matches
Mail list logo