Re: Doubt on inline fn.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, May 11, 2003 at 10:08:57PM +0530, Suseelan B Sarin wrote:
> Hi,
> 	Can I do "if ( InLnFn() )" where InLnFn is defined as a inline
> function. GCC did not produce any error. But is there a catch somewhere?.  
> I doubt this, because "if ( { return 1 } )" causes gcc to produce an
> error.  (Or, is my understanding of inline fns itself is wrong? Is it the
> complied object code for inline fn that will be inserted where it is
> called? )

Function declared inline is both syntactically and semantically
equvialent to a normal function. It just tells the compiler to put the
(compiled) code right into the caller instead of calling it if possible.

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux