Author Topic: Strange warnings when compiling CVS...  (Read 13882 times)

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Strange warnings when compiling CVS...
« Reply #15 on: December 16, 2005, 01:28:45 pm »
No.

EDIT:

Slightly longer answer:
Technically, yes, but
- it is a lot more complicated
- you may have to create a temporary object (I am not sure if you can trick the compiler to do it on a pointer)
- you still must #undef offsetof, so you use preprocessor commands either way
- you need a different calling convention, meaning you have to rewrite the existing code
- you have additional constraints that offsetof has not (so it may not always work)
- it is still a hack

Thank you very much for the longer answer...I just was wondering why :D.

Yes, then I agree with you. In such a case, the use of a macro seems to be a good solution.

Best wishes,
Michael

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Strange warnings when compiling CVS...
« Reply #16 on: December 18, 2005, 02:42:23 am »
I never committed that hack to SVN.  :)
Yiannis wanted to test it for a while first, he'll eventually add it if it works.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Strange warnings when compiling CVS...
« Reply #17 on: December 18, 2005, 11:23:19 am »
I never committed that hack to SVN.  :)
Yiannis wanted to test it for a while first, he'll eventually add it if it works.

Seems to work fine, so it's back in HEAD.
Be patient!
This bug will be fixed soon...