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] |
It seemed inconsistent to have add_path take a CHAIN parameter, but then to have separate functions for adding a cpp_dir. Could you not just have one add_cpp_dir_path function that takes a CHAIN parameter too?
+ #ifdef TARGET_OPTION_INIT + TARGET_OPTION_INIT; + #endif
So far as I can tell, the only purpose of this macro is to let you have some functions in darwin-c.c and some in darwin.c.
+ for (b = cpp_get_buffer (pfile); + b && cpp_get_file (b) && cpp_get_path (cpp_get_file (b)); + b = cpp_get_prev (b))
I would suggest moving more of the logic of this routine into cppfiles.c, perhaps having a for_each_stacked_file routine or similar that takes a procedure parameter.
- This patch adds a lot of code to c-incpath.c. Couldn't it be moved into darwin.c?
Yuk! This is nasty.
The new routine should actually look at the include stack, not at side effects of being on the include stack.
Also, the functions this calls are not documented, and they should be since they're part of the interface of cpplib. The new routine should be documented.
+ if ((n=find_subframework_file (fname, cpp_get_path (cpp_get_file (b)))) != 0)
Is this supposed to be '=='?
If not, please make it its own statement.
! -D__APPLE_CC__=666"
Well, OK, so we decided we need to define it, now why 666?
A biblical reference?
Needs a comment saying why this number.
I think it would be helpful to document how frameworks work in GCC here. There is doubt as to exactly how they should work, but we can at least document how they *do* work. The documentation should be detailed enough to be able to answer the question "If I have passed this -F option, and the directory it refers to looks like this, and I write this #include directive, which file (if any) does it find?"
Attachment:
frameworki.diffs.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |