On Sat, Apr 12, 2014 at 8:43 PM, Wayne Uroda <w.ur...@gmail.com> wrote:
> Hi,
>
> I make extensive use of inline functions in my code, as below:
>
>     extern inline void setClockLine(Bool value)
>     { ... }
>
> Sometimes I put these definitions in .c files, sometimes in .h files (I'm
> not sure if that makes a difference, apart from scope).

It does.  See (for example): http://m68hc11.serveftp.org/inline-1.php

This explains your linker error, assuming you don't have a
non-extern/non-inline definition in a .c file.

I generally use "static inline" definitions placed in headers.  Since
-Os can affect whether a function is actually inlined, there's also
attribute __always_inline__ that can be added to encourage the
compiler more strongly (might even be an error if it can't be
inlined).

I haven't tried -Og to see if it does anything.

Peter

------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to