-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Henrik Nordstrom wrote:
> On tis, 2008-08-12 at 22:52 -0400, Tres Seaver wrote:
>
>> Isn't 'extern inline' a contradiction? There should be *no* linkage of
>> any function being inlined.
>
> It depends on your viewpoint.
>
> inline is only a hint that the function is a candidate for being
> inlined. It may still be compiled as a separate function.
But such a function should be *static*, not *extern*: if it is a
reasonable candidate for inlining, then the cost of linking likely
dominates the space saved by declariing it 'intern'.
> In GCC "extern inline" then meant that the function should have extern
> linkage if not inlined, or to be exact a call to an external function if
> outside of this compile unit if not inlined.
>
> Quite useful to avoid repeated duplication of the same function in each
> comple unit
Inlining involves repeated duplication of the same function (body) at
each call site, no? If inlining is a good idea (trading space at the
call site to avoid the overhead of a call setup), then declaring the
function extern seems silly.
, but unfortunately not part of the standard language
> definition and gcc 4.3 now changed to follow the standard.. (extern
> ignored).
>
> The change in GCC semantics has been documented in the GCC documentation
> for quite some time (some years), but as always documentation is never
> read until there is a problem so it was not discovered there was a
> change until trying to compile Squid with gcc-4.3.
OK.
Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver_at_palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIolzy+gerLs4ltQ4RApl7AKDNV75b5OrsxUxtVr0ysrgkz5Q67gCgziLm
1lj/fKbY49iG+gDH96iXobM=
=82nu
-----END PGP SIGNATURE-----
Received on Wed Aug 13 2008 - 04:03:11 MDT
This archive was generated by hypermail 2.2.0 : Wed Aug 13 2008 - 12:00:05 MDT