linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: Function call
@ 2006-03-01 10:47 Honnavalli_Sreevathsa
  2006-03-01 10:54 ` Shriramana Sharma
  0 siblings, 1 reply; 6+ messages in thread
From: Honnavalli_Sreevathsa @ 2006-03-01 10:47 UTC (permalink / raw)
  To: linux-c-programming

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@vger.kernel.org 
> [mailto:linux-c-programming-owner@vger.kernel.org] 
> 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 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe 
> linux-c-programming" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Function call
@ 2006-03-01  5:24 Subbulakshmi Sadagopal (RBIN/EDS2) *
  2006-03-01  7:39 ` wwp
  0 siblings, 1 reply; 6+ messages in thread
From: Subbulakshmi Sadagopal (RBIN/EDS2) * @ 2006-03-01  5:24 UTC (permalink / raw)
  To: Linux C Programming List


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 


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-03-01 16:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-01 10:47 Function call Honnavalli_Sreevathsa
2006-03-01 10:54 ` Shriramana Sharma
2006-03-01 11:02   ` wwp
2006-03-01 16:39     ` Glynn Clements
  -- strict thread matches above, loose matches on Subject: below --
2006-03-01  5:24 Subbulakshmi Sadagopal (RBIN/EDS2) *
2006-03-01  7:39 ` wwp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).