php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jbarwick at sentienthealth dot com
New email:
PHP Version: OS:

 

 [2004-10-26 10:10 UTC] jbarwick at sentienthealth dot com
Description:
------------
in /etx/standard/var_unserializer.c line 310
data type error...

Changed line from:

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

to

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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-26 11:28 UTC] derick@php.net
This is a generated file (by re2c) from var_serializer.re. 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] helly@php.net
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 http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Upgrade your re2c: http://sf.net/projects/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 typecast...eh?  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...

Thanks..
 [2004-10-27 11:07 UTC] derick@php.net
"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

....or  

"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.

cheers!
 [2004-10-27 11:48 UTC] derick@php.net
Right, the mbstring stuff definitely needs to be fixed, no argument there :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 21:01:27 2024 UTC