Hacker News new | past | comments | ask | show | jobs | submit login

This subverts the notion of what "static" means here. "Static" means "private to this translation unit".

Usage of the linker in modern C has been moving in the opposite direction, IMO, towards keeping the interface between the compiler and linker simple. For example, it looks like the trend is towards eliminating the use of "common" variables--GCC now defaults to -fno-common.

You can still get all sorts of fancy stuff with LTO turned on. But if you want no duplicates, you can express that intent by choosing a specific translation unit to contain the duplicates.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: