test build of 4.9 started

Feng, Kate feng at bnl.gov
Tue Mar 10 04:43:45 UTC 2009


 
At http://en.wikipedia.org/wiki/C_(programming_language)
The "Hello, world example shows:
int main(void)
The footnotes 10 states  :
"The main function actually has two arguments, int argc and char *argv[], respectively, which can be used to handle command line arguments <http://en.wikipedia.org/wiki/Command_line_arguments> . The C standard requires that both forms of main be supported, which is special treatment not afforded any other function."

Thus, the information I have did not mention that main function has three arguements.
However, it's true that main() can afford sepcial treament as long as it is defined consistently
throughout the code.  I am not aware that it broke any code.  It was just my concern about
being consistent.  I agree it's better to follow the C99 standard.  It seems that C99 follows 
C standard  for  the main() function.
 
Cheers,
Kate
________________________________

From: Joel Sherrill [mailto:joel.sherrill at oarcorp.com]
Sent: Mon 3/9/2009 3:02 PM
To: Kate Feng
Cc: RTEMS Users
Subject: Re: test build of 4.9 started



Kate Feng wrote:
> Please never mind.   I just realized that RTEMS main() is
> indeed defined as
> int main(int   argc,  char **argv, char **environp)
>
> instead of the usual
>
> int main( int, char **);
>  
It would be better to match C99 though if we can
get a definitive answer.

--joel
> Kate
>
> Kate Feng wrote:
>  
>> Joel Sherrill wrote:
>>  
>>    
>>> Hi,
>>>
>>> I just started a test build of the 4.9 branch.
>>> If all goes well, I will cut 4.9.2 once it is
>>> finished.
>>>
>>> pr1385 will be closed.  I am building with
>>> the latest patch.
>>>
>>> If you have an outstanding issue, yell now.
>>>
>>>  
>>>    
>>>      
>> In cpukit/libmisc/dummy/dummy.c, should
>> "int main( int, char **, char **); "
>>
>> be corrected as
>>
>> "int main( int, char **);"
>>
>> ?
>>
>> Is there a conflict ?
>>
>> Kate
>>
>> _______________________________________________
>> rtems-users mailing list
>> rtems-users at rtems.com
>> http://rtems.rtems.org/mailman/listinfo/rtems-users
>>  
>>    
>
>  


--
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985







More information about the users mailing list