Re: Ported to 2005 - Strange variable alignment causing issues



Doug and Carl - thanks for the additional suggestions. I finally managed to
track it down.

While I'm not using precompiled headers, Carl's suggestion that I had to be
defining the object differently in different places made sense. I couldn't
find any duplicate includes or anything like that, so I extended Doug's
suggestion of multiple #pragma pack(show)'s, and I finally found one that
was messing things up.

A library I bought years ago was issuing #pragma pack(push, 1), followed
later by #pragma pack(pop, 1). Only one of the two files that accessed this
class was including that header, and I suspect that the author did not
realize that this left the pack value at 1, rather than pushing and popping
the original version. I've NO idea why this didn't blow up on VC6. :)

Exactly why it would compile the source file that did NOT include that
header differently at different times I'm not sure - perhaps an optimization
that the compiler remembers the class layout from the first time it saw the
object included? (Temporary precompiled headers?)

Thank you everyone for your helpful suggestions. I spent a lot of time
tracking this down and I feel much better to find it's in MY code and not
the compiler! :)


.



Relevant Pages

  • Re: Showing unique values of a list
    ... suggestion, but it is way to computer intensive if you have a large ... files twice. ... he suggested that one should set up a data view webpart which shows the ... category headers and one showing the category headers with the details ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: Name a list in Excel 2003?
    ... If you have any range selected, then the top left cell is used as a suggestion ... Roger Govier wrote: ... data|list and said my list had headers. ... Dave Peterson ...
    (microsoft.public.excel.misc)
  • Re: AIOE posting still available?
    ... >>> executable so that it still produces good headers, ... > Your suggestion that I make adjustments in my own reader for the ... > good of all has broken the irony meter. ... I tried to re-tweak the Xnews ...
    (news.software.readers)
  • Re: Wish No 1545
    ... for headers, there is even a suggestion for a small row of neat, ... In that beautiful original post ... If you really feel strongly about these issues, the best thing you can do is file a bug report with Apple so that they will track it in their development of future operating system releases. ...
    (comp.sys.mac.apps)
  • Re: novice: small annoyance
    ... |> programmer to include dozens of them for even a simple program" ... |> Your suggestion is of course an ideal one, ... |> implemented into the language proper without too much headache. ... | But imo headers don't belong as part of the language proper. ...
    (alt.comp.lang.learn.c-cpp)