[Bug c++/77297] New: -Wnonnull-compare not emitted inside ternary operator

2016-08-19 Thread wipedout at yandex dot ru
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wipedout at yandex dot ru Target Milestone: --- On http://gcc.godbolt.org/ I select gcc 6.1 and specify -O3 -Wall Here's the code: struct CHandle { int handle; int GetHandle() const { if (this == 0

[Bug c++/77298] New: -Wnonnull-compare only emitted for code which is invoked

2016-08-19 Thread wipedout at yandex dot ru
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wipedout at yandex dot ru Target Milestone: --- On http://gcc.godbolt.org/ I select gcc 6.1 and specify -O3 -Wall The code is: struct CHandle { int handle; int GetHandle() const

[Bug c++/77299] New: No warning for unused "INT64_MAX" and similar constants

2016-08-19 Thread wipedout at yandex dot ru
ty: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wipedout at yandex dot ru Target Milestone: --- On http://gcc.godbolt.org/ I select gcc 6.1 and specify -O3 -Wall The code is: #include int main() { INT64_MIN; // no warning

[Bug c++/69686] Useless -Wparentheses for A && B || !A && C

2016-02-05 Thread wipedout at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69686 --- Comment #5 from wipedout at yandex dot ru --- Here the compiler just enforces people to add parentheses so that they accidentally put them wrong and then the compiler is happy and the code is buggy.

[Bug c++/69684] New: Useless -Wparentheses for A || !A && B

2016-02-05 Thread wipedout at yandex dot ru
onent: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wipedout at yandex dot ru Target Milestone: --- I'm compiling this with gcc 5.3.0 with -O3 -Wall -std=c++11 void test() { int a, b; if(a || !a && b); } Please ignore the uninitialized variables for now. I

[Bug c++/69686] New: Useless -Wparentheses for A && B || !A && C

2016-02-05 Thread wipedout at yandex dot ru
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wipedout at yandex dot ru Target Milestone: --- I'm compiling this with gcc 5.3.0 with -O3 -Wall -std=c++11 void test() { int a, b, c; if(a && b || !a && c); } Please ignore th

[Bug c++/39159] unhelpful attribute warning on matching declaration after definition

2016-02-04 Thread wipedout at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39159 wipedout at yandex dot ru changed: What|Removed |Added CC||wipedout at yandex dot ru

[Bug c++/69672] New: Useless -Wenum-compare when comparing enum vaue against the same value in enum hack

2016-02-04 Thread wipedout at yandex dot ru
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wipedout at yandex dot ru Target Milestone: --- I'm trying this on http://gcc.godbolt.org/ the version is "x86 gcc 5.3.0", the options line is "-O3 -

[Bug c++/69670] New: Useless -Wenum-compare when comparing parallel enums in static_assert

2016-02-04 Thread wipedout at yandex dot ru
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wipedout at yandex dot ru Target Milestone: --- I'm trying this on http://gcc.godbolt.org/ the version is "x86 gcc 5.3.0", the options line is "-O3 -Wall -std=

[Bug c++/69672] Useless -Wenum-compare when comparing enum vaue against the same value in enum hack

2016-02-04 Thread wipedout at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69672 --- Comment #1 from wipedout at yandex dot ru --- "distinct warnings" should be "distinct enums"

[Bug rtl-optimization/69482] Writing through pointers to volatile not always preserved

2016-01-28 Thread wipedout at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69482 --- Comment #6 from wipedout at yandex dot ru --- The explanations sound reasonable so far. Yet I expect that this problem will be reported again and again because WOW A SECURITY HOLE so perhaps it'd be reasonable to change gcc behavior so

[Bug rtl-optimization/69482] Writing through pointers to volatile not always preserved

2016-01-26 Thread wipedout at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69482 --- Comment #4 from wipedout at yandex dot ru --- Okay, suppose we have the following scenario. There's a third party library with an encryption function like this: void encrypt( void* data, void* key ); That function is compiled

[Bug rtl-optimization/69482] Writing through pointers to volatile not always preserved

2016-01-26 Thread wipedout at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69482 wipedout at yandex dot ru changed: What|Removed |Added CC||wipedout at yandex dot ru

[Bug rtl-optimization/69482] New: Writing through pointers to volatile not always preserved

2016-01-25 Thread wipedout at yandex dot ru
Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: wipedout at yandex dot ru Target Milestone: --- I'm trying this on http://gcc.godbolt.org/ The compiler selected is "x86 gcc 5.3.0", the command line option string is