summaryrefslogtreecommitdiff
path: root/libcpp
Commit message (Collapse)AuthorAgeFilesLines
* libcpp/janis2007-05-142-0/+6
| | | | | | | | | * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic. gcc/testsuite/ * gcc.dg/fltconst-pedantic-dfp.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124731 138bc75d-0d04-0410-961f-82ee72b054a4
* libcpp/janis2007-05-142-8/+16
| | | | | | | | | | | PR c/31924 * expr.c (interpret_float_suffix): Check for invalid suffix. gcc/testsuite/ PR c/31924 * gcc.dg/fltconst-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124730 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-05-02 Eric Christopher <echristo@apple.com>echristo2007-05-022-3/+9
| | | | | | | | | | | | | * gcc.dg/cpp/if-div.c: New file. 2007-05-02 Eric Christopher <echristo@apple.com> * expr.c (num_div_op): Don't overflow if the result is zero. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124358 138bc75d-0d04-0410-961f-82ee72b054a4
* libcpptromey2007-05-022-6/+20
| | | | | | | | | | | PR preprocessor/28709: * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs. gcc/testsuite PR preprocessor/28709: * gcc.dg/cpp/pr28709.c: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124356 138bc75d-0d04-0410-961f-82ee72b054a4
* make alloca call type correctmeissner2007-03-302-1/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123374 138bc75d-0d04-0410-961f-82ee72b054a4
* libcpp/rth2007-03-303-0/+68
| | | | | | | | | | | | | | | | * directives.c (lex_macro_node_from_str): New. (cpp_push_definition, cpp_pop_definition): New. * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare. gcc/ * c-pragma.c (struct def_pragma_macro_value): New. (struct def_pragma_macro): New. (pushed_macro_table): New. (dpm_hash, dpm_eq): New. (handle_pragma_push_macro, handle_pragma_pop_macro): New. (init_pragma): Install them. * doc/tm.texi (HANDLE_PRAGMA_PUSH_POP_MACRO): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123370 138bc75d-0d04-0410-961f-82ee72b054a4
* * cpplib.pot: Regenerate.jsm282007-03-072-108/+112
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122666 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Add dummy install-pdf target.brooks2007-03-012-0/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122445 138bc75d-0d04-0410-961f-82ee72b054a4
* PR preprocessor/30468:tromey2007-01-302-2/+14
| | | | | | | * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped './'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121341 138bc75d-0d04-0410-961f-82ee72b054a4
* PR preprocessor/29966:tromey2007-01-303-9/+19
| | | | | | | | | * macro.c (lex_expansion_token): Save and restore cpp_reader's cur_token. (_cpp_create_definition): Don't restore cur_token here. * lex.c (_cpp_lex_token): Added assertion. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121340 138bc75d-0d04-0410-961f-82ee72b054a4
* configtromey2007-01-272-2/+6
| | | | | | | | | | | | 2007-01-27 Paolo Bonzini <bonzini@gnu.org> * depstand.m4 (ZW_CREATE_DEPDIR): Use mkinstalldirs to make directory. libcpp * configure: Rebuilt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121237 138bc75d-0d04-0410-961f-82ee72b054a4
* libcpptromey2007-01-122-8/+20
| | | | | | | | | | | | | | | | PR preprocessor/28227: * directives.c (lex_macro_node): Added 'is_def_or_undef' argument. (do_define): Update. (do_undef): Update. (do_ifdef): Update. (do_ifndef): Update. gcc/testsuite PR preprocessor/28227: * gcc.dg/cpp/pr28227.c: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120731 138bc75d-0d04-0410-961f-82ee72b054a4
* config:bonzini2007-01-112-1/+6
| | | | | | | | | | | | | | | | 2007-01-11 Paolo Bonzini <bonzini@gnu.org> * warnings.m4: Use m4_expand_once to clear the AC_SUBST'ed variable. (ACX_PROG_CC_WARNINGS_ARE_ERRORS): Fix typo. Add optional 2nd argument. libcpp: 2007-01-11 Paolo Bonzini <bonzini@gnu.org> * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120675 138bc75d-0d04-0410-961f-82ee72b054a4
* config:bonzini2007-01-112-1/+5
| | | | | | | | | | | | | | | | 2007-01-11 Paolo Bonzini <bonzini@gnu.org> * config/warnings.m4: Add second parameter with name of variable. Always append to the variable if it exists. libcpp: 2007-01-11 Paolo Bonzini <bonzini@gnu.org> * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120673 138bc75d-0d04-0410-961f-82ee72b054a4
* libcpptromey2007-01-043-7/+21
| | | | | | | | | | | | | | PR preprocessor/28165: * internal.h (cpp_in_primary_file): New function. * directives.c (do_include_next): Use cpp_in_primary_file. (do_pragma_once): Likewise. (do_pragma_system_header): Likewise. gcc/testsuite PR preprocessor/28165: * gcc.dg/cpp/pr28165.c: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120441 138bc75d-0d04-0410-961f-82ee72b054a4
* * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don'tian2006-12-292-9/+26
| | | | | | | look backward at the end of the line unless we saw a backslash. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120263 138bc75d-0d04-0410-961f-82ee72b054a4
* PR preprocessor/29612jakub2006-12-292-1/+7
| | | | | | | | | | | * directives.c (do_linemarker): Set pfile->buffer->sysp always, not only when new_sysp is non-zero. * gcc.dg/cpp/pr29612-1.c: New test. * gcc.dg/cpp/pr29612-2.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120257 138bc75d-0d04-0410-961f-82ee72b054a4
* PR preprocessor/30001:tromey2006-12-282-2/+8
| | | | | | | * charset.c (_cpp_convert_input): Check that to.len is greater than zero. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120245 138bc75d-0d04-0410-961f-82ee72b054a4
* Formatting fixes.bje2006-11-211-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119042 138bc75d-0d04-0410-961f-82ee72b054a4
* ChangeLogtsmigiel2006-11-213-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.in (skipdirs) : Don't build target-libiberty for SPU. * configure : Rebuilt. gcc/ChangeLog * config.gcc : Add target for SPU. * config/spu/constraints.md : New file. * config/spu/crt0.c : New file. * config/spu/crtend.c : New file. * config/spu/crti.asm : New file. * config/spu/crtn.asm : New file. * config/spu/float_unsdidf.c : New file. * config/spu/float_unssidf.c : New file. * config/spu/predicates.md : New file. * config/spu/spu-builtins.def : New file. * config/spu/spu-builtins.h : New file. * config/spu/spu-builtins.md : New file. * config/spu/spu-c.c : New file. * config/spu/spu-elf.h : New file. * config/spu/spu-modes.def : New file. * config/spu/spu-protos.h : New file. * config/spu/spu.c : New file. * config/spu/spu.h : New file. * config/spu/spu.md : New file. * config/spu/spu.opt : New file. * config/spu/spu_internals.h : New file. * config/spu/spu_intrinsics.h : New file. * config/spu/spu_mfcio.h : New file. * config/spu/t-spu-elf : New file. * config/spu/vec_types.h : New file. * config/spu/vmx2spu.h : New file. * doc/contrib.texi : Document SPU contributor. * doc/extend.texi : Document SPU extensions. * doc/invoke.texi : Document SPU options. * doc/md.texi : Document SPU constraints. libcpp/ChangeLog * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU. * configure : Rebuilt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119041 138bc75d-0d04-0410-961f-82ee72b054a4
* 2006-11-01 Douglas Gregor <doug.gregor@gmail.com>dgregor2006-11-013-13/+22
| | | | | | | | | | | * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X for experimental C++0x mode. * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has adopted the preprocessor changes introduced in C99. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118385 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc:jsm282006-10-293-0/+20
| | | | | | | | | | | | | | | | | | | | | | | * config.gcc (i[34567]86-*-linux*): Handle --enable-targets=all. Handle tuning for bi-arch i[34567]86-*-linux* like that for i[34567]86-*-solaris2.1[0-9]*. * config/i386/linux64.h (TARGET_VERSION, MULTILIB_DEFAULTS): Define conditionally depending on TARGET_64BIT_DEFAULT. (SPEC_32, SPEC_64): Define. (LINK_SPEC): Use them. * doc/install.texi (--enable-targets=all): Document for x86-linux. libcpp: * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux* depending on --enable-targets=all. * configure: Regenerate. fixincludes: * inclhack.def (AAB_fd_zero_asm_posix_types_h): Bypass on x86_64. * fixincl.x: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118147 138bc75d-0d04-0410-961f-82ee72b054a4
* * cpplib.pot: Regenerate.jsm282006-10-222-127/+159
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117954 138bc75d-0d04-0410-961f-82ee72b054a4
* PR preprocessor/28709jakub2006-10-122-17/+25
| | | | | | | | | | | * macro.c (paste_tokens): Do error reporting here, use BUF with the spelled LHS token as opposed to spelling it again. (paste_all_tokens): Don't report errors here, just break on failure. * gcc.dg/cpp/paste14.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117664 138bc75d-0d04-0410-961f-82ee72b054a4
* --(top level)--------------------------------------------brooks2006-10-102-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-10-10 Brooks Moses <bmoses@stanford.edu> * Makefile.def: Added pdf target handling. * Makefile.tpl: Added pdf target handling. * Makefile.in: Regenerated. ---fixincludes-------------------------------------------- 2006-10-10 Brooks Moses <bmoses@stanford.edu> * Makefile.in: Added empty "pdf" target. ---gcc---------------------------------------------------- 2006-10-10 Brooks Moses <bmoses@stanford.edu> * configure.ac: Added pdf to "Make-hooks" * Makefile.in: Added TEXI2PDF definition, and various pdf-file targets and *.pdf file patterns in cleanup targets. * configure: Regenerated. ---gcc/cp------------------------------------------------- 2006-10-10 Brooks Moses <bmoses@stanford.edu> * Make-lang.in: Added "c++.pdf" target support. ---gcc/fortran-------------------------------------------- 2006-10-10 Brooks Moses <bmoses@stanford.edu> * Make-lang.in: Added "fortran.pdf", "gfortran.pdf" target support. ---gcc/java----------------------------------------------- 2006-10-10 Brooks Moses <bmoses@stanford.edu> * Make-lang.in: Added "java.pdf", "gcj.pdf" target support. ---gcc/objc----------------------------------------------- 2006-10-10 Brooks Moses <bmoses@stanford.edu> * Make-lang.in: Added empty "objc.pdf" target. ---gcc/objcp---------------------------------------------- 2006-10-10 Brooks Moses <bmoses@stanford.edu> * Make-lang.in: Added empty "obj-c++.pdf" target. ---gcc/treelang------------------------------------------- 2006-10-10 Brooks Moses <bmoses@stanford.edu> * Make-lang.in: Added "treelang.pdf" target support. ---gnattools---------------------------------------------- 2006-10-10 Brooks Moses <bmoses@stanford.edu> * Makefile.in: Added empty "pdf" target. ---libcpp------------------------------------------------- 2006-10-10 Brooks Moses <bmoses@stanford.edu> * Makefile.in: Added empty "pdf" target. ---libdecnumber------------------------------------------- 2006-10-10 Brooks Moses <bmoses@stanford.edu> * Makefile.in: Added empty "pdf" target. ---libiberty---------------------------------------------- 2006-10-10 Brooks Moses <bmoses@stanford.edu> * Makefile.in: Added "pdf", "libiberty.pdf" target support. * testsuite/Makefile.in: Added empty "pdf" target. ---libobjc------------------------------------------------ 2006-10-10 Brooks Moses <bmoses@stanford.edu> * Makefile.in: Added empty "pdf" target. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117618 138bc75d-0d04-0410-961f-82ee72b054a4
* * configure.ac: Make need_64_bit_hwint case for x86-darwingeoffk2006-09-223-2/+8
| | | | | | | | match exactly the glob in gcc/config.gcc. * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117156 138bc75d-0d04-0410-961f-82ee72b054a4
* libcpp:jsm282006-09-132-0/+10
| | | | | | | | | | | | | | | | | | | | PR c/28768 PR preprocessor/14634 * lex.c (lex_string): Pedwarn for unterminated literals. libgomp: * configure.ac (HAVE_CLOCK_GETTIME): Add missing second argument to AC_DEFINE. * configure: Regenerate. gcc/testsuite: * gcc.dg/cpp/include2.c, gcc.dg/cpp/macspace1.c, gcc.dg/cpp/macspace2.c, gcc.dg/cpp/multiline.c, gcc.dg/cpp/trad/literals-2.c: Update expected diagnostics. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116915 138bc75d-0d04-0410-961f-82ee72b054a4
* 2006-09-08 Eric Christopher <echristo@apple.com>echristo2006-09-093-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * config.gcc (i?86-*-darwin): Add 64-bit HWI support. * config/t-slibgcc-darwin: Support x86_64 multilib. * config/i386/i386.h (JUMP_TABLES_IN_TEXT_SECTION): Return 1 for x86_64-darwin. * config/i386/t-darwin: Add m64 multilib. (LIB2_SIDITI_CONV_FUNCS): Use. (LIB2FUNCS_EXTRA): Ditto. * config/i386/darwin.h: Support x86_64. * config/i386/i386.c (override_options): Turn on flag_pic for x86_64-darwin. Disable flag_omit_pointer. (get_pc_thunk_name): Assert !TARGET_64BIT. (legitimate_address_p): Disable machopic addressing for x86_64. (legitimize_pic_address): Ditto. (ix86_expand_move): Ditto. (ix86_expand_call): Ditto. (machopic_output_stub): Ditto. * config/darwin.c (machopic_select_section): Support literal16. (machopic_select_rtx_section): Ditto. * config/darwin-sections.def: Ditto. * config/darwin-64.c: New. 2006-09-08 Eric Christopher <echristo@apple.com> * gcc.target/i386/20060512-3.c: Run test on ilp32 only. * gcc.target/i386/memcpy-1.c: Ditto. * gcc.target/i386/asm-1.c: Ditto. * gcc.target/i386/20060512-4.c: Ditto. * gcc.target/i386/compress-float-387.c: Ditto. * gcc.target/i386/20060512-1.c: Ditto. * gcc.target/i386/compress-float-sse.c: Ditto. * gcc.target/i386/20060512-2.c: Ditto. * gcc.target/i386/compress-float-sse-pic.c: Ditto. * gcc.target/i386/stack-prot-kernel.c: Ditto. * gcc.target/i386/compress-float-387-pic.c: Ditto. * gcc.dg/pr26449.c: Ditto. * gcc.dg/attr-ms_struct-2.c: Ditto. * gcc.dg/attr-ms_struct-1.c: Ditto. * gcc.misc-tests/linkage.exp: Fix 64-bit darwin support. 2006-09-08 Eric Christopher <echristo@apple.com> * configure.ac: Add 64-bit HWI support for i?86-darwin. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116795 138bc75d-0d04-0410-961f-82ee72b054a4
* * vi.po: Update.jsm282006-09-032-154/+157
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116670 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/28288sje2006-08-144-40/+21
| | | | | | | | | | | | | | | | | | PR c++/14556 * operators.def: Remove <?, ?>, <?=, and >?= operators. * parser.c: Remove CPP_MIN, CPP_MAX, CPP_MIN_EQ, and CPP_MAX_EQ. (cp_parser_warn_min_max): Remove. * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens. (CPP_LAST_EQ): Change. (CPP_LAST_PUNCTUATOR): Change. * expr.c (cpp_operator): Remove MIN and MAX. (reduce): Remove CPP_MIN and CPP_MAX. (num_binary_op): Ditto. * lex.c (_cpp_lex_direct): Ditto. (cpp_avoid_paste): Remove ? as legal symbol after > or <. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116140 138bc75d-0d04-0410-961f-82ee72b054a4
* * sv.po: Update.jsm282006-06-242-2/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114973 138bc75d-0d04-0410-961f-82ee72b054a4
* * be.po, ca.po, da.po, de.po, el.po, es.po, fr.po, ja.po, nl.po,jsm282006-06-2416-15/+20
| | | | | | | rw.po, sv.po, tr.po, vi.po, zh_CN.po, zh_TW.po: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114967 138bc75d-0d04-0410-961f-82ee72b054a4
* PR preprocessor/27746jakub2006-06-093-3/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * directives.c (do_pragma): Handle pragma with valid namespace and invalid name coming from macro expansion. * directives.c (destringize_and_run): Initialize next field in context. PR c/27747 PR c++/27748 * directives.c (destringize_and_run): Set NO_EXPAND on the tokens. * macro.c (_cpp_backup_tokens): Fix comment typo. testsuite/ PR c/27747 * gcc.dg/cpp/_Pragma6.c: New test. PR c++/27748 * g++.dg/cpp/_Pragma1.C: New test. PR preprocessor/27746 * gcc.dg/gomp/macro-3.c: New test. * gcc.dg/gomp/macro-4.c: New test. * g++.dg/gomp/macro-3.C: New test. * g++.dg/gomp/macro-4.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114519 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/, libcpp/drow2006-05-313-4/+23
| | | | | | | | | | | | * Makefile.in (CATALOGS): Add po/ prefix. * configure: Regenerated. config/ * gettext-sister.m4 (ZW_GNU_GETTEXT_SISTER_DIR): Provide some defines otherwise gotten from AM_GNU_GETTEXT. Remove the po/ prefix from CATALOGS. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114268 138bc75d-0d04-0410-961f-82ee72b054a4
* 2006-05-23 Carlos O'Donell <carlos@codesourcery.com>carlos2006-05-242-1/+6
| | | | | | | | * Makefile.in: Add install-html target. Add install-html to .PHONY git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114039 138bc75d-0d04-0410-961f-82ee72b054a4
* * de.po: Update.jsm282006-04-212-24/+28
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113146 138bc75d-0d04-0410-961f-82ee72b054a4
* * sv.po: Update.jsm282006-03-312-4/+8
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112580 138bc75d-0d04-0410-961f-82ee72b054a4
* * be.po, ca.po, da.po, de.po, el.po, es.po, fr.po, ja.po, nl.po,jsm282006-03-1316-1123/+1981
| | | | | | | | rw.po, sv.po, tr.po, vi.po, zh_CN.po: Update. * zh_TW.po: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111982 138bc75d-0d04-0410-961f-82ee72b054a4
* 2006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>dalecki2006-02-186-1/+62
| | | | | | | | | | | | | | | | | | | | | gcc/ChangeLog: * doc/cpp.texi (__TIMESTAMP__): Document. libcpp/ChangeLog: * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP. * files.c (_cpp_get_file_stat): New function. * include/cpplib.h (builtin_type): Add BT_TIMESTAMP. * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP. * internal.h (_cpp_get_file_stat): Prototype. (struct cpp_buffer): Add timestamp. gcc/testsuite/ChangeLog: * gcc.dg/cpp/undef3.c: New test. * gcc.dg/cpp/trad/builtins2.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111232 138bc75d-0d04-0410-961f-82ee72b054a4
* PR preprocessor/25717jakub2006-01-233-11/+22
| | | | | | | | | | | * init.c (cpp_init_builtins): If __STDC__ will not change value between system headers and other sources, define it as a normal macro rather than a builtin. * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check cpp_in_system_header condition. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110144 138bc75d-0d04-0410-961f-82ee72b054a4
* 2006-02-05 Paolo Bonzini <bonzini@gnu.org>bonzini2006-01-052-1/+5
| | | | | | | | * Makefile.in: Use -MMD instead of -MD. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109373 138bc75d-0d04-0410-961f-82ee72b054a4
* libcpp/rth2006-01-046-245/+279
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * directives.c (struct pragma_entry): Add is_deferred. Add ident entry to value union. (end_directive): Don't eat the line if in_deferred_pragma. (run_directive): Remove pragma hacks. (insert_pragma_entry): Remove. (new_pragma_entry): New. (register_pragma_1): Split out of register_pragma. Only handle the lookup tree and return the new entry. (cpp_register_pragma): Fill in the pragma entry here. (cpp_register_deferred_pragma): New. (register_pragma_internal): New. (_cpp_init_internal_pragmas): Use register_pragma_internal. (do_pragma): Allow pragma expansion after namespace. For deferred pragmas, don't slurp the line into a string. (destringize_and_run): Save tokens for deferred pragmas. (cpp_handle_deferred_pragma): Remove. * macro.c (builtin_macro): Remove pragma token hack. (_cpp_push_token_context): Rename from push_token_context and export. * internal.h (struct lexer_state): Add pragma_allow_expansion. (_cpp_push_token_context): Declare. * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return a token. Update the line number correctly if so. (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens. (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas. * include/cpplib.h (PRAGMA_EOL): New. (CPP_TOKEN_FLD_PRAGMA): New. (struct cpp_token): Add val.pragma. (struct cpp_options): Remove defer_pragmas. (cpp_handle_deferred_pragma): Remove. (cpp_register_deferred_pragma): Declare. gcc/ * c-lex.c (c_lex_with_flags) <CPP_PRAGMA>: Smuggle pragma id via integer constant. (pragma_lex): Remove. * c-pch.c (c_common_pch_pragma): Accept the name as an argument, rather than parsing it. * c-pragma.c (handle_pragma_weak, handle_pragma_redefine_extname, handle_pragma_extern_prefix): Add %< %> quotes. (registered_pragmas): New. (c_register_pragma_1): New. (c_register_pragma): Use it. (c_register_pragma_with_expansion): Likewise. (c_invoke_pragma_handler): New. (init_pragma): Use cpp_register_deferred_pragma directly for pch_preprocess. * c-pragma.h (enum pragma_kind): New. (pragma_handler): New. (c_invoke_pragma_handler): Declare. * c-common.c (c_parse_error): Pretty print CPP_PRAGMA and CPP_PRAGMA_EOL. * c-common.h (c_common_pch_pragma): Update decl. * Makefile.in (c-parser.o): Update dependencies. (GTFILES): Add c-pragma.h. * c-parser.c (struct c_token): Add pragma_kind. (struct c_parser): Add in_pragma. (c_lex_one_token): Always initialize keyword and pragma_kind. Extract data for CPP_PRAGMA. (c_parser_peek_2nd_token): Deny CPP_PRAGMA_EOL. (c_parser_consume_token): Don't allow CPP_PRAGMA unless errors. Don't allow CPP_PRAGMA_EOL if in_pragma. (c_parser_consume_pragma): New. (c_parser_skip_until_found): Stop on CPP_PRAGMA_EOL. (c_parser_skip_to_end_of_parameter): Likewise. (c_parser_skip_to_end_of_block_or_statement): Likewise. (c_parser_skip_to_pragma_eol): New. (c_parser_external_declaration): Handle CPP_PRAGMA. (c_parser_compound_statement_nostart): Likewise. (c_parser_statement_after_labels): Likewise. (c_parser_pragma): New. (pragma_lex): Likewise. (c_parser_pragma_pch_preprocess): New. (c_parser_new): Merge into ... (c_parse_file): ... here. Call c_parser_pragma_pch_preprocess. gcc/cp/ * lex.c (handle_pragma_java_exceptions): Fix whitespace. * parser.c (struct cp_token): Add pragma_kind. (eof_token): Update to match. (struct cp_lexer): Add in_pragma; rearrange next for better packing. (cp_parser_initial_pragma): New. (cp_lexer_new_main): Use it. Don't bother clearing c_lex_return_raw_strings. (cp_lexer_get_preprocessor_token): Always initialize keyword and pragma_kind fields. Handle CPP_PRAGMA. (cp_lexer_consume_token): Don't allow CPP_PRAGMA_EOL when in_pragma is set. (cp_lexer_handle_pragma): Remove. Update callers to cp_parser_pragma. (cp_lexer_print_token) <CPP_PRAGMA>: Don't print as a string. (cp_parser_skip_to_pragma_eol): New. (cp_parser_error): Use it. (cp_parser_skip_to_closing_parenthesis): Stop at CPP_PRAGMA_EOL; rearrange with switch statement. (cp_parser_skip_to_end_of_statement): Likewise. (cp_parser_skip_to_end_of_block_or_statement): Likewise. (cp_parser_skip_to_closing_brace): Likewise. (cp_parser_skip_until_found): Likewise. (cp_parser_statement): Add in_compound argument; update callers. Use it to decide how to handle pragma parsing. (cp_parser_labeled_statement): Add in_compound argument; pass it on to cp_parser_statement. (cp_parser_statement_seq_opt): Stop at CPP_PRAGMA_EOL. (cp_parser_declaration_seq_opt): Likewise. (cp_parser_parameter_declaration): Likewise. (cp_parser_member_specification_opt): Likewise. (cp_parser_function_definition_after_decl): Likewise. (cp_parser_cache_group): Handle CPP_PRAGMA/CPP_PRAGMA_EOL pairs. (cp_parser_pragma): New. (pragma_lex): New. gcc/testsuite/ * g++.dg/parse/pragma2.C: Update expected error lines. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109336 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/25294jakub2005-12-312-4/+56
| | | | | | | | | | | | * directives.c (do_pragma): If pragma line ends with multi-line block comment, end the saved deferred pragma string before that comment. Handle embedded '\0' chars on the pragma line. * gcc.dg/pragma-pack-3.c: New test. * g++.dg/parse/pragma3.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109201 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>reichelt2005-12-222-0/+7
| | | | | | | | | | | | | | | | | PR c++/23333 * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure. * c-lex.c (c_lex_with_flags): Add PURE_ZERO to cpp_flags if number is a single digit '0'. * parser.c (cp_parser_pure_specifier): Check for PURE_ZERO to identify a single '0'. * g++.dg/parse/error25.C: Add more tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108947 138bc75d-0d04-0410-961f-82ee72b054a4
* * include/cpplib.h (CPP_N_DFLOAT): New.bje2005-12-063-2/+31
| | | | | | | | | * expr.c (interpret_float_suffix): Identify df, dd, and dl suffixes as decimal floating point constants. (cpp_classify_number): Disallow hexadecimal DFP constants. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108133 138bc75d-0d04-0410-961f-82ee72b054a4
* * vi.po: Update.jsm282005-12-062-162/+163
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108117 138bc75d-0d04-0410-961f-82ee72b054a4
* * zh_CN.po: New file.jsm282005-12-032-0/+854
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107981 138bc75d-0d04-0410-961f-82ee72b054a4
* * be.po, ca.po, da.po, de.po, el.po, es.po, fr.po, ja.po, nl.po,jsm282005-12-0114-14158/+2202
| | | | | | | rw.po, sv.po, tr.po, vi.po: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107808 138bc75d-0d04-0410-961f-82ee72b054a4
* * cpplib.pot: Regenerate.jsm282005-11-202-99/+112
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107256 138bc75d-0d04-0410-961f-82ee72b054a4
* * include/cpplib.h (struct cpp_callbacks): Annotate error withgerald2005-11-142-1/+7
| | | | | | | ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106891 138bc75d-0d04-0410-961f-82ee72b054a4