Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is there, though? AIUI there's no symbol created and no pointer when you declare a "static const int" at file scope. It's simple substitution, like a #define. So the question is why wouldn't a function label be the same.


That's only an common optimization, not a guarantee, and it breaks down when you let that object or a pointer to that object leave the translation unit like you're suggesting.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: