| Deutsch English Français Italiano |
|
<vi0n3l$2fssm$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Thiago Adams <thiago.adams@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: what inline means?
Date: Sun, 24 Nov 2024 23:23:49 -0300
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <vi0n3l$2fssm$1@dont-email.me>
References: <vhqjtj$19sgb$1@dont-email.me>
<1735a8e1345609d26ce66b5202dddb345122c6ad@i2pn2.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 25 Nov 2024 03:23:49 +0100 (CET)
Injection-Info: dont-email.me; posting-host="8877340e4321ee55128e3594bf71aa88";
logging-data="2618262"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/tw2PXFVKVUioaXt0c9k6wkAVsnjrpyag="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:cWwcpKsDITxKKJtFfNLLdWlNgEU=
Content-Language: en-GB
In-Reply-To: <1735a8e1345609d26ce66b5202dddb345122c6ad@i2pn2.org>
Bytes: 2028
Em 11/24/2024 3:39 PM, fir escreveu:
> Thiago Adams pisze:
>>
>>
>> My current thoughts.
>> - if the function is not defined (no implementation) then inline
>> will define the function.
>>
>> inline int f(){ return 1; }
>> inline int f(){ return 1; } //error already defined
>>
>> - if the function is already defined somewhere then it is just a
>> "view" of the code. (This view can be used to "inline code")
>>
>>
>> extern int f();
>> inline int f(){ return 1; } //ok
>>
>>
>> - if a inline function is declared and not define at current file
>> then it is a warning
>> inline int f();//warning
>>
>>
>>
> im not sure if teh question is reasonable, (not reading into it)
> inline is hint so maybe the word inline means the same as no inline?
>
> and probably the inline being treaten as a hint is in fact good
> (depending on the system)
My question is more about the compiler perceptive. What is does?