Jeff Epler wrote:
On Mon, May 09, 2005 at 08:21:12AM -0700, Larry Barello wrote:
I didn't understand everything that was said, but it seemed clear to me that
having the construct
char *foo;
if (foo && (*foo !=0))
randomly break seemed pretty harsh.
As I recall, your original code was more like
1
Larry Barello wrote:
So, this is all facinating reading, but what, if anything, is a NULL pointer
in the AVR context? Address 0 is certainly valid. Or is it simply
convention that 0 is "null".
To the best of my knowledge, a NULL pointer in the AVR context is 0. And
yes, that is simply a conventi
Larry Barello wrote:
So, this is all facinating reading, but what, if anything, is a NULL pointer
in the AVR context? Address 0 is certainly valid. Or is it simply
convention that 0 is "null".
If a pointer is NULL, the actual behind-the-scenes address it represents may
be anything, and is just so
On Mon, May 09, 2005 at 08:21:12AM -0700, Larry Barello wrote:
> I didn't understand everything that was said, but it seemed clear to me that
> having the construct
>
> char *foo;
>
> if (foo && (*foo !=0))
>
> randomly break seemed pretty harsh.
As I recall, your original code was more like
1
So, this is all facinating reading, but what, if anything, is a NULL pointer
in the AVR context? Address 0 is certainly valid. Or is it simply
convention that 0 is "null".
I didn't understand everything that was said, but it seemed clear to me that
having the construct
char *foo;
if (foo && (*
Russell Shaw wrote:
Only in cases where the context may not indicate where a pointer value is
required:
http://www.eskimo.com/~scs/C-faq/q5.2.html
http://www.eskimo.com/~scs/C-faq/q5.3.html
http://www.eskimo.com/~scs/C-faq/s5.html
Thanks for the links, Russell. The first sentence in the firs
E. Weddington wrote:
Vesa Jääskeläinen wrote:
Joerg Wunsch wrote:
As Vesa Jääskeläinen wrote:
I have been debugging why Ethernut brakes in certain situations with
gcc. And found an optimizer bug.
In this clause:
if (ppv && (*ppv != 0)) {
We are missing code for (ppv != 0), but code for *pp
Vesa Jääskeläinen wrote:
Joerg Wunsch wrote:
As Vesa Jääskeläinen wrote:
I have been debugging why Ethernut brakes in certain situations with
gcc. And found an optimizer bug.
In this clause:
if (ppv && (*ppv != 0)) {
We are missing code for (ppv != 0), but code for *ppv != 0 is found. And