[Info-vax] C compiler question
    Mark Berryman 
    mark at theberrymans.com
       
    Sat Jul 27 12:57:29 EDT 2019
    
    
  
Something I see all the time when porting unix code is something similar 
to the following:
unsigned int x;
.
.
.
if (x <= 0) {something}
This, of course, generates a QUESTCOMPARE informational.  I'm wondering 
what code the compiler generates in such a case.  Does it treat the 
variable as if it had been declared signed or does it do something else? 
  Is the compiler's behavior in this case defined by a standard or is it 
left up to the implementation?
Part of what I am wondering is if I can count on the code generated by a 
VMS compiler to function the same as the code generated by a gcc or 
clang compiler.
Thanks,
Mark Berryman
    
    
More information about the Info-vax
mailing list