DSPRelated.com
Forums

How To Get 64-bit Integers on the TI C6000?

Started by Randy Yates September 15, 2005
On Thu, 15 Sep 2005 20:14:43 GMT, Richard Dobson
<richarddobson@blueyonder.co.uk> wrote in comp.dsp:

> Tom wrote: > > > the "long long" type was added to ansi C standard more than 2 years ago. If > > the compiler claims that it support ansi C it should support "long long". It > > is standard. > > > > When programmers refer to "ANSI C" they mean (or should be understood to mean) > ANSI C87, as described in K&R 2nd Ed. Stuff like long long, complex, and bool > was introduced for the new C99 version of C, which strictly speaking is not ANSI > C but ISO/IEC 9899:1999. So I think it is, legally and techically speaking, > incorrect to call C99 "ANSI C". Even ANSI C++ does not support "long long", > which must still be regarded as a non-standard extension. gcc is probably the > only widely available compiler supporting C99. But gcc is famous/notorious for > adding all sorts of stuff to C, that has little or nothing to do with ANSI anything. > > For more info, try: > > http://www.open-std.org/jtc1/sc22/wg14/ > > > Richard Dobson
The term "ANSI C" was based on the fact that the original C standard was ratified by ANSI in 1989. It was modified by ISO by adding some required additional information that did not at all change the meaning of the standard, and approved as an ISO standard in 1990. When ANSI, as a member of ISO, approved the ISO 1990 version, they also approved it as an ANSI standard, replacing the 1989 ANSI only version. ANSI is still one of the member national bodies of ISO, and all ISO and ISO/IEC versions of the C standard have also been ANSI standards as well. For almost 15 years, since the 1990 ISO standard, the ISO and ANSI standards for C have been exactly the same, with the exception of one 7 month period. When ISO approved the last major revision in October 1999, one ANSI member raised an objection that required a separate ANSI vote, so 9899:1999 did not become an ANSI standard until May 2000. And compiler that conforms to 9899:1999 plus TC1 also conforms to the current ANSI C standard. Of course C99, which added the long long type, was indeed more than two years ago, as Tom stated. In fact in another month it will be six years. -- Jack Klein Home: http://JK-Technology.Com FAQs for comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html comp.lang.c++ http://www.parashift.com/c++-faq-lite/ alt.comp.lang.learn.c-c++ http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html
Yes Randy,
  The range matches, I have used in one application and matched results
with Windows 64bit _int64 results.
   I can only say TI components has bugs even CCS

http://focus.ti.com/general/docs/buglist/bugsearch.tsp?templateId=5121&navigationId=11278

   Keep checking this, you may get answer to lot of question and
problems ..

-SM

Jack Klein wrote:

...
> The term "ANSI C" was based on the fact that the original C standard > was ratified by ANSI in 1989. It was modified by ISO by adding some > required additional information that did not at all change the meaning > of the standard, and approved as an ISO standard in 1990. When ANSI, > as a member of ISO, approved the ISO 1990 version, they also approved > it as an ANSI standard, replacing the 1989 ANSI only version. > > ANSI is still one of the member national bodies of ISO, and all ISO > and ISO/IEC versions of the C standard have also been ANSI standards > as well. > > For almost 15 years, since the 1990 ISO standard, the ISO and ANSI > standards for C have been exactly the same, with the exception of one > 7 month period. When ISO approved the last major revision in October > 1999, one ANSI member raised an objection that required a separate > ANSI vote, so 9899:1999 did not become an ANSI standard until May > 2000. > > And compiler that conforms to 9899:1999 plus TC1 also conforms to the > current ANSI C standard. > > Of course C99, which added the long long type, was indeed more than > two years ago, as Tom stated. In fact in another month it will be six > years. >
Thanks for the clarification. This does lead to a most unfortunate ambiguity in any plain reference to "ANSI C". The assumption must remain that this title is generally understood to mean the 1989 spec; to refer to the 1999/2000 stndard one still needs to identify it as C99. Even gcc on OS X defaults to C89. There is no visible sign of Microsoft having any interest in C99. And no more than does C89, C99 does not mandate any specific size for any for the basic types; all we can rely on is that long long is at least as big as a long, which in turn will be at least as big as an int, and so on. Richard Dobson
Thank you, soumit! A hundred thank-yous to you!

--Randy