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]
Other format: [Raw text]

Re: [PATCH] Symbol Separation - Take 2



On Monday, July 14, 2003, at 1:01 PM, Neil Booth wrote:


* cppss.c : New file.

This file name is no good.

Symbol Separation support in CPP hence cppss.c But feel free to suggest another name. First paragraph in this source file explains what is symbol separation.

(cpp_valid_state): Issue appropriate warning, when -Winvalid-sr
is set.

Similarly "-Winvalid-sr" is no good; practically no other switch is this
non-self-documenting.

Name is based on -Winvalid-pch and it is used in similar condition. It emits
appropriate warnings if compiler validation for symbol repository fails.
But again feel free to suggest better name.


Without my having to figure out all of your patch, could you briefly
explain _all_ functionality you require of CPP that isn't already present?
Why do you require so many callbacks?

First paragraph in cppss.c will help you to understand it.


1) While searching for foo.h, search for foo.h.cinfo also.

2) Write context information (.cinfo) about header in a separate file so that
when same header is included again compiler can compare its context.
PCH uses to validate pre-compiled headers. I use same pch implementation
to write context info in a .cinfo file.


3) Read context information for validation. I re-use PCH header validation
implementation.


4) I need to update state in stab generator when CPP enters and exits
header. I use call backs for it.

5) Unlike PCH, I do not want to include built-ins functions in .cinfo.
I use one call back for it.

6) Write unique checksum in .cinfo file for the header and read it back
while validating context info. This is used by stab generator while
emitting EXCL stab.

DWARF format may require less or more call backs.

/* Use PCH technique in future */
static const char context_ident[8] = "cpp-cntx";

/* FIX ME : Add in struct include_file */
/* Hold checksum for the include file. It is included with
   BINCL and EINCL stabs.  */
static unsigned long stabs_checksum;

I thought we agreed cpplib doesn't have statics? The const might be an exception, but I can't see what that variable is for.

I have comments for both of them indicating that I'll take care of them soon.

  We don't want two options that mean
one thing going forwards.

Which two options are you referring here ?


  And please do your -g option in common.opt;
all the -g options are going there when I get the time.

I prefer to move all -g options together whenever you have time.


Thanks,
-Devang


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