3.4 PATCH: Don't use #include "file.h" for system headers in Ada

Rainer Orth ro@TechFak.Uni-Bielefeld.DE
Wed Nov 12 21:42:00 GMT 2003


Zack Weinberg writes:

> Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> writes:
> 
> > I noticed that two source files in the gcc/ada subdir use the "" form of
> > #include for system headers.  This is just confusing and shouldn't be
> > necessary.
> 
> ctype.h should not be used at all in GCC, unless this is part of the
> Ada runtime; use safe-ctype.h instead.

AFAIKT, adadecode.c is only linked into gnat1, so the ctype.h can be
removed (since system.h already includes safe-ctype.h) and the single
instance of isdigit converted to ISDIGIT.

This would currently break if IN_GCC isn't defined, but it should always be
(and the !IN_GCC part of the file removed).

I'll submit this patch when it's been tested.

	Rainer



More information about the Gcc-patches mailing list