This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Calling functions through a C function pointer questoin


This isn't a GCC question specifically - it's more of a C language question. 

I'm involved in a discussion involving C language function pointers. 
The other party claims calling functions through a function pointer is "undefined behavior" because it's not specifically mentioned in the C language spec. 
This seems silly, because this is a common language feature used by bytecode interpreters, JITs, etc. 

Can someone clarify that calling functions through a function pointer is not "undefined behavior"? 

Please CC me on replies as I'm not subscribed to the list. Thanks in advance. 

Toshi 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]