hi michiel,

thanks for the specifics.

-steve

On 04/19/2010 09:09 AM, Michiel Konstapel wrote:
I was using strtoul on a '2418 and it would continually reset. I dug up
the source and compared it to that of atoi, which did work. The former
used register variables:

unsigned long
strtoul(nptr, endptr, base)
const char *nptr;
char **endptr;
register int base;
{
     register const char *s = nptr;
     register unsigned long acc;
     register unsigned char c;
     ....

I made a copy, removed the "register" modifiers and well, that seemed to
work. This was with an older build of the MSP430X compiler. I figured
I'd quickly recheck, and now it seems it doesn't reboot, but instead
reports the wrong values. I'm afraid I don't have time to look into that
at the moment, though.

Regards,
Michiel

-----Original Message-----
From: steve ayer [mailto:[email protected]]
Sent: maandag 19 april 2010 14:51
To: GCC for MSP430 - http://mspgcc.sf.net
Cc: Michiel Konstapel
Subject: Re: [Mspgcc-users] sscanf for msp430-gcc

hi michiel,

your mention of broken register variables caught my eye.

can you, or peter, please clarify?

thanks,

steve

On 04/19/2010 08:09 AM, Michiel Konstapel wrote:
-----Original Message-----
From: Peter Bigot [mailto:[email protected]]
Sent: maandag 19 april 2010 14:02
To: GCC for MSP430 - http://mspgcc.sf.net
Subject: Re: [Mspgcc-users] sscanf for msp430-gcc

Closest useful functionality may be strtoul(3), which is present (I
haven't personally tested it).

I have, and it works.
However, I did encounter breakage with one of the newer compiler
builds,
apparently because it uses register variables. As a workaround, I
made a
copy with "normal" variable declarations, which works fine.
Michiel


---------------------------------------------------------------------
---------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to