[Bug c++/80039] `constexpr` member function calls in a `constexpr` constructor are ignored if the object is defined locally

2021-03-29 Thread david at doublewise dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80039 David Stone changed: What|Removed |Added CC||david at doublewise dot net --- Comment

[Bug c++/99018] Comparing address of array element not considered a constant expression in certain contexts

2021-03-10 Thread david at doublewise dot net via Gcc-bugs
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

[Bug c++/99018] Comparing address of array element not considered a constant expression in certain contexts

2021-02-09 Thread david at doublewise dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99018 David Stone changed: What|Removed |Added CC||david at doublewise dot net --- Comment

[Bug c++/99031] New: Comparing pointers to heap-allocated memory is not a constant expression

2021-02-09 Thread david at doublewise dot net via Gcc-bugs
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

[Bug c++/96333] [10/11 Regression] Regression on concepts constraint checking

2021-02-08 Thread david at doublewise dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96333 David Stone changed: What|Removed |Added CC||david at doublewise dot net --- Comment

[Bug c++/98987] Concept subsumption doesn't work with by-value vs. by-reference parameters

2021-02-08 Thread david at doublewise dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98987 David Stone changed: What|Removed |Added CC||david at doublewise dot net

[Bug c++/99018] New: Comparing address of array element not considered a constant expression in certain contexts

2021-02-08 Thread david at doublewise dot net via Gcc-bugs
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

[Bug c++/99016] New: Internal compiler error from decltype of binary operator when one operand is a prvalue function call

2021-02-08 Thread david at doublewise dot net via Gcc-bugs
: 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

[Bug c++/98995] New: Copy elision not applied to members declared with [[no_unique_address]]

2021-02-07 Thread david at doublewise dot net via Gcc-bugs
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

[Bug c++/98994] New: Empty type with [[no_unique_address]] in union with constructor is not a constant expression

2021-02-07 Thread david at doublewise dot net via Gcc-bugs
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

[Bug c++/98990] Internal compiler error when two overloaded functions return `auto &&` and one accepts an `auto` parameter

2021-02-07 Thread david at doublewise dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98990 David Stone changed: What|Removed |Added CC||david at doublewise dot net --- Comment

[Bug c++/98990] New: Internal compiler error when two overloaded functions return `auto &&` and one accepts an `auto` parameter

2021-02-07 Thread david at doublewise dot net via Gcc-bugs
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

[Bug c++/98988] New: delete is not a constant expression with -fsanitize=undefined

2021-02-07 Thread david at doublewise dot net via Gcc-bugs
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

[Bug c++/79751] Concept placeholder on another concept does not work

2021-02-07 Thread david at doublewise dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79751 David Stone changed: What|Removed |Added CC||david at doublewise dot net --- Comment

[Bug c++/98987] New: Concept subsumption doesn't work with by-value vs. by-reference parameters

2021-02-07 Thread david at doublewise dot net via Gcc-bugs
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

[Bug tree-optimization/80738] dead first stmt in a=0;a=b;b=0 whatever the aliasing

2020-12-14 Thread david at doublewise dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80738 David Stone changed: What|Removed |Added CC||david at doublewise dot net --- Comment

[Bug c++/97388] constexpr evaluator incorrectly claims double delete with function parameter

2020-10-12 Thread david at doublewise dot net via Gcc-bugs
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

[Bug c++/97388] constexpr evaluator incorrectly claims double delete with function parameter

2020-10-12 Thread david at doublewise dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97388 David Stone changed: What|Removed |Added CC||david at doublewise dot net --- Comment

[Bug c++/97388] New: constexpr evaluator incorrectly claims double delete with function parameter

2020-10-12 Thread david at doublewise dot net via Gcc-bugs
: 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

[Bug c++/97052] Internal compiler error with substitution failure in template parameter list of concept declaration

2020-10-01 Thread david at doublewise dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97052 David Stone changed: What|Removed |Added CC||david at doublewise dot net --- Comment

[Bug c++/97195] construct_at on a union member is not a constant expression

2020-09-27 Thread david at doublewise dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97195 David Stone changed: What|Removed |Added CC||david at doublewise dot net --- Comment

[Bug c++/97052] New: Internal compiler error with substitution failure in template parameter list of concept declaration

2020-09-14 Thread 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 code ``` template concept foo = true; constexpr bool f(foo auto) { return

[Bug c++/97051] New: Evaluating is_constant_evaluated in requires clause fails

2020-09-14 Thread david at doublewise dot net
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

[Bug c/52981] Separate -Wpadded into two options

2019-12-22 Thread david at doublewise dot net
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

[Bug c++/67348] [concepts] Constraints, special member functions, and default/delete

2019-07-30 Thread david at doublewise dot net
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.

[Bug c++/67348] [concepts] Constraints, special member functions, and default/delete

2019-07-30 Thread david at doublewise dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67348 David Stone changed: What|Removed |Added CC||david at doublewise dot net --- Comment

[Bug libstdc++/91259] Parenthesize requires clauses that contain expressions that are not just a value of type bool

2019-07-29 Thread david at doublewise dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91259 David Stone changed: What|Removed |Added CC||david at doublewise dot net --- Comment

[Bug libstdc++/91259] New: Parenthesize requires clauses that contain expressions that are not just a value of type bool

2019-07-25 Thread david at doublewise dot net
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

[Bug c++/91082] New: Reference to function binds to pointer to function when given a template specialization

2019-07-03 Thread 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: --- In the following code, gcc accepts the code in `c`, but rejects the code in `d`. I believe both should be

[Bug c++/85125] constant expression with const_cast UB does not emit error

2019-06-21 Thread david at doublewise dot net
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. ***

[Bug c++/55004] [meta-bug] constexpr issues

2019-06-21 Thread david at doublewise dot net
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 |

[Bug c++/86623] constexpr evaluation fails to give an error for modifying a const object

2019-06-21 Thread david at doublewise dot net
||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 ***

[Bug c++/85125] constant expression with const_cast UB does not emit error

2019-06-21 Thread david at doublewise dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85125 David Stone changed: What|Removed |Added CC||david at doublewise dot net --- Comment

[Bug tree-optimization/80738] dead first stmt in a=0;a=b;b=0 whatever the aliasing

2019-06-17 Thread david at doublewise dot net
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. ***

[Bug middle-end/90888] std::swap bad code gen -- alias analysis insufficient to remove dead store

2019-06-17 Thread david at doublewise dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90888 David Stone changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug middle-end/90888] std::swap bad code gen -- alias analysis insufficient to remove dead store

2019-06-14 Thread david at doublewise dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90888 David Stone changed: What|Removed |Added CC||david at doublewise dot net --- Comment

[Bug middle-end/90888] New: std::swap bad code gen -- alias analysis insufficient to remove dead store

2019-06-14 Thread david at doublewise dot net
: 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

[Bug c++/90846] New: Concepts sometimes ignored for friend function templates of class templates

2019-06-11 Thread david at doublewise dot net
: 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

[Bug c++/79917] Internal compiler error with variadic template and concepts, internal compiler error: in tsubst_constraint, at cp/constraint.cc:1956

2019-06-04 Thread david at doublewise dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79917 David Stone changed: What|Removed |Added CC||david at doublewise dot net --- Comment

[Bug c++/68812] [concepts] bogus mismatched argument pack lengths

2019-06-04 Thread david at doublewise dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68812 David Stone changed: What|Removed |Added CC||david at doublewise dot net --- Comment

[Bug c++/90449] New: No way to turn off warning about inaccessible base

2019-05-12 Thread david at doublewise dot net
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

[Bug c++/90432] New: Internal compiler error with no_unique_address empty type with constructor call followed by value initialized to non-zero

2019-05-10 Thread david at doublewise dot net
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

[Bug c++/86623] New: constexpr evaluation fails to give an error for modifying a const object

2018-07-21 Thread david at doublewise dot net
: 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

[Bug libstdc++/86524] [8/9 Regression] std::less with pointer arguments not usable in static_assert in constexpr function

2018-07-16 Thread david at doublewise dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86524 David Stone changed: What|Removed |Added CC||david at doublewise dot net --- Comment

[Bug c++/86524] New: std::less with pointer arguments not usable in static_assert in constexpr function

2018-07-14 Thread 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: --- This code worked in gcc 7.3, but no longer works as of 8.1 or trunk. #include void f1() { constexpr int x = 0

[Bug c++/85944] Address of member variable of temporary not considered constexpr at global scope

2018-05-28 Thread david at doublewise dot net
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

[Bug c++/85944] New: Address of member variable of temporary not considered constexpr at global scope

2018-05-27 Thread david at doublewise dot net
: 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

[Bug c++/83692] Rejects valid constexpr with unrelated code fixing problem

2018-01-04 Thread david at doublewise dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83692 David Stone changed: What|Removed |Added CC||david at doublewise dot net --- Comment

[Bug c++/83692] New: Rejects valid constexpr with unrelated code fixing problem

2018-01-04 Thread david at doublewise dot net
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

[Bug c++/82894] New: Inherited member functions do not create ambiguity

2017-11-07 Thread david at doublewise dot net
: 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

[Bug c++/82756] New: Poor error message from control flow at global scope

2017-10-27 Thread david at doublewise dot net
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&#x

[Bug c++/66256] noexcept evaluation done before end of class

2017-08-24 Thread david at doublewise dot net
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

[Bug c++/66256] noexcept evaluation done before end of class

2017-08-24 Thread david at doublewise dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66256 David Stone changed: What|Removed |Added CC||david at doublewise dot net --- Comment

[Bug c++/52869] [DR 1207] "this" not being allowed in noexcept clauses

2017-08-24 Thread david at doublewise dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52869 David Stone changed: What|Removed |Added CC||david at doublewise dot net --- Comment

[Bug libstdc++/54924] Warn for std::string constructor with wrong size

2016-07-29 Thread david at doublewise dot net
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

[Bug libstdc++/69717] New: std::pair is incompatible with std::is_constructible

2016-02-07 Thread david at doublewise dot net
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

[Bug c++/66061] New: Internal Compiler Error when specializing a variable template when the specialization is variadic

2015-05-07 Thread 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: --- main.cpp: template int x = 1; template int x = 1; david@i5-fedora ~/test> g++ source/main.cpp

[Bug c++/66042] Implicitly converts lvalue to rvalue when returning reference parameter in function template

2015-05-07 Thread david at doublewise dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66042 David Stone changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/66042] Implicitly converts lvalue to rvalue when returning reference parameter in function template

2015-05-06 Thread david at doublewise dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66042 David Stone changed: What|Removed |Added CC||david at doublewise dot net --- Comment

[Bug c++/66042] New: Implicitly converts lvalue to rvalue when returning reference parameter in function template

2015-05-06 Thread 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: --- #include template auto compiles(T && t) -> T && { static_assert(std::is_same

[Bug c++/65896] Erroneous uninitialized variable access error in constexpr function with temporary variables

2015-04-26 Thread david at doublewise dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65896 David Stone changed: What|Removed |Added CC||david at doublewise dot net --- Comment

[Bug c++/65896] New: Erroneous uninitialized variable access error in constexpr function with temporary variables

2015-04-26 Thread 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: --- file.cpp == struct base{}; struct derived : base

[Bug other/53313] Add warning levels

2015-04-25 Thread david at doublewise dot net
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

[Bug other/53313] Add warning levels

2015-04-24 Thread david at doublewise dot net
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

[Bug c/52981] Separate -Wpadded into two options

2015-04-23 Thread david at doublewise dot net
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

[Bug other/53313] Add warning levels

2015-04-23 Thread david at doublewise dot net
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

[Bug c++/63871] New: -Weffc++ does not understand type deduction for return types

2014-11-14 Thread david at doublewise dot net
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

[Bug c++/56861] New: std::vector::reserve optimization bug

2013-04-06 Thread david at doublewise dot net
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

[Bug libstdc++/56785] New: std::tuple of two elements does not apply empty base class optimization when one of its elements is a std::tuple with two elements

2013-03-29 Thread david at doublewise dot net
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

[Bug c++/56556] New: Wshadow warns for private members in base classes

2013-03-06 Thread david at doublewise dot net
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

[Bug c++/55357] New: -Wshadow warns about lambda function parameters matching variables in outer scope

2012-11-16 Thread david at doublewise dot net
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

[Bug c++/55254] New: Warn for implicit conversion from int to char

2012-11-09 Thread david at doublewise dot net
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

[Bug libstdc++/54924] Warn for std::string constructor with wrong size

2012-10-14 Thread david at doublewise dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54924 David Stone changed: What|Removed |Added CC||david at doublewise dot net

[Bug c++/54924] New: Warn for std::string constructor with wrong size

2012-10-14 Thread 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

[Bug c++/54535] New: gcc fails to warn when functions are inlined

2012-09-09 Thread david at doublewise dot net
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

[Bug c++/54021] [c++0x] __builtin_constant_p should be constexpr

2012-09-08 Thread david at doublewise dot net
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

[Bug c++/54021] [c++0x] __builtin_constant_p should be constexpr

2012-09-08 Thread david at doublewise dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54021 David Stone changed: What|Removed |Added CC||david at doublewise dot net --- Comment #5

[Bug other/53313] Add warning levels

2012-08-15 Thread david at doublewise dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53313 David Stone changed: What|Removed |Added CC||david at doublewise dot net --- Comment #2

[Bug c/7652] -Wswitch-break : Warn if a switch case falls through

2012-07-14 Thread david at doublewise dot net
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

[Bug c++/53960] New: Add warning about implicit fallthrough in switch

2012-07-13 Thread david at doublewise dot net
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

[Bug c++/53650] [4.7/4.8 Regression] large array causes huge memory use

2012-06-17 Thread david at doublewise dot net
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

[Bug c++/53711] New: Wunused-function should warn for functions in the unnamed namespace

2012-06-17 Thread david at doublewise dot net
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

[Bug c++/53650] [4.7/4.8 Regression] large array causes huge memory use

2012-06-13 Thread david at doublewise dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53650 David Stone changed: What|Removed |Added CC||david at doublewise dot net --- Comment #2

[Bug c++/53650] New: large array causes huge memory use

2012-06-12 Thread david at doublewise dot net
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

[Bug c++/16166] -Weffc++ finer granularity

2012-05-29 Thread david at doublewise dot net
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

[Bug c++/16166] -Weffc++ finer granularity

2012-05-28 Thread david at doublewise dot net
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

[Bug c++/53514] New: Make -Wpadded a meta-option for -Wpadded-in-middle and -Wpadded-at-end

2012-05-28 Thread david at doublewise dot net
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

[Bug other/53316] Introduce -Odebug

2012-05-16 Thread david at doublewise dot net
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:

[Bug other/53316] Introduce -Odebug

2012-05-11 Thread david at doublewise dot net
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.