|
-
February 24th, 2006, 06:27 AM
#1
Does this conform to the ISO standard?
Hi. I was helping a friend yesterday who needed to set up a compiler on her home computer in order to do some labwork for a course in OS programming.
I looked through part of the code for the lab skeleton because it refused to compile, and I found many strange things. One thing, however, made me hesitate as to whether this lab skeleton even conforms to the standard at all, namely the following:
Code:
main(argc, argv)
int argc;
char *argv[];
{
<stuff>
}
Note the lack of return type for main, the lack of type for the parameters and the odd decision to specify the headers between the parameter list and the function definition. Is this even allowed in C or does it cause undefined behaviour?
Errare humanum est, ergo non sum humanus.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|