[Bug 178343] h2ph problem with gcc internal defines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug report.

Summary: h2ph problem with gcc internal defines


https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=178343


jvdias@xxxxxxxxxx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED




------- Additional Comments From jvdias@xxxxxxxxxx  2006-01-19 12:20 EST -------
Now that h2ph correctly picks up the gcc C standard includes, such as limits.h,
from the gcc internal include directory (ie. /usr/lib/gcc/*.../include),
which it was not doing before, due to bug 172236, some perl .ph files cannot be
included because they refer to the newer gcc versions 'internal definitions' such
as __INT_MAX__ / __LONG_MAX__ , which are no longer #define'd in any header file,
but are 'built-in' to the newer gcc compilers, in the same way as __FILE__ or
__LINE__ :

  $ echo 'int main(int argc, char **argv, char **envp)
          { long l=__LONG_MAX__; printf( "%ld\n",l); };' >tlm.c
( NOTE: no files are #include-ed )
  $ gcc -o tlm tlm.c$ gcc -o tlm tlm.c
  tlm.c: In function ‘main’:
  tlm.c:1: warning: incompatible implicit declaration of built-in function  ‘printf’
  $ ./tlm
  2147483647

gcc's C standard headers define constants such as LONG_MAX / INT_MAX in terms
of these internal definitions:

$ egrep 'define\ (INT|LONG)_MAX' limits.h
#define INT_MAX __INT_MAX__
#define LONG_MAX __LONG_MAX__

During the generation of the perl platform h2ph includes, we should create a 
file included by limits.ph that includes definitions for all the gcc 
'internal definitions' such as __LONG_MAX__ that might be referenced .

-- 
Configure bugmail: https://bugzilla.redhat.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux