This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/29478] [4.2 Regression] optmization generates warning for casts
- From: "pinskia at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Oct 2006 21:37:03 -0000
- Subject: [Bug middle-end/29478] [4.2 Regression] optmization generates warning for casts
- References: <bug-29478-11533@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from pinskia at gmail dot com 2006-10-23 21:37 -------
Subject: Re: [4.2 Regression] optmization generates warning for casts
On 23 Oct 2006 17:30:22 -0000, amylaar at gcc dot gnu dot org
<gcc-bugzilla@gcc.gnu.org> wrote:
> I think it is wrong that we are optimizing the expression before converting
> it to the required type.
> Moreover, why is it right to drop NOP_EXPRESSIONS there? If for some reason
> the compiler finds it needs to put the initializer in a temporary variable,
> and uses the type of the value for that variable, we'll get an alias set
> problem.
Hmm, This is one of the language hooks which really need to go away
for LTO as I understand it. Also I the real problem comes from the
inliner or the gimplifier (I am betting the gimplifier) removing the
cast as it is useless in our type system.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29478