unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Óscar Fuentes" <ofv@wanadoo.es>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: External inline functions
Date: Sun, 06 Nov 2011 21:39:53 +0100	[thread overview]
Message-ID: <87fwi1asti.fsf@wanadoo.es> (raw)
In-Reply-To: <m2hb2hnkiy.fsf@igel.home> (Andreas Schwab's message of "Sun, 06 Nov 2011 20:00:37 +0100")

Andreas Schwab <schwab@linux-m68k.org> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>> Is this portable enough?  The Microsoft compiler errors out during
>> linking due to unresolved externals, but is this a problem specific to
>> that compiler?
>
> Apparently this is not a C compiler.  The inline specifier does not
> influence the linkage.

There are several issues here. First, `inline' was introduced in the
1999 standard. There is no mention to it in the 1990 standard. So, if
the Microsoft compiler defaults to the 1990 standard it must be
implementing `inline' in a vendor-dependent way.

Second, my reading of the 1999 standard says that `inline' *does* affect
linkage:

6.7.4 p6:

... If all of the file scope declarations for a function in a
translation unit include the inline function specifier without extern,
then the definition in that translation unit is an inline definition. An
inline definition does not provide an external definition for the
function, and does not forbid an external definition in another
translation unit. ...

but OTOH xdisp.c includes dispextern.h, which declares the
function. Decorating the declaration of window_box_right with `extern'
should work.



  reply	other threads:[~2011-11-06 20:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-06 18:36 External inline functions Eli Zaretskii
2011-11-06 19:00 ` Andreas Schwab
2011-11-06 20:39   ` Óscar Fuentes [this message]
2011-11-06 21:20     ` Paul Eggert
2011-11-07  3:51       ` Eli Zaretskii
2011-11-08  9:59         ` Chong Yidong
2011-11-08 20:07           ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fwi1asti.fsf@wanadoo.es \
    --to=ofv@wanadoo.es \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).