Bug 137509 - <png.h> fails to compile when <setjmp.h> preceeds it
<png.h> fails to compile when <setjmp.h> preceeds it
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: libpng (Show other bugs)
2
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Matthias Clasen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-28 18:49 EDT by Kristian Spangsege
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-11-03 09:45:06 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Kristian Spangsege 2004-10-28 18:49:35 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)
Gecko/20040922

Description of problem:
Compiling the following file (2 lines) fails:

#include <setjmp.h>
#include <png.h>


As a C-file (not C++) it gives the following error for me:

In file included from /usr/include/png.h:349,
                 from t.c:2:
/usr/include/pngconf.h:263: error: syntax error before '.' token


If the order of the two includes is reversed, then compilation
succeeds without any errors!!


Same result for both versions of gcc:

Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --disable-libunwind-exceptions --with-system-zlib
--enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)


Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.0/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-languages=c,c++,objc,java,f77
--host=i386-redhat-linux
Thread model: posix
gcc version 3.4.0 (Red Hat Linux 3.4.0-1)


Regards,
Kristian Spangsege (ks@instadia.net)

Version-Release number of selected component (if applicable):
1.2.5-8 and 1.2.7-1

How reproducible:
Always

Steps to Reproduce:
1. Paste the two include statemens from the description into a file
called t.c
2. Run: gcc t.c


Actual Results:  Compilation fails with the following output:

In file included from /usr/include/png.h:349,
                 from t.c:2:
/usr/include/pngconf.h:263: error: syntax error before '.' token


Expected Results:  Successfull compilation. Then an error from the
linker because main cannot be found.

Additional info:
Comment 1 Matthias Clasen 2004-11-03 09:45:06 EST
This is a restriction explicitly coded in the png headers. You can't
include png.h after setjmp.h. If you want to change that, you will
have to convince the upstream authors.

Note You need to log in before you can comment on or make changes to this bug.