Re: [PHP-DEV] [RFC] Interval Comparison

2016-11-12 Thread Lauri Kenttä
On 2016-11-11 19:03, David Walker wrote: I took a quick stab at implementing, and had something working for constant expressions, but handling something akin to: $a = 2; if (1 < $a++ < 3) { ... } Is a bit awkward in our expansions of : if (1 < $a++ && $a++ < 3). Seems as if when processing the

Re: [PHP-DEV] C89 vs. C99

2016-11-12 Thread Nikita Popov
On Sun, Jun 12, 2016 at 11:08 AM, Fleshgrinder wrote: > I am curious why we are not finally doing the switch to C99 with VC14 > finally supporting most of C99. I mean, I know that GCC and VC14 do no > fully support C99 but the most common features are implemented: > > - https://en.wikipedia.org/w

Re: [PHP-DEV] C89 vs. C99

2016-11-12 Thread Kalle Sommer Nielsen
2016-11-12 11:57 GMT+01:00 Nikita Popov : > It's time to bring this up again. I recently noticed that nowadays only > Kalle fixes Windows build issues due to C99 declarations-after-code, while > Anatol doesn't. Am I correct in the assumption that Anatol is using an MSVC > version that supports the

Re: [PHP-DEV] Netware and master

2016-11-12 Thread Christoph M. Becker
On 12.11.2016 at 08:00, Joe Watkins wrote: > Morning Kalle, > >Cleanse it with fire. +1 Cheers, Christoph > Cheers > Joe > > On Sat, Nov 12, 2016 at 12:01 AM, Kalle Sommer Nielsen > wrote: > >> Howdy >> >> Just wondering if anyone actively is using netware anymore? It has >> been discon

Re: [PHP-DEV] Netware and master

2016-11-12 Thread Kalle Sommer Nielsen
2016-11-12 12:17 GMT+01:00 Christoph M. Becker : > +1 It died horribly (and I lost some sanity from seeing netware so many times). -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: C89 vs. C99

2016-11-12 Thread Christoph M. Becker
On 12.06.2016 at 11:08, Fleshgrinder wrote: > I am curious why we are not finally doing the switch to C99 with VC14 > finally supporting most of C99. I mean, I know that GCC and VC14 do no > fully support C99 but the most common features are implemented: > > - https://en.wikipedia.org/wiki/C99#Im

Re: [PHP-DEV] Netware and master

2016-11-12 Thread Joe Watkins
RIP netware ... we ... never really used you ... Cheers Joe On Sat, Nov 12, 2016 at 11:20 AM, Kalle Sommer Nielsen wrote: > 2016-11-12 12:17 GMT+01:00 Christoph M. Becker : > > +1 > > It died horribly (and I lost some sanity from seeing netware so many > times). > > > -- > regards, > > Kalle So

Re: [PHP-DEV] Re: C89 vs. C99

2016-11-12 Thread Joe Watkins
Morning, > okay, I'm only really interested in declarations mixed with code Not sure if serious ... but I will harass you to change code that is mixi [1]. I think actually disallowing mixing lends some readability and uniformity to the code in php-src, that I would hate to see disappear ... Che

Re: [PHP-DEV] Re: C89 vs. C99

2016-11-12 Thread Nikita Popov
On Sat, Nov 12, 2016 at 1:40 PM, Joe Watkins wrote: > Morning, > > > okay, I'm only really interested in declarations mixed with code > > Not sure if serious ... but I will harass you to change code that is mixi > [1]. > > I think actually disallowing mixing lends some readability and uniformity

Re: [PHP-DEV] C89 vs. C99

2016-11-12 Thread Derick Rethans
On Sat, 12 Nov 2016, Nikita Popov wrote: > On Sun, Jun 12, 2016 at 11:08 AM, Fleshgrinder wrote: > > > I am curious why we are not finally doing the switch to C99 with VC14 > > finally supporting most of C99. I mean, I know that GCC and VC14 do no > > fully support C99 but the most common featur

Re: [PHP-DEV] Re: C89 vs. C99

2016-11-12 Thread Joe Watkins
Morning Nikita, All good points, that it's hard to refute. However, right now, I know where all variables that are going to be used are declared, no matter the size of the function or it's complexity. If not at the very top, eyes get good at scanning for blocks. What I don't want is to have to s

Re: [PHP-DEV] Re: C89 vs. C99

2016-11-12 Thread Nikita Popov
On Sat, Nov 12, 2016 at 2:21 PM, Joe Watkins wrote: > Morning Nikita, > > All good points, that it's hard to refute. > > However, right now, I know where all variables that are going to be used > are declared, no matter the size of the function or it's complexity. If not > at the very top, eyes g

Re: [PHP-DEV] C89 vs. C99

2016-11-12 Thread Andrea Faulds
Hi Derick, Derick Rethans wrote: I would want to write down in our coding guidelines that we should *NOT* do declarations after code, as you will no longer have an overview of all the types in one place anymore. That's your preference. Personally, I would really appreciate the ability to decl

Re: [PHP-DEV] Re: C89 vs. C99

2016-11-12 Thread Joe Watkins
Morning Nikita, It is actually the first kind I'm rebelling against. I think the second kind might lead people to think we would accept the first kind, and I think an extreme version of the second kind could also harm readability. How about we adopt the rule of thumb that "declarations should be

Re: [PHP-DEV] Re: C89 vs. C99

2016-11-12 Thread Christoph M. Becker
On 12.11.2016 at 14:59, Nikita Popov wrote: > There are two ways in which you can have code mixed with declarations. The > first one is within a single "basic block", like this: > > int a = ...; > b = ...; > int c = ...; > a = ...; > float d = ...; > // ... > > I can tota

Re: [PHP-DEV] Re: C89 vs. C99

2016-11-12 Thread Levi Morrison
On Sat, Nov 12, 2016 at 4:27 AM, Christoph M. Becker wrote: > On 12.06.2016 at 11:08, Fleshgrinder wrote: > >> I am curious why we are not finally doing the switch to C99 with VC14 >> finally supporting most of C99. I mean, I know that GCC and VC14 do no >> fully support C99 but the most common fe

Re: [PHP-DEV] Re: C89 vs. C99

2016-11-12 Thread Christoph M. Becker
On 12.11.2016 at 15:27, Levi Morrison wrote: > On Sat, Nov 12, 2016 at 4:27 AM, Christoph M. Becker > wrote: > >> On 12.06.2016 at 11:08, Fleshgrinder wrote: >> >>> I am curious why we are not finally doing the switch to C99 with VC14 >>> finally supporting most of C99. I mean, I know that GCC a

Re: [PHP-DEV] [RFC] Interval Comparison

2016-11-12 Thread David Walker
On Sat, Nov 12, 2016 at 3:08 AM Lauri Kenttä wrote: > On 2016-11-11 19:03, David Walker wrote: > > > > I took a quick stab at implementing, and had something working for > > constant expressions, but handling something akin to: > > > > $a = 2; > > if (1 < $a++ < 3) { > > ... > > } > > > > Is a bi

Re: [PHP-DEV] [RFC] Interval Comparison

2016-11-12 Thread Kris Craig
On Nov 12, 2016 8:21 AM, "David Walker" wrote: > > On Sat, Nov 12, 2016 at 3:08 AM Lauri Kenttä wrote: > > > On 2016-11-11 19:03, David Walker wrote: > > > > > > I took a quick stab at implementing, and had something working for > > > constant expressions, but handling something akin to: > > > >

Re: [PHP-DEV] [RFC] Interval Comparison

2016-11-12 Thread Christoph M. Becker
On 12.11.2016 at 17:21, David Walker wrote: > Should > $a = 1; > var_dump(1 < $a++ < 3); > > (expanded into numbers) be evaluated as: > 1 < 2 && 2 < 3 - True > or > 1 < 2 && 3 < 3 - False In my opinion, that should evaluate to 1 < 1 // false because we have a post-increment operator, and it

Re: [PHP-DEV] [RFC] Interval Comparison

2016-11-12 Thread David Walker
On Sat, Nov 12, 2016 at 9:47 AM Christoph M. Becker wrote: > On 12.11.2016 at 17:21, David Walker wrote: > > > Should > > $a = 1; > > var_dump(1 < $a++ < 3); > > > > (expanded into numbers) be evaluated as: > > 1 < 2 && 2 < 3 - True > > or > > 1 < 2 && 3 < 3 - False > > In my opinion, that should

Re: [PHP-DEV] Re: C89 vs. C99

2016-11-12 Thread Dennis Clarke
On 11/12/2016 06:27 AM, Christoph M. Becker wrote: On 12.06.2016 at 11:08, Fleshgrinder wrote: I am curious why we are not finally doing the switch to C99 with VC14 finally supporting most of C99. I mean, I know that GCC and VC14 do no fully support C99 but the most common features are implemen

Re: [PHP-DEV] C89 vs. C99

2016-11-12 Thread Dennis Clarke
On 11/12/2016 06:10 AM, Kalle Sommer Nielsen wrote: 2016-11-12 11:57 GMT+01:00 Nikita Popov : It's time to bring this up again. I recently noticed that nowadays only Kalle fixes Windows build issues due to C99 declarations-after-code, while Anatol doesn't. Am I correct in the assumption that Ana

Re: [PHP-DEV] Re: C89 vs. C99

2016-11-12 Thread Christoph M. Becker
On 12.11.2016 at 20:28, Dennis Clarke wrote: > On 11/12/2016 06:27 AM, Christoph M. Becker wrote: > >> On 12.06.2016 at 11:08, Fleshgrinder wrote: >> >>> I am curious why we are not finally doing the switch to C99 with VC14 >>> finally supporting most of C99. I mean, I know that GCC and VC14 do no

RE: [PHP-DEV] C89 vs. C99

2016-11-12 Thread Anatol Belski
Hi Nikita, > -Original Message- > From: Nikita Popov [mailto:nikita@gmail.com] > Sent: Saturday, November 12, 2016 11:58 AM > To: PHP internals ; Anatol Belski > > Subject: Re: [PHP-DEV] C89 vs. C99 > > On Sun, Jun 12, 2016 at 11:08 AM, Fleshgrinder >

Re: [PHP-DEV] Re: C89 vs. C99

2016-11-12 Thread Dennis Clarke
What about other compilers such as Solaris Studio and XL C? Oracle Studio compiler tools are fully compliant with C99 and has been for a very very long time. Thanks for the info! I would also note that php7.x does not compile out of the box, yet. However I am looking into why. I remembe

RE: [PHP-DEV] PaX MPROTECT / W^X protection

2016-11-12 Thread Anatol Belski
Hi Christoph, > -Original Message- > From: Christoph M. Becker [mailto:cmbecke...@gmx.de] > Sent: Friday, November 11, 2016 7:40 PM > To: internals@lists.php.net > Subject: [PHP-DEV] PaX MPROTECT / W^X protection > > Hi! > > There are currently at least two unresolved tickets[1][2] in ou

Re: [PHP-DEV] C89 vs. C99

2016-11-12 Thread Dennis Clarke
IMHO, if we decide to move to C99, we should do it the strict way At risk of sounding bitter there really is no other way other than "compliant" or "non-compliant" with very little grey area. unlike we do now with C89. VC++ enables C99 the way it can't be > turned off, but some parts are s

Re: [PHP-DEV] C89 vs. C99

2016-11-12 Thread Dennis Clarke
IMHO, if we decide to move to C99, we should do it the strict way I forgot to add that GNU GCC allows a lot of non-standard extensions to slip right through. Unless some CFLAGS are set to warn or error on them. https://gcc.gnu.org/onlinedocs/gcc-5.4.0/gcc/C-Extensions.html#C-Extensions Denni

Re: [PHP-DEV] C89 vs. C99

2016-11-12 Thread Levi Morrison
On Sat, Nov 12, 2016 at 1:37 PM, Dennis Clarke wrote: > >> IMHO, if we decide to move to C99, we should do it the strict way > > > I forgot to add that GNU GCC allows a lot of non-standard extensions to > slip right through. Unless some CFLAGS are set to warn or error on them. > > https://gcc.gnu.

[PHP-DEV] PHP 5.6.27 and 5.6.28 both fail tests with Fatal error in the same place

2016-11-12 Thread Dennis Clarke
This is a tad tricky but here is what happened. With a build of 5.6.27 I had no problems until the time came to run "make test" wherein everything seems normal until this : FAIL Basic bitwise stream crypto context flag assignment [ext/openssl/tests/stream_crypto_flags_001.phpt] FAIL TLSv1.1

Re: [PHP-DEV] PHP 5.6.27 and 5.6.28 both fail tests with Fatal error in the same place

2016-11-12 Thread David Lundgren
On 11/12/16 7:48 PM, Dennis Clarke wrote: > > FAIL Specific protocol method specification > [ext/openssl/tests/stream_crypto_flags_004.phpt] > PHP Fatal error: String size overflow in > /usr/local/build/php-5.6.28_SunOS5.10_sparcv9.001/run-tests.php on line > 1120 > gmake: *** [test] Error 255 >

Re: [PHP-DEV] PaX MPROTECT / W^X protection

2016-11-12 Thread Joe Watkins
Morning, Just wanted to give a thumbs up to documenting the issue ... Trying to work around it with platform/distro/kernel specific solutions, sounds quite horrible, and is bound to be fragile. Cheers Joe On Sat, Nov 12, 2016 at 8:25 PM, Anatol Belski wrote: > Hi Christoph, > > > -Origina