Opened 3 years ago
Closed 3 years ago
#17253 closed bug (fixed)
B_CURRENT_IMAGE_SYMBOL can't work with gcc2
Reported by: | mt | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta4 |
Component: | - General | Version: | R1/beta3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | x86 |
Description
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 }
Change History (4)
comment:1 by , 3 years ago
comment:2 by , 3 years ago
Platform: | All → x86 |
---|
comment:4 by , 3 years ago
Milestone: | Unscheduled → R1/beta4 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fixed in hrev55423.
Note:
See TracTickets
for help on using tickets.
this uses __func__ since this commit: https://github.com/haiku/haiku/commit/d545ad17ce0f7368391fd8798ba58a9e2ad8e55b
@waddlesplash