[Top][All Lists]

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

Re: autoconf bug

From: Paul Eggert
Subject: Re: autoconf bug
Date: 09 Jul 2003 23:58:39 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

(CC'ing to bug-autoconf)

Joerg Schilling <address@hidden> writes:

> find_stack_direction() 
> { 
>         static char *addr = 0; 
>         auto char dummy; 
>         if (addr == 0) { 
>                 addr = &dummy; 
>                 return find_stack_direction (); 
>         } else { 
>                 return (&dummy > addr) ? 1 : -1; 
>         } 
> } 
> found in acspecific.m4 is not working correctly because
> GCC optimizes this code in a way that &dummy may be == addr.

Thanks for the bug report.  If I understand you correctly, it's a GCC
bug, as that behavior doesn't conform to the C standard.  We should
file a bug report.  Which version of GCC was it, and on what platform?

> A better pice of code looks this way:

Hmm, but we can't simply modify acspecific.m4; we also need to modify
alloca.c, so that it is consistent with acspecific.m4.

But I'm puzzled as to why this matters, if you're using GCC.
GCC has builtin alloca, so shouldn't this issue be moot for GCC?

reply via email to

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