This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/70378] wrong warning with -Wconversion with explicit cast


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70378

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |egallager at gcc dot gnu.org
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=70336

--- Comment #4 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Manuel López-Ibáñez from comment #3)
> (In reply to Manuel López-Ibáñez from comment #2)
> > Simpler testcase:
> > 
> > typedef unsigned int uint32_t;
> > void foo(char a, uint32_t b)
> > {
> >  b = (uint32_t)((b * 10) + (uint32_t)a); 
> > }
> > 
> > Something must be removing the explicit cast or messing up the expression.
> 
> Perhaps a duplicate of PR70336. It seems that the move to match.pd just
> added more early folding that removes explicit casts.

70336 was fixed, though, and I still get a warning for this testcase...

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]