https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66773
--- Comment #9 from Daniel Marjamäki ---
Problems;
* Code that performs comparison properly gets a warning.
* Code where programmer makes a mistake with a cast does not generate a
warning.
* This warning encourage programmers to cast and wh
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66773
--- Comment #10 from Daniel Marjamäki ---
Well I am just a happy gcc user.. if some gcc maintainer thinks this ticket is
invalid feel free to close it. I can't expect that everybody will think just
like me. :-)
As a Cppcheck developer I am dissa
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66773
--- Comment #12 from Daniel Marjamäki ---
> Do you have examples of perfectly fine code where you get a warning?
So, how would you fix the warning for `f`? Many programmers would "fix" it with
a cast.
Assuming that `s` and `u` can have arbitrar
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66773
--- Comment #19 from Daniel Marjamäki ---
(In reply to Segher Boessenkool from comment #15)
> (In reply to Daniel Marjamäki from comment #12)
> > So, how would you fix the warning for `f`? Many programmers would "fix" it
> > with a cast.
> >
> >
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66773
--- Comment #20 from Daniel Marjamäki ---
(In reply to Segher Boessenkool from comment #15)
> (In reply to Daniel Marjamäki from comment #12)
> > So, how would you fix the warning for `f`? Many programmers would "fix" it
> > with a cast.
> >
> >
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66773
--- Comment #23 from Daniel Marjamäki ---
> If the user expects C to provide tests for "mathematically different", the
user has some learning to do.
I believe most users can appreciate this. But few users fully understand the
integer conversions
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53417
Bug #: 53417
Summary: multiple assignments can be optimized
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: enhancement
Prior
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53417
Daniel Marjamäki changed:
What|Removed |Added
Summary|multiple assignments can be |optimize multiple movb into
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53417
--- Comment #2 from Daniel Marjamäki
2012-05-19 19:44:13 UTC ---
To clarify a little. The objdump output from my code example is:
:
0:48 83 ec 18 sub$0x18,%rsp
4:48 89 e7 mov%rs
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: daniel.marjamaki at gmail dot com
Target Milestone: ---
I wrote a clang bug report:
https://llvm.org/bugs/show_bug.cgi?id=24036
I recommend that -Wsign-compare is not written for == and != comparisons.
For relational
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37591
Daniel Marjamäki changed:
What|Removed |Added
CC||daniel.marjamaki at gmail dot
com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66773
--- Comment #2 from Daniel Marjamäki ---
Thanks!
Hmm.. in my humble opinion, when I see the code:
int f(void) { return 0x == -1; }
.. I get the impression that the developer probably wants to test if the
bitpattern 0xfff.. matches -1.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66773
--- Comment #4 from Daniel Marjamäki ---
absolutely. there are often bugs in the boundaries.
well. I was hoping to get more optimistic response.
how about this.. imagine that we wrote a "possible division by zero" warning
for every integer divi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652
Daniel Marjamäki changed:
What|Removed |Added
CC||daniel.marjamaki at gmail
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30475
Daniel Marjamäki changed:
What|Removed |Added
CC||daniel.marjamaki at gmail dot
com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30475
--- Comment #63 from Daniel Marjamäki ---
Sorry. I should have mentioned I am a Cppcheck developer in my comment.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30475
--- Comment #66 from Daniel Marjamäki ---
Thanks! I can appreciate that it's not very simple. Well using a flag is
totally acceptable. I don't trust the sanitizer completely but those that do
can use the optimisation.
17 matches
Mail list logo