ltoa, itoa, ultoa in gcc

lrtaylor@micron.com lrtaylor@micron.com
Fri Sep 12 18:08:00 GMT 2003


Hmm...  I've already deleted your first message where you posted the error, so I can't refer back to it.  However, it seems to me that you were getting a compile-time warning about a function not being declared.  Is that right?  If that's the case, and you're programming in C, and you're sure that the functions are defined in the C library, you _may_ be able to compile you program anyway.  C doesn't require that you declare all of your functions before using them, so long at the default function signature (int func()) doesn't cause the compiler to see errors where there really aren't any.

On the other hand, if you're sure the function is defined in the library, are you sure that it is declared in the correct headers?  If so, are you sure your picking up the right set of system headers, and not another set (e.g., the Windows C library headers)?  You can see where GCC is getting the headers by adding "-v" to the command line.

Thanks,
Lyle Taylor
IS Applications

-----Original Message-----
From: Aaron Case [mailto:aaron.case@dynazign.com]
Sent: Friday, September 12, 2003 12:01 PM
To: lrtaylor
Cc: gcc-help@gcc.gnu.org
Subject: RE: ltoa, itoa, ultoa in gcc

Lyle,

I am building an eCos application wtih Cygwin.

It porting code from MS embedded C 5.1 to arm-elf-gcc using eCos.  I added
everything but the kitchen sink to the C library for eCos but these
functions are not present. I was under the impression that this library was
a reflection of glibc 2.2.3(or whatever was most current when the arm-elf
version was released).

I do see your point, but I have checked and double checked that the
stdlib(where these functions should be??) are added to the library. So I
suppose this is a question for the glibc help list or any other direction
will be appreciated.

Thanks
Aaron

-----Original Message-----
From: lrtaylor@micron.com [mailto:lrtaylor@micron.com]
Sent: Friday, September 12, 2003 1:34 PM
To: aaron.case@dynazign.com; gcc-help@gcc.gnu.org
Subject: RE: ltoa, itoa, ultoa in gcc


This isn't necessarily going to answer your question, but whether or not
they are supported has nothing to do with GCC.  These are functions that
would be in the C library, which is a system library rather than a compiler
library.  So, whether or not they are supported will depend on whether or
not your C library supports them.  And whether or not there are good
alternatives will also depend on your C library.  What platform are you
trying to build on?

Thanks,
Lyle Taylor

-----Original Message-----
From: Aaron Case [mailto:aaron.case@dynazign.com]
Sent: Friday, September 12, 2003 11:30 AM
To: gcc-help@gcc.gnu.org
Subject: ltoa, itoa, ultoa in gcc

Hello,

I am porting code from Microsoft C v5.1 that is not exactly ANSI standard.
I thought that ltoa, itoa, and ultoa were standard but I see now that they
are NOT ANSI standard.

Do have to write these functions myself or is there something supported by
GCC that will suffice??

Thanks in Advance

Aaron Case



More information about the Gcc-help mailing list