|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30559 ext/standard fails to compile due to data type error
Submitted: 2004-10-26 10:10 UTC Modified: 2004-10-27 11:48 UTC
From: jbarwick at sentienthealth dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: * OS: *
Private report: No CVE-ID: None
 [2004-10-26 10:10 UTC] jbarwick at sentienthealth dot com
in /etx/standard/var_unserializer.c line 310
data type error...

Changed line from:

if (yych <= '\277) gogo yy15;


if (yych <= (YYCTYPE) '\277') goto yy15;

this removed a compiler warning on this file relating to limited range of data type and the fact that this if would always return false..

Reproduce code:
compile the code

Expected result:
no error relating to date type size

Actual result:
error relating to data type size


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-26 11:28 UTC]
This is a generated file (by re2c) from This is not an ERROR, but a warning, and something that should be fixed in the re2c tool. You can safely ignore this warning.
 [2004-10-26 20:54 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Upgrade your re2c:
 [2004-10-27 03:55 UTC] jbarwick at sentienthealth dot com
I understand from your perspective that "this doesn't imply" a bug in PHP itself.  And I concur.  I appriciate the info on other sites to post bugs.

Whenever our shop compiles a tool to be used in our business, I must justify EVERY compiler warning.

As I appriciate that you "Won't Fix" this, It amazes me that you refuse to add the most simplistic typecast to something to remove a warning that just makes people question the code.

Just ONE LITTLE  Well, if var_unserializer.c is a "generated source"...guess you can't.

Anyway, thanks for listening to one of your advocates of PHP.  I guess I'll keep my diffs around and apply this patch when we go to 4.3.9...

 [2004-10-27 11:07 UTC]
"Whenever our shop compiles a tool to be used in our business,   I must justify EVERY compiler warning."

What would be the reason for that? It makes no sense in a lot of cases...
 [2004-10-27 11:43 UTC] jbarwick at sentienthealth dot com
you are right...most of the time my justification is:

"Warning can be safely ignored"

However, I cannot ignore warnings like:

"statement always returns false due to limited range of data type"

cannot ignore this one


"loss of precision due to limited range of data type."

sometimes I ignore this...but have to look.

in the if statement below, it is probably safe to ignore the particular error that was created.

However, I do like to report them to developers...JUST in case...

Take the mbstring library...for example...TONS of integer math in there on pointers ... and...seems to be fine on 32 bit systems..but that don't work on 64 bit pointers.

 [2004-10-27 11:48 UTC]
Right, the mbstring stuff definitely needs to be fixed, no argument there :)
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Sep 27 01:01:24 2020 UTC