* Do we ever pass ERROR_MARK to expanders?
@ 2004-10-17 17:22 Kazu Hirata
2004-10-17 20:32 ` Steven Bosscher
0 siblings, 1 reply; 5+ messages in thread
From: Kazu Hirata @ 2004-10-17 17:22 UTC (permalink / raw)
To: gcc
Hi,
A lot of expanders seem to check for ERROR_MARK. For example,
expand_assignment does so like this
if (TREE_CODE (to) == ERROR_MARK)
{
result = expand_expr (from, NULL_RTX, VOIDmode, 0);
return want_value ? result : NULL_RTX;
}
Now, do we ever pass ERROR_MARK to expanders these days? If not, we
should do something like gcc_assert (TREE_CODE (to) != ERROR_MARK);.
Kazu Hirata
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Do we ever pass ERROR_MARK to expanders?
2004-10-17 17:22 Do we ever pass ERROR_MARK to expanders? Kazu Hirata
@ 2004-10-17 20:32 ` Steven Bosscher
2004-10-17 23:06 ` Jan Hubicka
0 siblings, 1 reply; 5+ messages in thread
From: Steven Bosscher @ 2004-10-17 20:32 UTC (permalink / raw)
To: Kazu Hirata, gcc
On Sunday 17 October 2004 17:32, Kazu Hirata wrote:
> Now, do we ever pass ERROR_MARK to expanders these days? If not, we
> should do something like gcc_assert (TREE_CODE (to) != ERROR_MARK);.
I think we do. We only don't do optimizations if errorcount or
sorrycount is non-zero, but we do call rest_of_compilation on
functions even after errors. I don't know *why* we would want to
expand any trees after errors, though...
Gr.
Steven
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Do we ever pass ERROR_MARK to expanders?
2004-10-17 20:32 ` Steven Bosscher
@ 2004-10-17 23:06 ` Jan Hubicka
2004-10-18 0:18 ` Kazu Hirata
2004-10-22 19:04 ` Mark Mitchell
0 siblings, 2 replies; 5+ messages in thread
From: Jan Hubicka @ 2004-10-17 23:06 UTC (permalink / raw)
To: Steven Bosscher; +Cc: Kazu Hirata, gcc
> On Sunday 17 October 2004 17:32, Kazu Hirata wrote:
> > Now, do we ever pass ERROR_MARK to expanders these days? If not, we
> > should do something like gcc_assert (TREE_CODE (to) != ERROR_MARK);.
>
> I think we do. We only don't do optimizations if errorcount or
> sorrycount is non-zero, but we do call rest_of_compilation on
> functions even after errors. I don't know *why* we would want to
> expand any trees after errors, though...
The main rationaly has always been to get as many warnings as possible.
Perhaps we can weaken this now especialy on tree-profiling branch where
we will throw into tree optimizers everything we would do if we were
producing assembly and thus get all tree level warnings (and I would not
very trust the RTL level warnings to come out sane anyway)
Honza
>
> Gr.
> Steven
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Do we ever pass ERROR_MARK to expanders?
2004-10-17 23:06 ` Jan Hubicka
@ 2004-10-18 0:18 ` Kazu Hirata
2004-10-22 19:04 ` Mark Mitchell
1 sibling, 0 replies; 5+ messages in thread
From: Kazu Hirata @ 2004-10-18 0:18 UTC (permalink / raw)
To: hubicka; +Cc: stevenb, gcc
Hi Honza,
> > > Now, do we ever pass ERROR_MARK to expanders these days? If not, we
> > > should do something like gcc_assert (TREE_CODE (to) != ERROR_MARK);.
> >
> > I think we do. We only don't do optimizations if errorcount or
> > sorrycount is non-zero, but we do call rest_of_compilation on
> > functions even after errors. I don't know *why* we would want to
> > expand any trees after errors, though...
>
> The main rationaly has always been to get as many warnings as possible.
> Perhaps we can weaken this now especialy on tree-profiling branch where
> we will throw into tree optimizers everything we would do if we were
> producing assembly and thus get all tree level warnings (and I would not
> very trust the RTL level warnings to come out sane anyway)
OK. Then we may be able to stop expanding trees in presence of errors
as early as 4.1.
Kazu Hirata
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Do we ever pass ERROR_MARK to expanders?
2004-10-17 23:06 ` Jan Hubicka
2004-10-18 0:18 ` Kazu Hirata
@ 2004-10-22 19:04 ` Mark Mitchell
1 sibling, 0 replies; 5+ messages in thread
From: Mark Mitchell @ 2004-10-22 19:04 UTC (permalink / raw)
To: Jan Hubicka; +Cc: Steven Bosscher, Kazu Hirata, gcc
Jan Hubicka wrote:
>>On Sunday 17 October 2004 17:32, Kazu Hirata wrote:
>>
>>
>>>Now, do we ever pass ERROR_MARK to expanders these days? If not, we
>>>should do something like gcc_assert (TREE_CODE (to) != ERROR_MARK);.
>>>
>>>
>>I think we do. We only don't do optimizations if errorcount or
>>sorrycount is non-zero, but we do call rest_of_compilation on
>>functions even after errors. I don't know *why* we would want to
>>expand any trees after errors, though...
>>
>>
>
>The main rationaly has always been to get as many warnings as possible.
>
Which is because of the design bug wherein the optimizers issue
diagnostics. :-)
--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-10-22 18:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-17 17:22 Do we ever pass ERROR_MARK to expanders? Kazu Hirata
2004-10-17 20:32 ` Steven Bosscher
2004-10-17 23:06 ` Jan Hubicka
2004-10-18 0:18 ` Kazu Hirata
2004-10-22 19:04 ` Mark Mitchell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).