I've just updated my toolchain to use GCC 6.1.0 and I notice that
constant C strings seem to be being placed automatically in PROGMEM,
rather than requiring the use of the PSTR macro as in the past. This
caused me some confusion because call such as printf("foo") started
printing garbage. Here's the proof:

        printf("          ");
     91e:       84 e7           ldi     r24, 0x74       ; 116
     920:       90 e0           ldi     r25, 0x00       ; 0
     922:       9f 93           push    r25
     924:       8f 93           push    r24
     926:       0e 94 04 17     call    0x2e08  ; 0x2e08 <printf>

      74:       20 20           and     r2, r0
      76:       20 20           and     r2, r0
      78:       20 20           and     r2, r0
      7a:       20 20           and     r2, r0
      7c:       20 20           and     r2, r0
      7e:       00 21           and     r16, r0

I haven't been able to find any mention of this change anywhere. Is
this a deliberate change in gcc behaviour, or a bug?

Thanks,

-- 
Alan Burlison
--

_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to