php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49572 use of C++ style comments causes build failure
Submitted: 2009-09-16 17:15 UTC Modified: 2009-10-04 14:56 UTC
From: mamfelt at gmail dot com Assigned: srinatar (profile)
Status: Closed Package: Compile Failure
PHP Version: 5.2SVN-2009-09-16 (snap) OS: AIX 6.1
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mamfelt at gmail dot com
New email:
PHP Version: OS:

 

 [2009-09-16 17:15 UTC] mamfelt at gmail dot com
Description:
------------
A C++ style comment in main/streams/memory.c causes a build failure.



Reproduce code:
---------------
in /php5.2-200909161430/main/streams/memory.c:

self->innerstream = php_stream_memory_create_rel(mode);
php_stream_auto_cleanup(self->innerstream); // do not warn if innerstream is GC'ed before stream
((php_stream_memory_data*)self->innerstream->abstract)->owner_ptr = &self->innerstream;

Corrected as:

self->innerstream = php_stream_memory_create_rel(mode);
php_stream_auto_cleanup(self->innerstream); /* do not warn if innerstream is GC'ed before stream */
((php_stream_memory_data*)self->innerstream->abstract)->owner_ptr = &self->innerstream;

Expected result:
----------------
A normal build

Actual result:
--------------
prj/php5.2-200909161430/main/streams/memory.c", line 566.53: 1506-046 (S) Syntax error.
"/data/home/michael/prj/php5.2-200909161430/main/streams/memory.c", line 566.105: 1506-209 (S) Character constants must end before the end of a line.
"/data/home/michael/prj/php5.2-200909161430/main/streams/memory.c", line 566.88: 1506-076 (W) Character constant 'ed before stream' has more than 4 characters. No more than rightmost 4 characters are used.
....

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-16 18:50 UTC] srinatar@php.net
thanks for reporting this bug. this issue seems to be brought in with svn commit r280638

you can work around this issue - for now - by using -qcpluscmt within the CFLAGS

export CFLAGS=-qcpluscmt
./configure ...
gmake
 [2009-09-16 18:56 UTC] pajoye@php.net
Can you simply commit the fix please? All affected branches? :-)
 [2009-09-17 02:45 UTC] svn@php.net
Automatic comment from SVN on behalf of srinatar
Revision: http://svn.php.net/viewvc/?view=revision&revision=288393
Log: - Fixed bug #49572 (use of C++ style comments causes build failure)
 [2009-09-17 02:46 UTC] srinatar@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

ok, thanks. 
 [2009-10-04 14:50 UTC] mamfelt at gmail dot com
Looks like it just missed the 5.2.11 build :)

check dates of this bug - and compare with release date.

michael@x054:[/data/home/michael/prj]diff php5.2-200910031430/main/streams/memory.c php-5.2.11/main/streams/memory.c
19c19
< /* $Id: memory.c 288393 2009-09-17 02:45:25Z srinatar $ */
---
> /* $Id: memory.c 280638 2009-05-16 20:28:02Z lbarnaud $ */
566c566
<       php_stream_auto_cleanup(self->innerstream); /* do not warn if innerstream is GC'ed before stream */
---
>       php_stream_auto_cleanup(self->innerstream); // do not warn if innerstream is GC'ed before stream
 [2009-10-09 17:45 UTC] svn@php.net
Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=289437
Log: - Merge: Fixed bug #49572 (use of C++ style comments causes build failure)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC