top level: * Makefile.in: Remove all references to c-parse.gperf, c-gperf.h, and c-parse.h. Remove -d from yacc command line generating c-parse.c. Update dependencies. * c-parse.gperf, c-gperf.h: Delete. * c-common.c: Don't define parse_options, cpp_token, yy_cur, yy_lim, or yy_get_token. Don't define get_directive_line if USE_CPPLIB. * c-common.h: Add multiple include guard. Define RID values for every keyword in C, C++, and Objective C. Put all the modifiers first. (struct c_fileinfo, get_fileinfo, dump_time_statistics): New. * c-decl.c (c_decode_option): Handle -lang-objc here. (print_lang_identifier): Handle C_IS_RESERVED_WORD case. (grokdeclarator): Adjust for new RID scheme. (extract_interface_info): New stub. * c-lang.c: Don't declare yy_cur or parse_options. (lang_init_options): Call cpp_init. Don't call cpp_options_init. (lang_init): Don't call check_newline if USE_CPPLIB. * c-lex.c: Don't include c-parse.h. Do include timevar.h. Elide lots of unnecessary code if USE_CPPLIB. Delete code rendered unnecessary by new architecture. Move routines not shared with C++ to c-parse.in. Maintain a local idea of the line number. Handle C++ as well as C. [USE_CPPLIB]: Declare and register callbacks for #ident and for entering/leaving files. (init_c_lex, c_lex): Are now the entry points to this file. (check_newline): Break out directive handling to process_directive. (read_ucs, is_extended_char, utf8_extend_token): Moved here from C++ front end. (readescape, parse_float): Overhaul. (lex_number, lex_string, lex_charconst): Break out of c_lex (n'ee yylex). (get_fileinfo, update_header_times, dump_one_header, dump_time_statistics): New and/or moved here from C++. Support per-file data needed by C++ and per-header timing statistics (C++ only, at the moment). * c-lex.h: Update prototypes. Add multiple include guard. * c-tree.h (struct lang_identifier): Add rid_code field. (C_IS_RESERVED_WORD, C_RID_CODE): New. * c-parse.in: Include c-pragma.h. Remove unnecesary calls to reinit_parse_for_function and/or position_after_white_space. (save_filename, save_lineno): Look ahead before saving. (label -> identifier ':'): Save file and line before shifting ':'. (reservedwords): No need to call get_identifier. (init_parse, finish_parse, yyerror, yylex, yyprint, make_pointer_declarator): Are now here for C/ObjC. (rid_to_yy): Conversion table from RID constants to Yacc codes. * c-pragma.c: Rewrite parsing logic to fit with cpplib's #pragma registry. Provide dummy implementation of that interface if !USE_CPPLIB. * c-pragma.h: Update to match. * flags.h: Add multiple include guard. (flag_detailed_statistics): Moved here from C++. * toplev.c: Define flag_detailed_statistics. * gcc.c (C specs): Use %(trad_capable_cpp) for -E|-M|-MM case #if USE_CPPLIB. * timevar.def (TV_CPP, TV_LEX): New. * timevar.h: Add multiple include guard. * objc/lang-specs.h: Use %(trad_capable_cpp) for -E|-M|-MM case #if USE_CPPLIB. * objc/objc-act.c: Don't mention yy_cur or parse_options. Initialize cpplib properly. Force lineno to 0 after first call to check_newline. Don't handle -lang-objc here. Move forget_protocol_qualifiers and remember_protocol_qualifiers here. cp: * Make-lang.in, Makefile.in: Remove all references to input.c, gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS. * gxx.gperf, hash.h, input.c: Delete. * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is initialized properly. * class.c (fixup_pending_inline): Take a tree, not a struct pending_inline *. All callers changed. (init_class_processing): Set RID_PUBLIC, RID_PRIVATE, RID_PROTECTED entries in ridpointers[] array here. * decl.c (duplicate_decls): Do not refer to struct pending_inline. (record_builtin_type, init_decl_processing): Use RID_MAX not CP_RID_MAX. (grokdeclarator): Use C_IS_RESERVED_WORD. * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of cpplib. (grok_x_components): Do not inspect pending_inlines chain. * cp-tree.h (struct lang_identifier): Add rid_code entry. (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New. (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare. (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME, TIME_IDENTIFIER_FILEINFO): Kill. Update prototypes. * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a single 32-bit word. * parse.y: Call do_pending_inlines unconditionally. reinit_parse_for_method is now snarf_method. fn.defpen is no longer necessary. Remove unnecessary <itype> annotation on SCOPE. Do not refer to end_of_file or struct pending_inline. * semantics.c (begin_inline_definitions): Call do_pending_inlines unconditionally. * lex.c: Remove all code now shared with C front end. Initialize cpplib properly if USE_CPPLIB. Put reserved words into the get_identifier table. Rewrite pragma handling to work with the registry. Move code to save tokens for later processing to spew.c. * spew.c: Rewrite everything in terms of token streams instead of text. Move routines here from lex.c / input.c as appropriate. GC-mark trees hanging off the pending inlines chain. testsuite: * g++.old-deja/g++.benjamin/13478.C: Put meaningful tags on ERROR markers. * g++.old-deja/g++.brendan/crash8.C: Move ERROR marker up one line. * gcc.dg/c99-array-nonobj-1.c: Don't expect func[] cases to fail. * gcc.dg/wtr-label-1.c: Don't use unconstrained .* in error regexps. * gcc.dg/wtr-suffix-1.c: Correct error regexps. * gcc.dg/cpp/unc1.c, gcc.dg/cpp/unc2.c, gcc.dg/cpp/unc3.c: Preprocess only. * gcc.dg/cpp/unc4.c: Adjust line number in dg-error line. * gcc.dg/noncompile/const-ll-1.c: Generalize error regexp. From-SVN: r36216
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
ch | Loading commit data... | |
config | Loading commit data... | |
cp | Loading commit data... | |
f | Loading commit data... | |
fixinc | Loading commit data... | |
ginclude | Loading commit data... | |
intl | Loading commit data... | |
java | Loading commit data... | |
objc | Loading commit data... | |
po | Loading commit data... | |
testsuite | Loading commit data... | |
.cvsignore | Loading commit data... | |
.gdbinit | Loading commit data... | |
ABOUT-GCC-NLS | Loading commit data... | |
ABOUT-NLS | Loading commit data... | |
BUGS | Loading commit data... | |
COPYING | Loading commit data... | |
COPYING.LIB | Loading commit data... | |
ChangeLog | Loading commit data... | |
ChangeLog.0 | Loading commit data... | |
ChangeLog.1 | Loading commit data... | |
ChangeLog.2 | Loading commit data... | |
ChangeLog.3 | Loading commit data... | |
ChangeLog.lib | Loading commit data... | |
FSFChangeLog | Loading commit data... | |
FSFChangeLog.10 | Loading commit data... | |
FSFChangeLog.11 | Loading commit data... | |
INSTALL | Loading commit data... | |
LANGUAGES | Loading commit data... | |
Makefile.in | Loading commit data... | |
NEWS | Loading commit data... | |
PROBLEMS | Loading commit data... | |
README | Loading commit data... | |
README-bugs | Loading commit data... | |
README-fixinc | Loading commit data... | |
README.ACORN | Loading commit data... | |
README.ALTOS | Loading commit data... | |
README.APOLLO | Loading commit data... | |
README.AVR | Loading commit data... | |
README.C4X | Loading commit data... | |
README.DWARF | Loading commit data... | |
README.FRESCO | Loading commit data... | |
README.NS32K | Loading commit data... | |
README.Portability | Loading commit data... | |
README.RS6000 | Loading commit data... | |
README.TRAD | Loading commit data... | |
README.X11 | Loading commit data... | |
README.gnat | Loading commit data... | |
SERVICE | Loading commit data... | |
TESTS.FLUNK | Loading commit data... | |
acconfig.h | Loading commit data... | |
aclocal.m4 | Loading commit data... | |
alias.c | Loading commit data... | |
assert.h | Loading commit data... | |
basic-block.h | Loading commit data... | |
bb-reorder.c | Loading commit data... | |
bitmap.c | Loading commit data... | |
bitmap.h | Loading commit data... | |
build-make | Loading commit data... | |
builtins.c | Loading commit data... | |
builtins.def | Loading commit data... | |
c-aux-info.c | Loading commit data... | |
c-common.c | Loading commit data... | |
c-common.def | Loading commit data... | |
c-common.h | Loading commit data... | |
c-convert.c | Loading commit data... | |
c-decl.c | Loading commit data... | |
c-errors.c | Loading commit data... | |
c-lang.c | Loading commit data... | |
c-lex.c | Loading commit data... | |
c-lex.h | Loading commit data... | |
c-parse.in | Loading commit data... | |
c-pragma.c | Loading commit data... | |
c-pragma.h | Loading commit data... | |
c-semantics.c | Loading commit data... | |
c-tree.h | Loading commit data... | |
c-typeck.c | Loading commit data... | |
caller-save.c | Loading commit data... | |
calls.c | Loading commit data... | |
collect2.c | Loading commit data... | |
collect2.h | Loading commit data... | |
combine.c | Loading commit data... | |
conditions.h | Loading commit data... | |
config.guess | Loading commit data... | |
config.in | Loading commit data... | |
configure | Loading commit data... | |
configure.bat | Loading commit data... | |
configure.frag | Loading commit data... | |
configure.in | Loading commit data... | |
configure.lang | Loading commit data... | |
conflict.c | Loading commit data... | |
contrib.texi | Loading commit data... | |
convert.c | Loading commit data... | |
convert.h | Loading commit data... | |
cpp.1 | Loading commit data... | |
cpp.texi | Loading commit data... | |
cppdefault.c | Loading commit data... | |
cppdefault.h | Loading commit data... | |
cpperror.c | Loading commit data... | |
cppexp.c | Loading commit data... | |
cppfiles.c | Loading commit data... | |
cpphash.c | Loading commit data... | |
cpphash.h | Loading commit data... | |
cppinit.c | Loading commit data... | |
cpplex.c | Loading commit data... | |
cpplib.c | Loading commit data... | |
cpplib.h | Loading commit data... | |
cppmacro.c | Loading commit data... | |
cppmain.c | Loading commit data... | |
cppspec.c | Loading commit data... | |
cppulp.c | Loading commit data... | |
cross-make | Loading commit data... | |
crtstuff.c | Loading commit data... | |
cse.c | Loading commit data... | |
cselib.h | Loading commit data... | |
cstamp-h.in | Loading commit data... | |
dbxout.c | Loading commit data... | |
dbxout.h | Loading commit data... | |
dbxstclass.h | Loading commit data... | |
dce.c | Loading commit data... | |
defaults.h | Loading commit data... | |
dependence.c | Loading commit data... | |
diagnostic.c | Loading commit data... | |
diagnostic.h | Loading commit data... | |
doloop.c | Loading commit data... | |
doprint.c | Loading commit data... | |
doschk.c | Loading commit data... | |
dostage2 | Loading commit data... | |
dostage3 | Loading commit data... | |
dwarf.h | Loading commit data... | |
dwarf2.h | Loading commit data... | |
dwarf2out.c | Loading commit data... | |
dwarf2out.h | Loading commit data... | |
dwarfout.c | Loading commit data... | |
dwarfout.h | Loading commit data... | |
eh-common.h | Loading commit data... | |
emit-rtl.c | Loading commit data... | |
enquire.c | Loading commit data... | |
errors.c | Loading commit data... | |
errors.h | Loading commit data... | |
except.c | Loading commit data... | |
except.h | Loading commit data... | |
exgettext | Loading commit data... | |
explow.c | Loading commit data... | |
expmed.c | Loading commit data... | |
expr.c | Loading commit data... | |
expr.h | Loading commit data... | |
extend.texi | Loading commit data... | |
final.c | Loading commit data... | |
fix-header.c | Loading commit data... | |
fixproto | Loading commit data... | |
flags.h | Loading commit data... | |
floatlib.c | Loading commit data... | |
flow.c | Loading commit data... | |
fold-const.c | Loading commit data... | |
fp-test.c | Loading commit data... | |
frame-dwarf2.c | Loading commit data... | |
frame.c | Loading commit data... | |
frame.h | Loading commit data... | |
function.c | Loading commit data... | |
function.h | Loading commit data... | |
future.options | Loading commit data... | |
gansidecl.h | Loading commit data... | |
gbl-ctors.h | Loading commit data... | |
gcc.1 | Loading commit data... | |
gcc.c | Loading commit data... | |
gcc.h | Loading commit data... | |
gcc.hlp | Loading commit data... | |
gcc.texi | Loading commit data... | |
gccbug.in | Loading commit data... | |
gccspec.c | Loading commit data... | |
gcov-io.h | Loading commit data... | |
gcov.c | Loading commit data... | |
gcov.texi | Loading commit data... | |
gcse.c | Loading commit data... | |
gen-protos.c | Loading commit data... | |
genattr.c | Loading commit data... | |
genattrtab.c | Loading commit data... | |
gencheck.c | Loading commit data... | |
gencodes.c | Loading commit data... | |
genconfig.c | Loading commit data... | |
genemit.c | Loading commit data... | |
genextract.c | Loading commit data... | |
genflags.c | Loading commit data... | |
gengenrtl.c | Loading commit data... | |
genmultilib | Loading commit data... | |
genopinit.c | Loading commit data... | |
genoutput.c | Loading commit data... | |
genpeep.c | Loading commit data... | |
genrecog.c | Loading commit data... | |
gensupport.c | Loading commit data... | |
gensupport.h | Loading commit data... | |
ggc-callbacks.c | Loading commit data... | |
ggc-common.c | Loading commit data... | |
ggc-none.c | Loading commit data... | |
ggc-page.c | Loading commit data... | |
ggc-simple.c | Loading commit data... | |
ggc.h | Loading commit data... | |
glimits.h | Loading commit data... | |
global.c | Loading commit data... | |
gmon.c | Loading commit data... | |
graph.c | Loading commit data... | |
graph.h | Loading commit data... | |
gstab.h | Loading commit data... | |
gsyms.h | Loading commit data... | |
gsyslimits.h | Loading commit data... | |
gthr-dce.h | Loading commit data... | |
gthr-posix.h | Loading commit data... | |
gthr-single.h | Loading commit data... | |
gthr-solaris.h | Loading commit data... | |
gthr-vxworks.h | Loading commit data... | |
gthr-win32.h | Loading commit data... | |
gthr.h | Loading commit data... | |
haifa-sched.c | Loading commit data... | |
halfpic.c | Loading commit data... | |
halfpic.h | Loading commit data... | |
hard-reg-set.h | Loading commit data... | |
hash.c | Loading commit data... | |
hash.h | Loading commit data... | |
hwint.h | Loading commit data... | |
ifcvt.c | Loading commit data... | |
input.h | Loading commit data... | |
insn-addr.h | Loading commit data... | |
install.texi | Loading commit data... | |
install1.texi | Loading commit data... | |
integrate.c | Loading commit data... | |
integrate.h | Loading commit data... | |
intl.c | Loading commit data... | |
intl.h | Loading commit data... | |
invoke.texi | Loading commit data... | |
jump.c | Loading commit data... | |
lcm.c | Loading commit data... | |
libgcc1-test.c | Loading commit data... | |
libgcc1.c | Loading commit data... | |
libgcc2.c | Loading commit data... | |
libgcc2.h | Loading commit data... | |
limitx.h | Loading commit data... | |
limity.h | Loading commit data... | |
listing | Loading commit data... | |
lists.c | Loading commit data... | |
local-alloc.c | Loading commit data... | |
longlong.h | Loading commit data... | |
loop.c | Loading commit data... | |
loop.h | Loading commit data... | |
machmode.def | Loading commit data... | |
machmode.h | Loading commit data... | |
make-l2.com | Loading commit data... | |
makefile.vms | Loading commit data... | |
mbchar.c | Loading commit data... | |
mbchar.h | Loading commit data... | |
md.texi | Loading commit data... | |
mips-tdump.c | Loading commit data... | |
mips-tfile.c | Loading commit data... | |
mkdeps.c | Loading commit data... | |
mkdeps.h | Loading commit data... | |
mkinstalldirs | Loading commit data... | |
mklibgcc.in | Loading commit data... | |
move-if-change | Loading commit data... | |
optabs.c | Loading commit data... | |
output.h | Loading commit data... | |
patch-apollo-includes | Loading commit data... | |
predict.c | Loading commit data... | |
prefix.c | Loading commit data... | |
prefix.h | Loading commit data... | |
print-rtl.c | Loading commit data... | |
print-tree.c | Loading commit data... | |
profile.c | Loading commit data... | |
protoize.c | Loading commit data... | |
pself.c | Loading commit data... | |
pself1.c | Loading commit data... | |
pself2.c | Loading commit data... | |
pself3.c | Loading commit data... | |
pself4.c | Loading commit data... | |
pself5.c | Loading commit data... | |
real.c | Loading commit data... | |
real.h | Loading commit data... | |
recog.c | Loading commit data... | |
recog.h | Loading commit data... | |
reg-stack.c | Loading commit data... | |
regclass.c | Loading commit data... | |
regmove.c | Loading commit data... | |
regrename.c | Loading commit data... | |
regs.h | Loading commit data... | |
reload.c | Loading commit data... | |
reload.h | Loading commit data... | |
reload1.c | Loading commit data... | |
reorg.c | Loading commit data... | |
resource.c | Loading commit data... | |
resource.h | Loading commit data... | |
rtl.c | Loading commit data... | |
rtl.def | Loading commit data... | |
rtl.h | Loading commit data... | |
rtl.texi | Loading commit data... | |
rtlanal.c | Loading commit data... | |
sbitmap.c | Loading commit data... | |
sbitmap.h | Loading commit data... | |
scan-decls.c | Loading commit data... | |
scan-types.sh | Loading commit data... | |
scan.c | Loading commit data... | |
scan.h | Loading commit data... | |
sdbout.c | Loading commit data... | |
sdbout.h | Loading commit data... | |
sibcall.c | Loading commit data... | |
simplify-rtx.c | Loading commit data... | |
sort-protos | Loading commit data... | |
ssa.c | Loading commit data... | |
ssa.h | Loading commit data... | |
stab.def | Loading commit data... | |
stack.h | Loading commit data... | |
stmt.c | Loading commit data... | |
stor-layout.c | Loading commit data... | |
sys-protos.h | Loading commit data... | |
sys-types.h | Loading commit data... | |
system.h | Loading commit data... | |
texinfo.tex | Loading commit data... | |
timevar.c | Loading commit data... | |
timevar.def | Loading commit data... | |
timevar.h | Loading commit data... | |
tlink.c | Loading commit data... | |
tm.texi | Loading commit data... | |
toplev.c | Loading commit data... | |
toplev.h | Loading commit data... | |
tradcif.y | Loading commit data... | |
tradcpp.c | Loading commit data... | |
tree.c | Loading commit data... | |
tree.def | Loading commit data... | |
tree.h | Loading commit data... | |
tsystem.h | Loading commit data... | |
typeclass.h | Loading commit data... | |
unprotoize.c | Loading commit data... | |
unroll.c | Loading commit data... | |
varasm.c | Loading commit data... | |
varray.c | Loading commit data... | |
varray.h | Loading commit data... | |
version.c | Loading commit data... | |
version.h | Loading commit data... | |
vmsconfig.com | Loading commit data... | |
xcoffout.c | Loading commit data... | |
xcoffout.h | Loading commit data... |