http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51850
--- Comment #1 from Edward Rosten 2012-01-18
16:35:40 UTC ---
Created attachment 26368
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26368
Adds bounds checking to std::array and tr1::array in debug mode.
I've attached a patch which adds b
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ed at edwardrosten dot com
Target Milestone: ---
The following code compiles successfully:
constexpr int a(){
int* b = new int[1];
int r= &b[100]-b; //UB
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ed at edwardrosten dot com
Target Milestone: ---
I've got come generated condition chains (using recursive templates) a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103429
--- Comment #2 from Edward Rosten ---
It is doing if-to-switch, but only really with N=5, and only if force-inline is
set. I think this are two problems, one is that you need to force-inline in
order to trigger if-to-switch.
The other problem i