AVR-GCC Bug about atol()


I find a bug in avr-gcc library. When the following code is compiled, the avr-objcopy.exe has problem and exit. The compilation information has the following information:

Converting to AVR Extended COFF: main.cof avr-objcopy --debugging --change-section-address .data-0x800000

--change-section-address .bss-0x800000 --change-section-address .noinit-0x800000 --change-section-address .eeprom-0x810000 -O coff-ext-avr main.elf main.cof make.exe: *** [extcoff] Error -1073741819

And there is no problem when I changed atol() to atoi().


: : a[len]=0; getProductInfo(atol(a)); //getProductInfo(atoi(a)); : :

Reply to
Loading thread data ...

... snip ...

That is not exactly a compilable program, and you don't show getProductInfo. However, atol returns a long, while atoi returns an int. One of these must be the wrong type to supply to GetProductInfo. Turn up the compiler warning level.

"If you want to post a followup via groups.google.com, don't use
 the broken "Reply" link at the bottom of the article.  Click on 
 Click to see the full signature
Reply to

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.