This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [g++] -O produces incorrect code


Am Sonntag 07 Oktober 2007 schrieb Martin Schröder:
> 2007/10/7, Christoph Bartoschek <bartoschek@gmx.de>:
> > Generally one cannot help without the code. Where to get it?
>
> svn checkout svn://scm.foundry.supelec.fr/svn/pdftex/trunk/source
>
> build.sh will generate pdftex and pdftex.pool
> Testing them requires a working TeX installation.
> The file in question is src/texk/web2c/pdftexdir/pdftoepdf.cc

Ok. Your problem is your build system.

1. It does not catch all dependencies. For example changing PDFDoc.h does not 
result in a recompilation of pdftoepdf.cc.

2. The header PDFDoc.h is processed with different defines. When you compile 
PDFDoc.cc the macro DISABLE_OUTLINE is defined and the struct PDFDoc gets 
not the member Outline * outline just in front of ok. But when you compile 
pdftoepdf.cc the macro is not defined and the member is there. Because of 
inlining the compilation unit pdftoepdf.cc thinks that the variable GBool ok 
is 4 bytes after what compilation unit PDFDoc.cc thinks. This results in the 
problems you have.

I would suggest that you fix your build system as soon as possible. 

Greetings
Christoph Bartoschek


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]