https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80039
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99018
--- Comment #2 from David Stone ---
Simpler test case
```
struct s {
constexpr ~s() {
}
};
constexpr bool f(s const (&)[1]) {
return true;
}
static_assert(f({s()}));
```
Message
```
:10:16: error: non-constant conditi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99018
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
--- Comment
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
The following valid translation unit
```
constexpr bool f() {
auto a = new int;
auto b = new int;
if (a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96333
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98987
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
The following valid translation unit
```
struct s {
constexpr s() = default;
constexpr s(s
: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
The following valid translation unit
```
struct integer {};
integer f();
int operator+(integer
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
The following valid translation unit is rejected by gcc 11:
```
struct non_movable {
non_movable() = default
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
The following valid translation unit:
```
struct empty {};
union U {
constexpr U
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98990
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
--- Comment
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
The following valid translation unit
```
constexpr int x = 0;
constexpr a
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
The following valid translation unit:
```
constexpr bool f() {
auto ptr = new int();
delete ptr;
return true
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79751
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
--- Comment
erity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
The following translation unit
```
template
concept A = true;
template
concept B = A and true;
constexpr bool f(A
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80738
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97388
--- Comment #2 from David Stone ---
That is what seems to be happening here. It looks like by-value function
parameters have all modifications rolled back before the object is destroyed.
The following code is also erroneously rejected:
```
struc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97388
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
--- Comment
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
The following translation unit
```
struct S {
int * m_ptr;
constexpr S():
m_ptr(new int
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97052
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97195
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
--- Comment
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
The following code
```
template
concept foo = true;
constexpr bool f(foo auto) {
return
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
The following program
#include
template
requires((std::is_constant_evaluated(), true))
constexpr int a = 0;
constexpr int b = a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52981
--- Comment #9 from David Stone ---
It might further be worth giving the "you can rearrange to save sapce" option
two warning levels. The highest level would warn for all cases where
rearranging can reduce size, and the lowest level would warn fo
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67348
--- Comment #2 from David Stone ---
This started causing an ICE in 8.1. Prior versions accepted whichever candidate
was defined first as being the one true definition.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67348
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91259
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
--- Comment
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
requires clauses in C++20 must have the expression be parenthesized unless it
is a logical
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
In the following code, gcc accepts the code in `c`, but rejects the code in
`d`. I believe both should be
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85125
--- Comment #4 from David Stone ---
*** Bug 86623 has been marked as a duplicate of this bug. ***
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55004
Bug 55004 depends on bug 86623, which changed state.
Bug 86623 Summary: constexpr evaluation fails to give an error for modifying a
const object
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86623
What|Removed |
||david at doublewise dot net
Resolution|--- |DUPLICATE
--- Comment #2 from David Stone ---
Closing as duplicate
*** This bug has been marked as a duplicate of bug 85125 ***
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85125
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80738
--- Comment #2 from David Stone ---
*** Bug 90888 has been marked as a duplicate of this bug. ***
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90888
David Stone changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90888
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
--- Comment
: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
The following code optimizes well for `custom_swap` and `restrict_std_swap`,
but has an additional `mov` instruction
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
The following code reports ambiguous overload when compiling with `g++
-std=c++2a -fconcepts`:
template
struct S
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79917
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68812
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
--- Comment
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
It is possible to pass `-w` to gcc to turn off all warnings, but as far as I
can tell, there is no way to turn off just the warning "direct base ...
inaccessib
Version: 9.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
The following code causes an internal compiler error
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
The following code is compiled by gcc with -std=c++17
constexpr bool f() {
int const a = 0;
const_cast(a) = 2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86524
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
--- Comment
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
This code worked in gcc 7.3, but no longer works as of 8.1 or trunk.
#include
void f1() {
constexpr int x = 0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85944
--- Comment #2 from David Stone ---
I have simplified the bug. It does not require a member variable to trigger the
bug, just taking the address of a a temporary bound to a reference function
parameter at global scope:
constexpr bool f(int con
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
When compiling the following code in C++11, C++14, C++17, or C++2a with 8.1 or
trunk (not tested with earlier versions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83692
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
--- Comment
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
The following program fails to compile
struct integer {
constexpr int value() const {
return m_value
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
#include
template
struct wrapper : private T {
struct type {};
type f(type = {});
using T::f;
};
struct S {
void f() {
}
};
static_assert
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
If you compile the following code:
while(true) {}
You get the not especially helpful error message:
:1:1: error: expected unqualified-id before 'while
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66256
--- Comment #9 from David Stone ---
Sorry, I misread the chain of comments, Jonathan Wakely's comment on gcc
correctly rejecting invalid code refers specifically to the decltype example.
Please ignore my previous comment, except that it captures
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66256
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52869
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54924
--- Comment #3 from David Stone ---
Also filed against libc++ here: https://llvm.org/bugs/show_bug.cgi?id=28777
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
#include
#include
struct S {
S(int) {}
};
int main() {
using pair_t = std::pair;
static_assert(std::is_default_constructible::value
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
main.cpp:
template
int x = 1;
template
int x = 1;
david@i5-fedora ~/test> g++ source/main.cpp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66042
David Stone changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66042
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
--- Comment
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
#include
template
auto compiles(T && t) -> T && {
static_assert(std::is_same
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65896
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
--- Comment
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Target Milestone: ---
file.cpp
==
struct base{};
struct derived : base
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53313
--- Comment #13 from David Stone ---
I understand the difference between the two. I just prefer an opt-out system of
warnings instead of opt-in. If absolutely no one could possibly want a warning,
it shouldn't exist. If some users would want the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53313
--- Comment #11 from David Stone ---
If the warnings are so ridiculous that no one could possibly want them on, then
maybe we should remove them. Otherwise, I would want -Weverything and I can use
-Wno-warnings-I-do-not-want
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52981
--- Comment #5 from David Stone ---
After thinking about this some more, we are not answering the question that
splitting it into two warnings is really trying to get at.
The first, and most important is not "Is there padding in the middle of th
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53313
--- Comment #8 from David Stone ---
I have changed my opinion on this and agree that warning levels are probably
not the way to go. The two things from this that I do still want are
-Weverything-and-I-really-mean-it-this-time
All warnings eithe
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: david at doublewise dot net
Source file:
class C {};
auto && operator++(C & c) {
return c;
}
int main() {
}
gcc-4.9 source/main.cpp -Weffc++ -std=c++1y
source/mai
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56861
Bug #: 56861
Summary: std::vector::reserve optimization bug
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: normal
P
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56785
Bug #: 56785
Summary: std::tuple of two elements does not apply empty base
class optimization when one of its elements is a
std::tuple with two elements
Classification: Unclassifi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56556
Bug #: 56556
Summary: Wshadow warns for private members in base classes
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: normal
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55357
Bug #: 55357
Summary: -Wshadow warns about lambda function parameters
matching variables in outer scope
Classification: Unclassified
Product: gcc
Version: 4.7.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55254
Bug #: 55254
Summary: Warn for implicit conversion from int to char
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: normal
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54924
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54924
Bug #: 54924
Summary: Warn for std::string constructor with wrong size
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: normal
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54535
Bug #: 54535
Summary: gcc fails to warn when functions are inlined
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: minor
Priori
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54021
--- Comment #7 from David Stone 2012-09-09
06:00:37 UTC ---
That seems to me like saying that `constexpr bool d = sizeof(x);` should be
disallowed because it uses a non-constexpr. You're not using the value of x,
just a property about it. Whether
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54021
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
--- Comment #5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53313
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
--- Comment #2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652
--- Comment #12 from David Stone 2012-07-14
15:14:13 UTC ---
However, I think it's important to note that they implement the very noisy
behavior of warning for all implicit fall-through. We could make our warning
much more useful by being silent f
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53960
Bug #: 53960
Summary: Add warning about implicit fallthrough in switch
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: enhancement
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53650
--- Comment #5 from David Stone 2012-06-17
19:54:52 UTC ---
As a workaround for this bug, I was able to compile much faster (so that I can
compile my program with optimizations turned on) by declaring the constructor
for the class in the array as
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53711
Bug #: 53711
Summary: Wunused-function should warn for functions in the
unnamed namespace
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53650
David Stone changed:
What|Removed |Added
CC||david at doublewise dot net
--- Comment #2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53650
Bug #: 53650
Summary: large array causes huge memory use
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: major
Priority: P3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16166
--- Comment #7 from David Stone 2012-05-29
20:57:22 UTC ---
(In reply to comment #5)
> (In reply to comment #4)
> > * Item 11: Define a copy constructor and an assignment operator for classes
> > with dynamically allocated memory.
> >
> > -Wcopy
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16166
--- Comment #4 from David Stone 2012-05-29
02:13:53 UTC ---
I would recommend against naming each warning -Weffc++[n], but rather, give a
more descriptive name. My suggestion is to create a few warnings, so that
-Weffc++ would map to the followin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53514
Bug #: 53514
Summary: Make -Wpadded a meta-option for -Wpadded-in-middle and
-Wpadded-at-end
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIR
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53316
--- Comment #10 from David Stone 2012-05-16
15:57:13 UTC ---
I did some research to see how often each optimization level is actually used.
Looking solely at the most followed C and C++ repositories on github, I
collected the following data:
C:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53316
--- Comment #9 from David Stone 2012-05-11
15:48:53 UTC ---
I suppose this is a much better way to phrase the suggestion as a starting
point. First get -Odebug and then see where we go from there.
89 matches
Mail list logo