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: ideas for cpplib


> A question - is #import supposed to block that file from both future
> #imports and #includes (as if you had a pragma once or a guard ifdef)
> or just #import?

I don't know.  (I don't much care, either ...)

> Something along these lines could work.  However, I'm fairly certain
> that the overhead of trying to do comments and backslash-newline at
> the same time as macro and directive parsing is bad enough that it's
> worth messing with the input buffer over.

One idea is that you would have an invariant that any characters
between cur and rlimit are "clean" and do not include backslashes,
comments, trigraphs, or CR/NL.  When cur==rlimit, GET will call
a function to ge the next character;  this function will handle
the processing of the complicated characters, and either leave cur
pointing at the next regular character, or set rlimit==cur.

	--Per Bothner
Cygnus Solutions     bothner@cygnus.com     http://www.cygnus.com/~bothner




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