#17253: B_CURRENT_IMAGE_SYMBOL can't work with gcc2
-----------------------+--------------------------
Reporter: mt | Owner: nobody
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: - General | Version: R1/beta3
Keywords: | Blocked By:
Blocking: | Platform: All
-----------------------+--------------------------
Using B_CURRENT_IMAGE_SYMBOL with gcc2 results in 'undefined reference'
error.\\
gcc2 works when "&" is removed from B_CURRENT_IMAGE_SYMBOL macro.
example:
{{{
#include <kernel/image.h>
#include <stdio.h>
main()
{
#if 1
// gcc2 does not work with B_CURRENT_IMAGE_SYMBOL.
// defined as ((void*)&__func__)
printf("%p\n", B_CURRENT_IMAGE_SYMBOL);
#else
// gcc2 works when "&" is removed from B_CURRENT_IMAGE_SYMBOL.
printf("%p\n", ((void*)__func__));
#endif
}
}}}
--
Ticket URL: <https://dev.haiku-os.org/ticket/17253>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.