RFD: inline hooks

Joseph S. Myers joseph@codesourcery.com
Thu Dec 2 02:35:00 GMT 2010


I think we want to move *away* from inline functions in headers and 
towards link-time inlining, in the interests of modularity: if one 
component of GCC cannot see the internals of another component at compile 
time, it cannot use them but must use the actual interface of that 
component, but inline functions often require internals to be visible.  
tm.h is a case in point of exposing internals, as it exports a great many 
macros that are really part of the internals of a particular back end and 
so should only be visible in that back end (including the generated 
insn-*.c files) and not in the RTL passes, so tempting people to put e.g. 
TARGET_64BIT conditionals outside of config/ (TARGET_64BIT should be 
private to the individual back ends).

See <http://gcc.gnu.org/ml/gcc-patches/2010-06/msg02244.html> for example 
on the direction of moving away from inline functions in headers.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc mailing list