This is the mail archive of the gcc-patches@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]

Re: [PATCH] Fix optimization regression in constant folder


> Yes.  What makes Ada somewhat special is that it is quite common for Ada that
> those are not integer constants (of sizetype), but variables or
> expressions (of sizetype).

No.  If you have a[i], in any language, the computation of the offset from
the start of A is done in sizetype and that's normally an expression.

It's certaily true that you can have *more complex* sizetype expressions
in Ada than in C, but that's relative and Mark's example yesterday showed
that sizetype expressions can be even more complex in C++ than Ada.

We're seeing the *optimization* issue more in Ada because very long
expressions occur more there, but the definitional issue is very much
language-independent, which is what many of us have been trying to 
explain for a while.


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