avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] PSTR macro bug in C++


From: Iztok Zupet
Subject: [avr-gcc-list] PSTR macro bug in C++
Date: Fri, 10 Sep 2004 18:23:49 +0200

Hello

 Just today I discovered a bug. Using the printf_P function and PSTR
macro causes:

*App.cpp: In member function `void App::dmxScreen()': 
*App.cpp:47: internal compiler error: in simplify_gen_subreg, at
simplify-rtx.c:3444 
*Please submit a full bug report, 

I use avr-gcc V 3.4.1 and avr-libc V 1.0.4.

However, defining PSTR(s) macro as
#define PSTR(s) ({static char __c[] PROGMEM = (s); &__c[0];})
instead of
#define ({static char __c[] PROGMEM = (s); __c;})
solves this problem.

Regards
Iztok



reply via email to

[Prev in Thread] Current Thread [Next in Thread]