[R] "cannot allocate vector of size ..." in RHLE5 PAE kernel
    Hugo Mildenberger 
    Hugo.Mildenberger at web.de
       
    Wed Jan 19 12:03:42 CET 2011
    
    
  
> I got the following warning:
>   memorytest.c: In function ‘main’:
>   memorytest.c:5: warning: return type of ‘main’ is not ‘int’
> Is this important ?
Hello Mauricio, 
No, your gcc version is unduly puristic here. The traditional return 
type of the main function in "C" should be "int", and if that is given,
main has to return an integer number explicitly. By convention, 
a main function returning 0 indicates success, and anything other 
is considered as an error or warning condition. Specifying "void main()" 
normally implies returning zero. But if you are still worried simply 
change "void main" into "int main()" and add the statement " return 0; "  
just before the last curly bracket (without quotation marks, of course):
  int main() {       
       [...]  
       return 0; 
}
Best 
Hugo  
    
    
More information about the R-help
mailing list