This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: More c99status.html updates
On Thu, Jul 13, 2000 at 07:42:46AM +0100, Joseph S. Myers wrote:
> On Wed, 12 Jul 2000, Zack Weinberg wrote:
>
> > I stand corrected - I thought your patches had already been applied,
> > or something like that. [What's scanf %as?]
>
> A glibc extension to allocate the string for %s - but in C99 %a is added
> as another floating point scanf format. The kludge is that %a means this
> extension if followed by s (maybe also some other characters), otherwise
> is floating point.
Bleah. Well, it's not like anyone uses scanf in serious code.
> I do wonder just why <stdint.h> has SIG_ATOMIC_MIN and SIG_ATOMIC_MAX but
> is required for freestanding implementations which should need no notion
> of sig_atomic_t.
Look at 7.18 paragraph 4:
For each type described herein that the implementation provides,
<stdint.h> shall declare that typedef name and define the associated
macros. Conversely, for each type described herein that the
implementation does not provide, <stdint.h> shall not declare that
typedef name nor shall it define the associated macros. An
implementation shall provide those types described as ``required'',
but need not provide any of the others (described as ``optional'').
7.18.3 doesn't describe sig_atomic_t as either required or optional,
but you could argue that it is optional in a freestanding implementation,
because it is not required to provide <signal.h>.
For GCC's purposes, it would be simplest to provide a sig_atomic_t
with suitable _MIN and _MAX irrespective of the presence of <signal.h>
on the target. We can figure out what a suitable type is from the
ABI, or failing that, the architecture definition.
zw