Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion "static inline" in a header file is stupid, right?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mike Hommey  
View profile  
 More options Apr 4 2012, 2:22 pm
Newsgroups: mozilla.dev.platform
From: Mike Hommey <m...@glandium.org>
Date: Wed, 4 Apr 2012 20:22:36 +0200
Local: Wed, Apr 4 2012 2:22 pm
Subject: Re: "static inline" in a header file is stupid, right?
On Wed, Apr 04, 2012 at 09:54:01AM -0400, Rafael Ávila de Espíndola wrote:

> On 12-04-03 4:38 PM, Benoit Jacob wrote:
> >Hello,

> >Short version: "inline" alone is enough to take care of multiple
> >function definitions. Next time you're about to write "static inline"
> >in a header file, seriously consider doing "inline" instead.

> Depends on the language. I find it easier to just think about the
> llvm linkage :-). This testcase gives the mapping:

> // c99:   available_externally
> // gnu89: default
> // c++:   linkonce_odr
> inline void foo1(void) {
> }

> // c99:   default
> // gnu89: available_externally
> // c++:   linkonce_odr
> extern inline void foo2(void) {
> }

> // c99:   internal
> // gnu89: internal
> // c++:   internal
> static inline void foo3(void) {
> }

> void bar(void) {
>   foo1();
>   foo2();
>   foo3();
> }

> We are stuck with having gnu89 inline for C on linux until we
> upgrade glibc.

Because of headers?

Mike


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.