RE: Function call

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

 



The statement 

funckey;

does not have any effect and the compiler does not generate any extra
assembly code for it. You are just mentioning a valid symbol name in your
program without assigning it to any other variable, which the compiler deems
as 'not wrong'. You can compile your program with -Wall option to see a
warning message saying this.

Sreevathsa



> -----Original Message-----
> From: linux-c-programming-owner@xxxxxxxxxxxxxxx 
> [mailto:linux-c-programming-owner@xxxxxxxxxxxxxxx] 
> Sent: Wednesday, March 01, 2006 10:54 AM
> To: Linux C Programming List
> Subject: Function call 
> 
> 
> Hello,
> 
> I have a doubt regarding the following code. There is a void function
> funckey().
> 
> void funckey()
> {
> ;
> }
> 
> void main()
> {
> funckey;
> funckey();
> }
> 
> During execution, the second statement calls the function funckey().
> 
> What does the compiler do in the first statement funckey?
> 
> Thanks in advance, 
> Subbulakshmi Sadagopal 
> 
> -
> : send the line "unsubscribe 
> linux-c-programming" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
-
: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Assembler]     [Git]     [Kernel List]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [C Programming]     [Yosemite Campsites]     [Yosemite News]     [GCC Help]

  Powered by Linux