| Deutsch English Français Italiano |
|
<vhqjtj$19sgb$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: what inline means?
Date: Fri, 22 Nov 2024 15:52:36 -0300
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <vhqjtj$19sgb$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 22 Nov 2024 19:52:36 +0100 (CET)
Injection-Info: dont-email.me; posting-host="32d08c80ca84642a4da2a1503034ac41";
logging-data="1372683"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Fh9acYbkl4uYrSs4zyotGnUOT6Li4RKw="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:hE/Tc/s415rpKNi5fGZk2mW8NXQ=
Content-Language: en-GB
Bytes: 1410
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