Re: #include optimization

From: CBFalconer (cbfalconer_at_yahoo.com)
Date: 09/30/04


Date: Thu, 30 Sep 2004 10:41:29 GMT

Peter van Merkerk wrote:
> CBFalconer wrote:
>>
>... snip ...
>>
>> Actually it is a job that can be attacked and checked piecemeal.
>> Remove the (presumably) useless includes in one file by commenting
>> out (thus retaining line numbers) and compile it to an object
>> file. Do a binary compare against the original object file. If
>> identical, all is well.
>
> Even if binary compare shows that there are differences all may be well
> too. I learned this the hard way; compiling the same code twice with a
> certain compiler yielded different binaries. Apparently the compiler
> wrote the build date or something like that into the binary. When debug
> information is stored in object files this test may also fail for the
> wrong reasons.

Why did you snip the last sentence or two from my paragraph, which
mentioned precisely this problem?

-- 
A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?


Relevant Pages

  • Re: #include optimization
    ... Do a binary compare against the original object file. ... > certain compiler yielded different binaries. ... Why did you snip the last sentence or two from my paragraph, ...
    (comp.lang.cpp)
  • Re: #include optimization
    ... The source files have an ... Do a binary compare against the original object file. ... certain compiler yielded different binaries. ...
    (comp.lang.cpp)
  • Re: #include optimization
    ... The source files have an ... Do a binary compare against the original object file. ... certain compiler yielded different binaries. ...
    (comp.lang.c)
  • Re: combining two object files
    ... compiler to create another object file say test.obj. ... production-quality products. ...
    (comp.lang.fortran)
  • Re: Linking with static library
    ... implemented in the lib file, the implementations from the lib will not get copied into the new file. ... The compiler will expect the linker to find those implementations somewhere else. ... only one object file at a time, ...
    (alt.comp.lang.borland-delphi)