This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C9x conformance check


Zack Weinberg <zack@rabi.phys.columbia.edu> writes:

> >isblank() is not in ISO C 9x.  It's reallz a GNU invention.
> 
> It's in the April draft: "7.3.1.3 The isblank function"

Not the the August draft.

> >> stdio.h: stdin, stdout, stderr are supposed to be macros.
> >
> >According to what standard?  ISO C and Unix98 say they have to be
> >expressions of type "FILE *".
> 
> C9x April draft, 7.13.1 para 3 lists them as macros.

It currently says nothing about pointer.

> >> stdlib.h: strtof, strtold are under _GNU_SOURCE not _ISOC9X_SOURCE.
> >
> >This is correct.  Both are inventions by me.
> 
> April draft sections 7.14.1.6 and 7.14.1.7.  The committee must like your
> inventions.

OK, I missed this.  It's changed now.

> >> wctype.h: iswblank() is under _GNU_SOURCE not _ISOC9X_SOURCE.
> >
> >Correct.  See above.

Yes, see above.

> >> complex.h: The CX_LIMITED_RANGE macros are nowhere in my copy of the
> >> standard.
> >
> >This is no macro, it's a pragma.  ISO c9x 7.3.4.
> 
> I know - but our math.h defines CX_LIMITED_RANGE_ON, CX_LIMITED_RANGE_OFF,
> and CX_LIMITED_RANGE_DEFAULT (to nothing)

OK, this is what you mean.  I'll have to read the comments on this again.

> >> inttypes.h: #defines intptr_t (for coordination with unistd.h; this should
> >> be __intptr_t_defined).
> >
> >Why?
> 
> Well, my program is really picky, and elsewhere we use __foo_defined; why
> have two idioms?

Because the one is old and in wide use.  I don't want to change gcc if
it is not avoidable.

> _G_config.h doesn't change if you suddenly start using another compiler.

We can add #ifdef __GNUC__ around the definition and bounce for other
compilers.

> Neither libc nor libgcc implements a va_end function, so if I suppress the
> macro I'll get a link error.

You cannot suppress the macro.  It's defined that va_end is a macro.
Undefining it leads to undefined behaviour.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]