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

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

Re: [avr-gcc-list] [discussion] lpm support in avr-gcc


From: Harald Kipp
Subject: Re: [avr-gcc-list] [discussion] lpm support in avr-gcc
Date: Fri, 23 Aug 2002 21:21:34 +0200

Hi Svein,

If that also applies to function arguments, it will
break the compiler optimization.

foo(const char *bar);

indicates, that foo won't change the contents of bar.

Would we have to rewrite stdlib.h then,
Like 'atoi(const char *)' to 'atoi(char *)'?

And what about string literals? Are they progmem by
default? If yes, can I write:

  const char eol[] = "\r\n";
  char *line;

  readln(line);
  prints("Hello ");
  prints(line);
  prints(eol);

With GCC I can use

  const char eol[] = PSTR("\r\n");
  char *line;

  readln(line);
  prints("Hello ");
  prints(line);
  prints_P(eol);

Harald

avr-gcc-list at http://avr1.org



reply via email to

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