Focus on Sun
Sun Studio 11: C++ 5.8 Compiler Apr 16 2007 01:22AM
neelabhsharma1 gmail com (2 replies)
Re: Sun Studio 11: C++ 5.8 Compiler Apr 16 2007 06:05PM
Steven Leikeim (sleikeim ucalgary ca)
Re: Sun Studio 11: C++ 5.8 Compiler Apr 16 2007 05:22PM
Michael T Pins (mtpins nndev org)
neelabhsharma1 (at) gmail (dot) com [email concealed] writes:

>As per the specifications the compiler should be based on C99. But i think it still does not handle the function call strtoll(). This issue did not arise with RHL 9.0

>If it did the handling properly then the result of the program should not be 0.

By "result of the program" I assume you mean the output of the printf
command. As your code is broken (and lint will show you where), the output
is undefined. Fix your code and the output becomes what you expect.

>/*Snippet of the Code */
>#include<stdio.h>
>#include<stdlib.h>

>int main()
>{
>char *a = "89abcdef";
>long long int c;
>a[8] = '\0';
>c = strtoll(a, NULL, 16);
>printf("the num is %8x", c);
>return 0;
>}

--
Michael T Pins | "A year from now I'd be surprised if
mtpins (at) nndev (dot) org [email concealed] | there's not some grand square in Baghdad
keeper of the nn sources | that is named after President Bush."
ftp://ftp.nndev.org/pub | -Richard Perle, 9/22/03

[ reply ]


 

Privacy Statement
Copyright 2010, SecurityFocus