This is the mail archive of the
mailing list for the GCC project.
Re: [RFA:] Adjust documentation for LEGITIMATE_CONSTANT_P et al to match reality, take 2
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 06 Oct 2008 20:13:38 +0100
- Subject: Re: [RFA:] Adjust documentation for LEGITIMATE_CONSTANT_P et al to match reality, take 2
- References: <email@example.com> <200810052135.m95LZdjY002343@ignucius.se.axis.com>
Hans-Peter Nilsson <firstname.lastname@example.org> writes:
>> From: Richard Sandiford <email@example.com>
>> Date: Sun, 05 Oct 2008 21:44:25 +0100
>> With the const minus simplifications gone, do you know of any other code
>> that would generate unexpected CONSTs?
> No. Though, there is the confusing comment in cse.c:fold_rtx
> line 3189, which might be taken as such code being legitimate
> and more such code being introduced:
> /* NEG of PLUS could be converted into MINUS, but that causes
> expressions of the form
> (CONST (MINUS (CONST_INT) (SYMBOL_REF)))
> which many ports mistakenly treat as LEGITIMATE_CONSTANT_P.
> FIXME: those ports should be fixed. */
Hmm, good catch, thanks. When I submit the "CONST grammar" patch,
I'll remove that at the same time.