This is the mail archive of the gcc-patches@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: PATCH: better cpplex.c patch


Jeffrey A Law <law@cygnus.com> writes:

> Is there some reason why we need two bounded-ptr.h files?  Why can't we
> have one which always does the right thing?

My first response didn't directly address the second question, which
I'll do now: I want a simple wrapper header that can be distributed
with any random package that will define stubs for all non
BP-compiles.  I don't want the wrapper header to contain any details
of the BP implementation that might be subject to change.  The real
non-stub definitions should always come from a header supplied with
gcc itself, that matches gcc's implementation.

I plan to add some other things to the real gcc/ginclude version in
the near future: (1) Macros that give access to the name-mangling done
on functions that have BPs in their sigs.  (2) Machine-specific macros
for checking bounds from assembler code.  I already have these for
ix86 and PPC in the glibc tree, but wish to migrate them to
gcc/ginclude so that all packages, not just glibc, can conveniently
wire assembler code for BPs.

Perhaps we could rename the real header if you think that the
name-duplication causes confusion.  I'd say keep bounded-ptr.h for the
user-visible wrapper header, and use another name, say
`bp-internal.h', or whatever, for the real one in gcc/ginclude.

Greg

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