Skip to content

Conversation

@jlbirccyn
Copy link

See issue #4002

@sandeepmistry
Copy link
Contributor

@jlbirccyn thank you for submitting this!

I just tried it with gcc-arm-none-eabi-5_3-2016q1, but get the following build error:

/Users/smistry/Documents/Arduino/hardware/arduino/sam/cores/arduino/itoa.c:124:14: error: conflicting types for 'utoa'
 extern char* utoa( unsigned long value, char *string, int radix )
              ^
In file included from /Users/smistry/Documents/Arduino/hardware/arduino/sam/cores/arduino/itoa.c:19:0:
/Users/smistry/Documents/Arduino/hardware/arduino/sam/cores/arduino/itoa.h:38:14: note: previous declaration of 'utoa' was here
 extern char* utoa( unsigned value, char *string, int radix ) ;
              ^
exit status 1
Error compiling for board Arduino Due (Programming Port).

Is there any reason why the equivalent change from itoa.h is not in itoa.c?

@sandeepmistry sandeepmistry added the Waiting for feedback More information must be provided before we can proceed label Apr 7, 2016
sandeepmistry added a commit to sandeepmistry/ArduinoCore-samd that referenced this pull request Apr 7, 2016
@joshingyou
Copy link

Agree with @sandeepmistry just tried your change and got the same error about conflicting declaration of utoa

@cmaglie
Copy link
Member

cmaglie commented Jul 1, 2016

The latest newlib provides itoa too, also this function should be put under guards. Weird that the compiler doesn't throw errors on itoa, maybe because in this case the stub has the exact same signature as the lib function.

arm-none-eabi/include$ grep [iu]toa -r *
stdlib.h:char * _EXFUN(__itoa,(int, char *, int));
stdlib.h:char * _EXFUN(__utoa,(unsigned, char *, int));
stdlib.h:char * _EXFUN(itoa,(int, char *, int));
stdlib.h:char * _EXFUN(utoa,(unsigned, char *, int));

@cmaglie
Copy link
Member

cmaglie commented Oct 17, 2016

Fixed with #5480.
The implementation of itoa and utoa inside the Arduino core will be removed when the bundled arm-gcc will be upgraded.

@cmaglie cmaglie closed this Oct 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Waiting for feedback More information must be provided before we can proceed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants