Edit report at https://bugs.php.net/bug.php?id=62346&edit=1

 ID:                 62346
 Comment by:         mamfelt at gmail dot com
 Reported by:        mamfelt at gmail dot com
 Summary:            when using vac.C v11 get warning about redefine for
                     __restrict__ in zend.h
 Status:             Open
 Type:               Bug
 Package:            Compile Warning
 Operating System:   AIX
 PHP Version:        5.3.14
 Block user comment: N
 Private report:     N

 New Comment:

The patch is "very simple". It gets rid of endless messages. However, I do not 
know the importance of restrict or __restrict__

The solution may be much different.

The AIX definition from /usr/include/standards.h

is

/*
 * Handle the use of the restrict keyword in non-C99 compilers
 */
#if ((__STDC_VERSION__ >= 199901L) || defined(__C99_RESTRICT))
#define __restrict__ restrict
#else
#define __restrict__
#endif

Note: there are several ways to resolve the issue of the occainsional C++ 
comments in C code. But experience shows that when C++ comments are being used
c89 is often not enough.

If PHP is meant to be strictly C89 code - I could change the CFLAG to get rid
of the messages - but just because gnu accepts both - with lots of help in 
zend.h it seems - does not make it better than one or the other.

If PHP is meant to be "c89" rather than "c99" (with extensions) then I need to 
try with different compiler flags - because langval c99ext is wrong

yes, I know I can add the flag -qcpluscmt instead - but I am told by people who 
"know" compilers that what we call c++ comments is officially an extension, not 
a core element.

Thank you for your consideration.


Previous Comments:
------------------------------------------------------------------------
[2012-06-17 20:09:44] mamfelt at gmail dot com

Description:
------------
"/data/prj/php-5.3.14/Zend/zend.h", line 179.10: 1506-358 (I) "__restrict__" is 
defined on line 186 of /usr/include/standards.h.


Test script:
---------------
export CFLAGS='-O2 -qlangval=extc99'

./configure  --prefix=/opt --sysconfdir=/etc --mandir=/usr/share/man

make

Expected result:
----------------
"/data/prj/php-5.3.14/Zend/zend.h", line 179.10: 1506-358 (I) "__restrict__" is 
defined on line 186 of /usr/include/standards.h.

but MANY MANY times




------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62346&edit=1

Reply via email to