Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Strange warnings when compiling CVS...

<< < (4/4)

Michael:

--- Quote from: thomas on December 15, 2005, 01:12:23 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

--- End quote ---

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

thomas:
I never committed that hack to SVN.  :)
Yiannis wanted to test it for a while first, he'll eventually add it if it works.

mandrav:

--- Quote from: thomas 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.

--- End quote ---

Seems to work fine, so it's back in HEAD.

Navigation

[0] Message Index

[*] Previous page

Go to full version