Hi,

On Sun, 2008-08-03 at 22:15 +0200, Pierre Joye wrote:
> Hi Derick,
> 
> On Sun, Aug 3, 2008 at 6:34 PM, Derick Rethans <[EMAIL PROTECTED]> wrote:
> 
> > you're not reading what I said. It does not make one single bit of sense
> > that a short function gives problems while an enormously long function
> > is fine. This does *NOT* make sense. If you have no idea either, then
> > figure it out first before you add silly #pragmas to code.
> 
> This code broke the VC6 build, that's a fact. A breakage must be
> fixed, period. I figured out why and fixed it, end of the topic.  Let
> forget the insane amount of warnings in the date code... (top #1 in
> PHP).

Correct PHP is supposed to work on "all" platforms therefore the code
has to work on Windows, too.

Now there are two questions Derick ask, which I see as valid questions:

a) Why does it break with that function while at least another bigger
one exists. Do we have to expect the other one breaks too the next time
the scan() function is regenerated from re2c for instance?
It feels a bit awkward that a small function is too big for the compiler
while a way bigger one isn't. So finding the exact reason might help in
the future. That's mainly curiosity.

b) In general the build system is not only for putting the stuff in the
compiler but also detecting compiler problems and working around them.
Is it possible to do this work around in the build file? The benefit
would be that it's less likely that a developer breaks it by accident
and we avoid making our code harder to maintain by not cluttering it
with compiler specific stuff (probably the Aix compiler has a problem
with some other stuff, the Sun compiler with other stuff and yet another
compiler somewhere else) Yes one workaround doesn't hurt but let's wait
5, 6, 7 years of further growth of the code base and new compilers with
their issues to be supported... Therefore such changes should be, when
possible, be placed in the build files. Oh and also see the discussion
about a gcc issue we recently discussed on the list.

So as a summary: The nicest code is worthless if we can't compile it on
our platforms, but build fixes should be places where they hurt the
less.

johannes


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to