This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] ../../../src/libgfortran/io/write.c:713: error: conflicting types for 'itoa'


Danny Smith wrote:
On Mon, Apr 13, 2009 at 8:36 PM, Janne Blomqvist
<blomqvist.janne@gmail.com> wrote:
Renaming itoa back to gfc_itoa and adjusting callers fixes.
Ok. Please also add a note about this to the comment in write.c;
Usually we use gfc_* names only for non-static symbols.

Is this comment OK?

Index: io/write.c
===================================================================
--- io/write.c	(revision 145949)
+++ io/write.c	(working copy)
@@ -707,10 +707,13 @@
 }


-/* itoa()-- Integer to decimal conversion. */ +/* gfc_itoa()-- Integer to decimal conversion. + Even though this is a static function we need to take care not to + conflict with a prior non-static declaration (which is undefined + behaviour per ISO C99 6.2.2 p7). Hence the 'gfc_' prefix. */

Well, actually I was thinking of a note saying that "itoa" conflicts with something in mingw, hence the per-libgfortran-convention unusual name. But whatever, no big deal either way.


--
Janne Blomqvist


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]