This is the mail archive of the 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: __builtin_classify_type and typeclass.h

On Tue, 3 Jul 2001, Stan Shebs wrote:

> this anymore.  Worse, by poking around via Google, I found some
> references to it being used *outside* GCC sources, and to top it all
> off, its results are being compared to literal integers(!), so most
> changes to typeclass.h will break that code.

glibc includes a testcase for its usages (gnulib/tst-gcc.c) to detect such
breakages.  However, I don't think the __builtin_classify_type uses are
actually necessary for <tgmath.h> to be correct on arguments that C99

> My suggestion is to evaporate __builtin_classify_type and typeclass.h,
> and to inform the people using it outside of GCC; the whole thing just
> looks like an accident waiting to happen.  Alternatively, it could be
> commented out, with a note to revive it if it's ever needed again.
> I don't see a way to ensure its testability and the correctness of
> the list in typeclass.h.

The current handling of varargs is lacking in documentation for the target
macros it added.  Could whoever implemented the current system (RTH?)  
attend to documenting it, and removing documentation for obsolete macros
and builtins associated with the old system (if the builtins are
themselves removed as obsolete)?  This is the whole section "Implementing
the Varargs Macros" in tm.texi that should have been updated when the
varargs implementation was replaced by the current one using builtins; if
any of the builtins there are still of use, the documentation should move
elsewhere; if any of the target macros there are no longer of use, their
documentation and all definitions and uses of them should be removed.

Joseph S. Myers

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