| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* c-pragma.h (c_lex_string_translate): Change type to int.
* c-parse.in: Change all assignments of c_lex_string_translate
to true and false to 1 and 0.
* c-lex.c (c_lex_string_translate): Likewise.
(lex_string): Convert string without translation in the -1
case.
gcc/cp/ChangeLog:
* parser.c: Change all assignments of c_lex_string_translate
to true and false to 1 and 0.
(cp_lexer_read_token): Convert type of the translated string.
(cp_parser_skip_to_closing_parentheses): Preserve original
value of c_lex_string_translate, and set it to -1 while
running.
(cp_parser_cache_group): Likewise.
(cp_parser_cache_group_1): Renamed.
(cp_parser_asm_operand_list): Remove redundant setting of
c_lex_string_translate.
(cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
Handle chained strings.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83201 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile.in (EXPR_H): Add insn-config.h, function.h,
$(RTL_H), flags.h, $(TREE_H), $(MACHMODE_H), $(EXPR_H).
(ALIAS_H, EMIT_RTL_H): New.
(cselib.o): Replace EXPR_H with EMIT_RTL_H.
(cfgcleanup.o): Add EMIT_RTL_H.
(alias.o): Replace EXPR_H with EMIT_RTL_H and ALIAS_H.
* alias.c: Replace expr.h with emit-rtl.h and alias.h.
* attribs.c, c-lex.c, c-obj-common.c, c-semantics.c: Remove expr.h.
* cfgcleanup.c, cselib.c: Replace expr.h with emit-rtl.h.
* expr.h: Add include guard. Include function.h, rtl.h, flags.h,
tree.h, machmode.h, insn-config.h, alias.h, emit-rtl.h.
(get_varargs_alias_set, get_frame_alias_set, record_base_value,
record_alias_subset, new_alias_set, can_address_p): Move to alias.h.
(set_mem_alias_set, set_mem_align, set_mem_expr, set_mem_offset,
set_mem_size): Move to emit-rtl.h.
* emit-rtl.h: New.
* alias.h: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82568 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/target-supports.exp (check-iconv-available): New function.
* lib/gcc-dg.exp (dg-require-iconv): New function.
Use above.
* gcc.dg/charset: New directory.
* gcc.dg/charset/charset.exp: New file.
* gcc.dg/charset/asm1.c: Ditto.
* gcc.dg/charset/asm2.c: Ditto.
* gcc.dg/charset/asm3.c: Ditto.
* gcc.dg/charset/asm4.c: Ditto.
* gcc.dg/charset/asm5.c: Ditto.
* gcc.dg/charset/attribute1.c: Ditto.
* gcc.dg/charset/attribute2.c: Ditto.
* gcc.dg/charset/string1.c: Ditto.
* g++.dg/charset: New directory.
* g++.dg/dg.exp: Add here. Special options.
* g++.dg/charset/charset.exp: New file.
* g++.dg/charset/asm1.c: Ditto.
* g++.dg/charset/asm2.c: Ditto.
* g++.dg/charset/asm3.c: Ditto.
* g++.dg/charset/asm4.c: Ditto.
* g++.dg/charset/attribute1.c: Ditto.
* g++.dg/charset/attribute2.c: Ditto.
* g++.dg/charset/extern1.cc: Ditto.
* g++.dg/charset/extern2.cc: Ditto.
* g++.dg/charset/string1.c: Ditto.
2004-02-26 Eric Christopher <echristo@redhat.com>
* c-lex.c (c_lex_string_translate): New variable.
(lex_string): Use to determine string translation.
* c-pragma.h: Prototype.
* c-parse.in (start_string_translation): New. Set above.
(stop_string_translation): Ditto.
(attribute, attribute_list, asm_def, asm_stmt,
asm_operand): Use above functions.
* cp/parser.c (cp_parser_declaration): Translate strings
unless token is RID_EXTERN. Set c_lex_string_translate
for recursive use.
(cp_parser_asm_definition): Only translate argument strings
to asms.
(cp_parser_asm_operand_list): Ditto.
(cp_parser_attribute_list): Do not translate attribute strings.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78548 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "next available source_location" is now managed internally by
line-maps.c rather than by clients.
* line-map.h (struct line_map): New field column_bits.
<from_line>: Rename field to start_location.
(struct line_maps): New fields highest_location and max_column_hint.
(linemap_check_files_exited): New declaration.
(linemap_line_start): New declaration.
(linemap_add): Remove from_line parameter; use highest_location field.
(SOURCE_LINE, LAST_SOURCE_LINE): Modify to use column_bits.
(SOURCE_COLUMN, LAST_SOURCE_LINE_LOCATION): New macros.
(CURRENT_LINE_MAP): Remove macro.
(linemap_position_for_column): New inline function.
* line-map.c (linemap_init): Clear new fields.
(linemap_check_files_exited): New function, extracted from ...
(linemap_free): Use linemap_check_files_exited.
(linemap_add): Remove from_line parameter. Various updates.
(linemap_line_start): New function.
(linemap_lookeup): Update for new field names.
* cpphash.h (struct cpp_reader) <map>: Field removed. Because
linemap_position_for_column may unpredictably change the current map,
it is cleaner and simpler for us to not cache it in cpp_reader.
(struct cpp_buffer): New sysp field.
Changed warned_cplusplus_comments and from_stage3 to bitfields.
* cppinit.c (cpp_read_min_file): pfile->map no longer exists.
* cpplib.c (do_line, do_linemarker, _cpp_do_file_change): Get
current map using linemap_lookup.
(do_linemarker): Also set buffer's sysp field.
(destringize_and_run): No longer need to decrement current line.
* cppfiles.c (_cpp_stack_file): Set sysp from and in buffer.
(search_path_head, open_file_failed): Use buffer's sysp.
(cpp_make_system_header): Get current map using linemap_lookup.
Also set buffer's sysp flag.
* cppmacro.c (_cpp_builtin_macro_text): Likewise use linemap_lookup.
* cpphash.h (CPP_INCREMENT_LINE): New macro.
(struct cpp_buffer): Moved fields saved_cur, saved_rlimit to ...
(struct cpp_reader): ... and adding saved_line_base field.
* cpptrad.c (_cpp_overlay_buffer, _cpp_remove_overlay):
Update accordingly. Don't adjust line.
(_cpp_scan_out_logical_line): Use CPP_INCREMENT_LINE.
* cpphash.c (CPP_IN_SYSTEM_HEADER): Replaced macro by ...
(cpp_in_system_header): ... new inline function, using buffer's sysp.
* cpperror.c (_cpp_begin_message): Update to use cpp_in_system_header.
* cpplex.c (_cpp_lex_direct): Likewise.
* cppmacro.c (_cpp_builtin_macro_text): Likewise.
* cppmacro.c (_cpp_create_definition): Use buffer's sysp field.
* cpplib.h (struct cpp_token): Rename line field to src_loc.
Remove col field as it is now subsumed by src_loc.
* cpperror.c: Update various field, parameter, and macro names.
(print_location): If col==0, try SOURCE_COLUMN of line.
(cpp_error): Use cur_token's src_loc field, rather than line+col.
* cpplib.c (do_diagnostic): Token's src_loc fields replaces line+col.
* cpplex.c (_cpp_process_line_notes, _cpp_lex_direct,
_cpp_skip_block_comment): Use CPP_INCREMENT_LINE.
(_cpp_temp_token): Replace cpp_token's line+col fields by src_loc.
(_cpp_get_fresh_line): Don't need to adjust line for missing newline.
(_cpp_lex_direct): Use linemap_position_for_column.
* c-ppoutput.c (maybe_print_line, print_line): Don't take map
parameter. Instead get it from the line_table global. Adjust callers.
(print): Remove map field. Replace line field to src_line.
(init_pp_output, account_for_newlines, maybe_print_line): Adjust.
(cb_line_change): Use SOURCE_COLUMN. Minor optimizations.
(pp_file_change): Use MAIN_FILE_P since we cannot checked print.map.
Use LAST_SOURCE_LINE_LOCATION to "catch up" after #include.
* cpptrad.c (copy_comment): Rename variable.
* c-lex.c (map): Remove static variable, for same reason we removed
cpp_reader's map field.
(cb_line_change, cb_def_pragma, cb_define, cb_undef): Hence we need
to call linemap_lookup.
(cb_line_change): Token's line field replaced by src_loc.
(fe_file_change): Use MAINFILE_P and LAST_SOURCE_LINE macros.
Don't save new_map.
* cpphash.h, cpperror.c, cpplib.h: Some renames of fileline to
source_location.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77663 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* c-ppoutput.c (pp_dir_change): New function.
* c-common.h (pp_dir_change): New declaration.
* cpplib.h (struct cpp_options): Remove working_directory field.
* cppinit.c (cpp_find_main_file, cpp_push_main_file): Merge back to
(cpp_read_main_file): as before 10-01. Call _cpp_stack_file.
Don't handle -fworking_directory here, but in c_common_post_options.
(read_original_directory): Don't back up when done.
Don't clear no-longer used working_directory flag.
* cpplib.h: Update declarations to match.
* c-lex.c (cb_dir_change): Move to c-opts.c.
(init_c_lex): Don't set dir_change callback here, since we want
to set it even if flag_preprocess_only.
* c-opts.c (cb_dir_change): Function moved from c-lex.c.
(c_common_post_options): Set dir_change callback.
Call pp_dir_change if approporiate.
(finish_options): Don't call cpp_find_main_file here. Hence remove
unneeded parameter and result. Do LC_RENAME for <built-in>.
(c_common_post_options): Call cpp_read_main_file here instead.
(c_common_init): Update accordingly.
(push_command_line_include): Don't cpp_push_main_file.
Do LC_RENAME rather than LC_LEASE to get back to main file.
Compared to pre-10-01 version, inline cpp_rename_to_main_file.
(c_common_parse_file): Call cpp_read_main_file for subsequent main
files, but call finish_options for all files.
* c-opts.c (sanitize_cpp_opts): Don't set cpp_opts->working_directory.
* fix-header.c (read_scan_file): Call cpp_read_main_file instead of
cpp_find_main_file + cpp_push_main_file.
* c-lex.c (fe_file_change): Don't set main_input_filename here.
* opts.c (handle_options): Only set main_input_filename first time.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77303 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cfghooks.h, cfglayout.c, cfgloopmanip.c, debug.c, debug.h,
flow.c, genextract.c, ggc-common.c, ggc-page.c, ggc.h,
ifcvt.c, jump.c, loop-unswitch.c, timevar.c, timevar.def,
tree-optimize.c, vmsdbgout.c, config/fp-bit.c,
config/alpha/alpha.c, config/alpha/alpha.h,
config/alpha/alpha.md, config/alpha/unicosmk.h,
config/alpha/vms.h, config/arm/linux-elf.h, config/avr/avr.c,
config/c4x/c4x-protos.h, config/c4x/c4x.md,
config/d30v/d30v.h, config/frv/frv.md, config/frv/frvbegin.c,
config/frv/frvend.c, config/i386/cygming.h,
config/i386/djgpp.h, config/i386/emmintrin.h,
config/i386/gthr-win32.c, config/i386/i386-interix.h,
config/i386/i386-protos.h, config/i386/openbsd.h,
config/i386/winnt.c, config/i386/xm-mingw32.h,
config/i386/xmmintrin.h, config/ia64/ia64.md,
config/iq2000/iq2000.md, config/m32r/m32r.md,
config/m68k/m68k.md, config/mcore/mcore-elf.h,
config/mcore/mcore.md, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris5gas.h, config/mips/iris6.h,
config/mips/iris6gas.h, config/mips/linux.h,
config/mips/mips.md, config/mips/netbsd.h,
config/mips/openbsd.h, config/mips/windiss.h,
config/pa/fptr.c, config/rs6000/aix.h,
config/rs6000/altivec.h, config/rs6000/darwin.h,
config/rs6000/xcoff.h, config/s390/s390-protos.h,
config/s390/s390.c, config/s390/s390.h, config/s390/s390.md,
config/sh/netbsd-elf.h, config/sh/sh.h, config/sh/vxworks.h,
config/sparc/sol2.h: Update copyright.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77018 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
| |
(c_lex_with_flags): Add new parameter to get CPP flags.
(c_lex): Thunk to c_lex_with_flags while keeping the old interface.
* c-pragma.h (c_lex_with_flags): Declare.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76844 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
| |
* fix-header.c (cb_file_change): Likewise.
* c-ppoutput.c (pp_file_change): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72011 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
| |
(cb_line_change): Set input_line directly, instead of src_line.
(get_non_padding_token): We no longer need to compensate for the
"horrible things" the C++ front-end does with the current line number,
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72010 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
| |
* c-lex.c (cb_line_change): Skip line changing whenever
c-ppoutput.c would.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71381 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
| |
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71328 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/cpp.texi, doc/invoke.texi, doc/cppopts.texi: Document it.
* c-common.h (flag_working_directory): Declare.
* c-common.c (flag_working_directory): Define.
* c-opts.c (c_common_handle_options): Set it.
(sanitize_cpp_opts): Set...
* cpplib.h (struct cpp_options): ... working_directory option.
(struct cpp_callbacks): Add dir_change.
* cppinit.c (read_original_filename): Call...
(read_original_directory): New. Look for # 1 "directory//"
and process it.
(cpp_read_main_file): Call dir_change callback if working_directory
option is set.
* gcc.c (cpp_unique_options): Pass -g*.
* c-lex.c (cb_dir_change): New.
(init_c_lex): Set dir_change callback.
* toplev.c (src_pwd): New static variable.
(set_src_pwd, get_src_pwd): New functions.
* toplev.h (get_src_pwd, set_src_pwd): Declare.
* dbxout.c (dbxout_init): Call get_src_pwd() instead of getpwd().
* dwarf2out.c (gen_compile_unit_die): Likewise.
* dwarfout.c (output_compile_unit_die, dwarfout_init): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70189 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* c-common.c (allow_pch): Remove.
* c-common.h (allow_pch): Remove.
(c_common_no_more_pch): Declare.
* c-lex.c (c_lex): Call c_common_no_more_pch when appropriate.
* c-pch.c: Include hosthooks.h.
(c_common_valid_pch): Don't check allow_pch.
(c_common_read_pch): Clear valid_pch to prevent reading PCH files.
(c_common_no_more_pch): New.
* ggc-common.c: Include hosthooks.h.
(gt_pch_save): Call gt_pch_get_address.
(gt_pch_restore): Call gt_pch_use_address.
* hooks.c (hook_voidp_size_t_null): New.
(hook_bool_voidp_size_t_false): New.
* hooks.h (hook_voidp_size_t_null): New.
(hook_bool_voidp_size_t_false): New.
* hosthooks-def.h (HOST_HOOKS_GT_PCH_GET_ADDRESS): New.
(HOST_HOOKS_GT_PCH_USE_ADDRESS): New.
(HOST_HOOKS_INITIALIZER): Add HOST_HOOKS_GT_PCH_GET_ADDRESS,
HOST_HOOKS_GT_PCH_USE_ADDRESS.
* hosthooks.h (struct host_hooks): Add gt_pch_get_address,
gt_pch_use_address.
* doc/hostconfig.texi (Host Common): Document
HOST_HOOKS_GT_PCH_GET_ADDRESS, HOST_HOOKS_GT_PCH_USE_ADDRESS.
* Makefile.in (c-pch.o): Depend on hosthooks.h.
(ggc-common.o): Likewise.
* config/rs6000/host-darwin.c (HOST_HOOKS_GT_PCH_GET_ADDRESS): Define.
(HOST_HOOKS_GT_PCH_USE_ADDRESS): Define.
(pch_address_space): New.
(darwin_rs6000_gt_pch_get_address): New.
(darwin_rs6000_gt_pch_use_address): New.
Index: cp/ChangeLog
2003-07-29 Geoffrey Keating <geoffk@apple.com>
* parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
of setting valid_pch by hand.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69944 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
c-common.c c-decl.c c-incpath.c c-lex.c c-opts.c c-parse.in
c-pragma.c c-typeck.c calls.c cfg.c cfganal.c cfgloop.c cfgrtl.c
collect2.c combine.c conflict.c coverage.c cppexp.c cppfiles.c
cpphash.c cppinit.c cpplex.c cpplib.c cppmacro.c cppspec.c
cpptrad.c cse.c cselib.c dbxout.c defaults.h df.c dominance.c
dwarf2out.c dwarfout.c emit-rtl.c except.c expmed.c expr.c final.c
fix-header.c flow.c fold-const.c function.c gcc.c gccspec.c gcov.c
gcse.c genattr.c genattrtab.c genautomata.c genconditions.c
genemit.c genextract.c genoutput.c genrecog.c gensupport.c
ggc-page.c ggc-simple.c global.c graph.c haifa-sched.c hashtable.c
integrate.c jump.c langhooks.c lcm.c line-map.c local-alloc.c
loop.c mips-tdump.c mips-tfile.c mkdeps.c optabs.c params.c
postreload.c prefix.c print-tree.c protoize.c ra-build.c
ra-colorize.c ra-rewrite.c ra.c recog.c reg-stack.c regclass.c
regmove.c regrename.c reload.c reload1.c reorg.c resource.c
sbitmap.c sched-deps.c sched-rgn.c sched-vis.c sdbout.c
simplify-rtx.c ssa-ccp.c ssa.c stmt.c stor-layout.c timevar.c
tlink.c toplev.c tree-dump.c tree.c unroll.c unwind-dw2-fde.c
varasm.c varray.c vmsdbgout.c xcoffout.c: Remove unnecessary
casts.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69587 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
| |
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69138 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(struct cpp_options): Add narrow_charset, wide_charset,
bytes_big_endian fields. Remove EBCDIC field.
(cpp_init_iconv, cpp_interpret_string): New external interfaces.
* cpphash.h: Include <iconv.h> if we have it, otherwise
provide a dummy definition of iconv_t.
(struct cpp_reader): Add narrow_cset_desc and wide_cset_desc fields.
(_cpp_valid_ucn): Update prototype.
(_cpp_destroy_iconv): New prototype.
* doc/cpp.texi: Document character set handling.
* doc/cppopts.texi: Document -fexec-charset= and -fexec-wide-charset=.
* doc/extend.texi: Delete entire section on multiline strings.
Rewrite section on __FUNCTION__ etc now that these are
variables in C.
* cppucnid.tab, cppucnid.pl: New files.
* cppucnid.h: New generated file.
* cppcharset.c: Include cppucnid.h. Lots of commentary added.
(iconv_open, iconv, iconv_close): Provide dummy definitions
if !HAVE_ICONV.
(SOURCE_CHARSET, struct strbuf, init_iconv_desc, cpp_init_iconv,
_cpp_destroy_iconv, convert_cset, width_to_mask, convert_ucn,
emit_numeric_escape, convert_hex, convert_oct, convert_escape,
cpp_interpret_string, narrow_str_to_charconst,
wide_str_to_charconst): New.
(ucn_valid_in_identifier): Use a binary search through the
ucnranges table defined in cppucnid.h, not a long chain of if
statements.
(_cpp_valid_ucn): Add a limit pointer. Downgrade "universal
character names are only valid in C++ and C99" to a warning.
Issue the "meaning of \[uU] is different in traditional C"
warning here. Take care not to let iconv see an invalid UCS
value if we get a malformed UCN. Issue an error if we don't
have iconv.
(cpp_interpret_charconst): Moved here from cpplex.c. Use
cpp_interpret_string to do the heavy lifting.
* cppinit.c (cpp_create_reader): Initialize bytes_big_endian,
narrow_charset, wide_charset fields of options structure.
(cpp_destroy): Call _cpp_destroy_iconv.
* cpplex.c (forms_identifier_p): Adjust call to _cpp_valid_ucn.
(maybe_read_ucn, hex_digit_value, cpp_parse_escape): Delete.
(cpp_interpret_charconst): Moved to cppcharset.c.
* cpplib.c (dequote_string): Delete.
(interpret_string_notranslate): New.
(do_line, do_linemarker): Use interpret_string_notranslate.
* Makefile.in (cppcharset.o): Depend on cppucnid.h.
* c-common.c (fname_string, combine_strings): Delete.
* c-common.h (fname_string, combine_strings): Delete prototypes.
* c-lex.c (ignore_escape_flag): Delete.
(cb_ident): Use cpp_interpret_string, not lex_string.
(get_nonpadding_token): New function.
(c_lex): Handle Objective-C @-prefixed identifiers and strings here.
Adjust calls to lex_string. Don't write *value twice.
(lex_string): Now handles string constant concatenation.
Most of the work handed off to cpp_interpret_string.
Call fix_string_type here.
* c-parse.in (STRING_FUNC_NAME, VAR_FUNC_NAME): Replace with
FUNC_NAME, throughout.
(OBJC_STRING): New token type.
(primary:STRING): No need to call fix_string_type here.
(primary:objc_string): Make that OBJC_STRING.
(objc_string nonterminal): Delete.
(yylexname): Delete code to handle fake string constants.
(yylexstring): Delete entirely.
(_yylex): Handle CPP_AT_NAME and CPP_OBJC_STRING. No need
to handle CPP_ATSIGN.
* c.opt (-fexec-charset=, -fwide-exec-charset=): New options.
* c-opts.c (missing_arg, c_common_handle_option): Handle
OPT_fexec_charset_ and OPT_fwide_exec_charset_.
(c_common_init): Set cpp_opts->bytes_big_endian, not
cpp_opts->EBCDIC. Call cpp_init_iconv.
(print_help): Document -fexec-charset= and -fexec-wide-charset=.
(TARGET_EBCDIC): Delete default definition.
* objc/objc-act.c (build_objc_string_object): No need to
handle string constant concatenation.
cp:
* parser.c (cp_lexer_read_token): No need to handle string
constant concatenation.
testsuite:
* gcc.c-torture/execute/wchar_t-1.x: New file; XFAIL wchar_t-1.c
everywhere.
* gcc.dg/concat.c: Concatenation of string constants with
__FUNCTION__ / __PRETTY_FUNCTION__ is now a hard error.
* gcc.dg/wtr-strcat-1.c: Loosen dg-warning regexp.
* gcc.dg/cpp/escape-2.c: Use wide character constants where
necessary to avoid multi-character character constant warning.
* gcc.dg/cpp/escape.c: Likewise.
* gcc.dg/cpp/ucs.c: Likewise.
Remove backslashes from dg-bogus comments, as they confuse Tcl.
Fix a typo.
libstdc++-v3:
* testsuite/22_locale/collate/compare/wchar_t/2.cc
* testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc
* testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc
* testsuite/22_locale/collate/hash/wchar_t/2.cc
* testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc
* testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc
* testsuite/22_locale/collate/transform/wchar_t/2.cc
* testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc
* testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc:
XFAIL on all targets.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68952 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(fix_string_type, check_case_value, c_common_nodes_and_builtins,
c_add_case_label, finish_label_addr_expr, boolean_increment):
Use c_dialect_ macros.
* c-common.h (enum c_language_kind): Extend.
(c_dialect_cxx, c_dialect_objc): New.
(flag_objc): Remove.
(c_common_init_options): Update prototype.
* c-cppbuiltin.c (define__GNUC__, c_cpp_builtins): Use c_dialect_
macros.
* c-decl.c (finsih_decl, grokfield, finish_struct): Use c_dialect_
macros.
* c-format.c (C_STD_VER, C_STD_NAME): Similarly.
* c-lang.c (c_init_options): Remove.
(c_language): Define.
(LANG_HOOKS_INIT_OPTIONS): Use common hook.
* c-lex.c (lex_charconst): Use c_dialect_cxx().
* c-opts.c (lang_flags): Make function-local.
(c_common_init_options): Use c_dialect_ macros. Handle
C++ diagnostic requirements.
(c_common_handle_option, c_common_post_options): Use flag_cxx.
* c-parse.in (init_reswords): Use c_dialect_objc ().
* c-pch.c (get_ident): Use c_language.
* c-pretty-print.c (pp_c_bool_literal): Use c_dialect_ macros.
* c-typeck.c (comptypes, build_c_cast): Similarly.
* objc/objc-lang.c (c_language): Define.
(LANG_HOOKS_INIT_OPTIONS): Use common hook.
(objc_init_options): Remove.
cp:
* Make-lang.in: Update.
* cp-lang.c (c_language): Define.
(LANG_HOOKS_INIT_OPTIONS): Use common hook.
* cp-tree.h (cxx_init_options): Remove.
* lex.c: Don't include diagnostic.h.
(cxx_init_options): Remove.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68734 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* c-objc-common.c: Likewise.
* c-opts.c: Likewise.
* c-pch.c: Likewise.
* c-ppoutput.c: Likewise.
* c-pragma.h: Likewise.
* c-pretty-print.c: Likewise.
* c-pretty-print.h: Likewise.
* c-semantics.c: Likewise.
* c-tree.h: Likewise.
* c-typeck.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68327 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tree.h: Remove declaration of approx_sqrt.
* c-lex.c: Remove redundant declaration of asm_out_file.
* flags.h: Remove declaration of warn_unknown_pragma and
main_input_filename.
* rtl.h: Remove functions from fold-const.c since they're already
declared in tree.h.
* regs.h: Remove redundant declaration of reg_names.
cp:
* cp-tree.h: Remove duplicated declarations.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68193 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(input_line): ... here.
* tree.h (lineno): Rename to ...
(input_line): ... here.
* scan.h (lineno): Rename to ...
(input_line): ... here.
* toplev.c (lineno): Rename to ...
(input_line): ... here.
(push_srcloc, pop_srcloc): Rename lineno to input_line.
* c-common.c (c_expand_start_cond, fname_decl): Likewise.
* c-decl.c (poplevel, pop_label_level, lookup_label, lookup_tag,
store_parm_decls, c_expand_body_1): Likewise.
* c-errors.c (pedwarn_c99): Likewise.
* c-format.c (status_warning): Likewise.
* c-lex.c (fe_file_change, cb_def_pragma, c_lex): Likewise.
* c-opts.c (c_common_post_options, c_common_parse_file): Likewise.
* c-parse.in (save_filename, maybe_type_qual, ifc): Likwise.
* c-semantics.c (finish_stmt_tree, build_stmt, emit_local_var,
gentrtl_goto_stmt, genrtl_expr_stmt_value, genrtl_decl_stmt,
genrtl_if_stmt, genrtl_while_stmt, genrtl_do_stmt,
genrtl_return_stmt, genrtl_for_stmt, build_break_stmt,
build_continue_stmt, genrtl_switch_stmt, genrtl_asm_stmt,
prep_stmt, find_reachable_label, expand_unreachable_stmt): Likewise.
* coverage.c (create_coverage): Likewise.
* diagnostic.c (pedwarn, sorry, error, fatal_error,
internal_error, warning, diagnostic_report_current_module,
inform): Likewise.
* expr.c (expand_expr): Likewise.
* integrate.c (expand_inline_function,
output_inline_function): Likewise.
* rtl-error.c (file_and_line_for_asm): Likewise.
* tree-inline.c (find_alloca_call, find_builtin_longjmp_call,
walk_tree): Likewise.
* tree.c (make_node): Likewise.
* ada, cp, f, java, objc, treelang: Likewise.
ada
* trans.c (build_unit_elab, set_lineno): Rename lineno to
input_line.
* utils.c (pushdecl, create_label_decl, begin_subprog_body,
end_subprog_body): Likewise.
* utils2.c (build_call_raise): Likewise.
cp
* class.c (finish_struct): Rename lineno to input_line.
* decl.c (push_binding_level, pop_binding_level,
suspend_binding_level, resume_binding_level, make_label_decl,
use_label, start_function): Likewise.
* decl2.c (warn_if_unknown_interface,
start_static_initialization_or_destruction,
generate_ctor_or_dtor_function, finish_file): Likewise.
* error.c (cp_line_of, print_instantiation_full_context,
print_instantiation_context): Likewise.
* except.c (check_handlers_1, check_handlers): Likewise.
* init.c (create_temporary_var): Likewise.
* method.c (use_thunk, synthesize_method): Likewise.
* parser.c (cp_lexer_set_source_position_from_token,
cp_lexer_get_preprocessor_token): Likewise.
* pt.c (push_tinst_level, pop_tinst_level,
tsubst_friend_function, instantiate_class_template, tsubst_decl,
tsubst, tsubst_expr, instantiate_decl): Likewise.
* semantics.c (genrtl_try_block, finish_label_stmt,
begin_class_definition, expand_body,
genrtl_finish_function): Likewise.
* tree.c (build_min_nt, build_min): Likewise.
f
* ansify.c (die_unless): Rename lineno to input_line.
* com.c (ffecom_subscript_check_, ffecom_do_entry_,
ffecom_gen_sfuncdef_, ffecom_start_progunit_,
ffecom_sym_transform_, ffecom_sym_transform_assign_,
bison_rule_pushlevel_, bison_rule_compstmt_, finish_function,
store_parm_decls): Likewise.
* intrin.c (ffeintrin_fulfill_generic): Likewise.
* lex.c (ffelex_hash_, ffelex_include_, ffelex_next_line_,
ffelex_file_fixed, ffelex_file_free): Likewise.
* std.c (ffestd_exec_end): Likewise.
* ste.c (ffeste_emit_line_note_, ffeste_start_block_,
ffeste_start_stmt_): Likewise.
* ste.h (ffeste_filelinenum, ffeste_set_line): Likewise.
java
* lex.h (lineno): Rename to ...
(input_line): ... here
* parse-scan.y (lineno): Rename to ...
(input_line): ... here.
(reset_report): Rename lineno to input_line.
* check-init.c (check_init): Likewise.
* class.c (push_class): Likewise.
* decl.c (complete_start_java_method, end_java_method): Likewise.
* expr.c (expand_byte_code): Likewise.
* jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
* jcf-write.c (generate_bytecode_insns): Likewise.
* lex.c (java_init_lex, java_allocate_new_line,
do_java_lex): Likewise.
* parse.h (YYNOT_TWICE): Likewise.
* parse.y (empty_statement, expression_statement,
java_pop_parser_context, java_parser_context_save_global,
yyerror, register_fields, method_header, safe_layout_class,
find_in_imports_on_demand, create_artificial_method,
source_end_java_method, start_complete_expand_method,
build_thisn_assign, java_complete_lhs,
maybe_absorb_scoping_block): Likewise.
objc
* objc-act.c (objc_init): Rename lineno to input_line.
(build_module_descriptor, build_selector_translation_table,
build_protocol_template, build_method_prototype_list_template,
build_category_template, build_selector_table,
build_class_template, build_super_template, build_ivar_template,
build_ivar_list_template, build_method_list_template,
build_method_template, add_instance_variable): Likewise.
treelang
* tree1.c (treelang_init): Rename lineno to input_line.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66333 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* c-lex.c (MULTIBYTE_CHARS): Remove conditionals.
(lex_string): Take cpp_string with full spelling.
(cb_ident): Update.
(c_lex): Update diagnostics.
* cpplex.c (SPELL_NUMBER, SPELL_STRING): Combine into SPELL_LITERAL.
(create_literal): New.
(lex_string): Unterminated literals have type CPP_OTHER.
(_cpp_lex_direct): Update calls to lex_string. Use create_literal
for CPP_OTHER.
(cpp_token_len, cpp_spell_token, cpp_output_token): Simplify.
(_cpp_equiv_tokens, cpp_interpret_charconst): Update.
* cpplib.c (parse_include, do_line, do_linemarker,
destringize_and_run): Update for token storing full spelling.
* cpplib.h: Update token spelling types.
* cppmacro.c (stringify_arg, check_trad_stringification):
Update for token storing full spelling.
cp:
* Make-lang.in (lex.o): Remove mbchar.h.
* lex.c (MULTIBYTE_CHARS): Lose.
* parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
in c-lex.c.
testsuite:
* gcc.dg/cpp/include2.c: Update.
* gcc.dg/cpp/multiline-2.c: New.
* gcc.dg/cpp/multiline.c: Update.
* gcc.dg/cpp/strify2.c: Update.
* gcc.dg/cpp/trad/literals-2.c: Update.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66019 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* cppexp.c (_cpp_parse_expr): Similarly.
* cpplex.c (SPELL_CHAR): Remove.
(_cpp_lex_direct): Stray chars are saved as byte strings.
(cpp_spell_token, cpp_output_token, _cpp_equiv_token): Don't
handle SPELL_CHAR.
(cpp_avoid_paste): Update handling of CPP_OTHER.
* cpplib.h: Spell CPP_OTHER like a number.
(struct cpp_token): Remove member c.
* cppmacro.c (stringify_arg): Update handling of CPP_OTHER.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65951 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(cppcharset.o): New target.
* c-lex.c (is_extended_char): Move to cppcharset.c.
(utf8_extend_token): Delete.
* cppcharset.c: New file.
* cpphash.h (_cpp_valid_ucn): New.
* cpplex.c (lex_identifier): Update prototype.
(continues_identifier_p): Rename forms_identifier_p. Handle UCN
escapes.
(maybe_read_ucs): Rename maybe_read_ucn. Update to use code
in cppcharset.c.
(lex_number, lex_identifier, cpp_parse_escape): Update.
(_cpp_lex_direct): Update to handle UCNs.
(cpp_avoid_paste): Don't paste to form a UCN.
testsuite:
* ucs.c: Update diagnostic messages.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65845 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* c-common.h (cb_register_builtins): Rename c_cpp_builtins.
* c-lex.c (init_c_lex): Register builtins hook is dead.
* c-opts.c (COMMAND_LINE_OPTIONS, missing_arg): Handle -A, -D and -U.
(c_common_decode_option): Don't call cpp_handle_option.
Handle -A, -D and -U.
(handle_deferred_opts): Simplify.
(finish_options): Define builtins and command line macros.
* c-ppoutput.c (init_pp_output): Register builtins hook is dead.
* cppinit.c: Don't include intl.h.
(init_builtins): Rename cpp_init_builtins. No hook to call.
(init_library): Don't need to sort options.
(cpp_create_reader): Don't set pending.
(cpp_destroy): Don't free pending.
(struct pending_option, cl_directive_handler, struct cpp_pending,
APPEND, free_chain, new_pending_directive, parse_option, opt_comp,
cpp_finish_options, COMMAND_LINE_OPTIONS, DEF_OPT, struct cl_option,
cl_options, cpp_handle_option): Remove.
* cpplib.h (struct cpp_pending, register_builtins, cpp_handle_option,
cpp_finish_options): Remove.
(cpp_init_builtins): New.
* fix-header.c (read_scan_file): Update to handle -D. Fix
handling of -I. Replace call to cpp_finish_options.
cp:
* Make-lang.in: Update.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64398 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
| |
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64373 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* c-common.h (init_pp_output): New.
(preprocess_file): Update.
* c-lex.c (init_c_lex): Move mbchar initialization to cpplib.
Register builtins.
* c-opts.c (c_common_init): Call init_pp_output if preprocessing.
Make call to cpp_read_main_file common to whether preprocessing
or not. Don't register builtins.
* c-ppoutput.c: Include c-pragma.h.
(setup_callbacks): Rename init_pp_output.
(preprocess_file): No longer setup callbacks or call
cpp_read_main_file.
* cpphash.h (_cpp_init_mbchar): New.
* cppinit.c (init_library): Call _cpp_init_mbchar.
* cpplex.c (_cpp_init_mbchar): New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63913 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* c-common.c (flag_no_line_commands, flag_no_output,
flag_dump_macros, flag_dump_includes): New.
* c-common.h (flag_no_line_commands, flag_no_output,
flag_dump_macros, flag_dump_includes, preprocess_file): New.
(init_c_lex): Update prototype.
* c-lex.c (init_c_lex): Update prototype; move some code to
c_common_init.
* c-opts.c (preprocess_file): Subsume into c_common_init.
(c_common_decode_option): Update flags.
(c_common_init): Move code from preprocess_file and init_c_lex.
(sanitize_cpp_opts): Update.
* c-ppoutput.c: New, cppmain.c almost verbatim.
* cpphash.h (struct printer): Remove.
(struct cpp_reader): Remove print.
* cpplib.h (dump_none, dump_only, dump_names, dump_definitions,
cpp_preprocess_file): Remove.
(struct cpp_options): Remove no_output, no_line_commands, dump_macros
and dump_includes.
* cppmain.c: Remove.
* doc/passes.texi: Update.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63773 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cppfiles.c.
(remove_duplicates): Use cpp_simplify_path.
* c-incpath.h (simplify_path): Remove.
* c-lex.c: Don't include c-incpath.h.
(init_c_lex): Remove simplify_path.
* cppfiles.c (remove_component_p, cpp_simplify_path): Restore.
(find_or_create_entry, validate_pch): Revert.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63669 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cppinit.o, cppdefault.o, fix-header): Update.
* c-incpath.c: New file.
* c-incpath.h: New file.
* c-lex.c: Include c-incpath.h.
(init_c_lex): Register path simplifier.
* c-opts.c: Include cppdefault.h and c-incpath.h.
(TARGET_SYSTEM_ROOT, verbose, iprefix, sysroot, std_inc,
std_cxx_inc, quote_chain_split, add_prefixed_path): New.
(COMMAND_LINE_OPTIONS): Add more options from cpplib.
(missing_arg, c_common_decode_option): Handle them.
(c_common_post_options): Register include chains.
(print_help): Update.
* cppdefault.h (struct default include): Update.
Move some macros to ...
* cppdefault.c: ... here.
(cpp_include_defaults): Add extra field add_sysroot.
* cppfiles.c (include_file, search_from, find_or_create_entry,
cpp_included, find_include_file, remap_filename): Update for
renaming of search_path to cpp_path, and of the chain headers.
(remove_component_p, _cpp_simplify_pathname): Move to c-incpath.c.
* cpphash.h (struct search_path): Move to cpplib.h.
(struct cpp_buffer, struct cpp_reader): Update.
(_cpp_simplify_pathname): Remove.
* cppinit.c: Don't include prefix.h and cppdefault.h.
(INO_T_EQ, INO_T_COPY, path_include, append_include_chain,
remove_dup_dir, remove_dup_nonsys_dirs, remove_dup_dirs,
init_standard_includes, BRACKET, SYSTEM, AFTER, no_dir,
no_pth, cpp_handle_options): Remove.
(struct pending_option): Remove chain members.
(cpp_destroy, cpp_read_main_file, COMMAND_LINE_OPTIONS,
cpp_handle_option): Update.
* cpplib.h (struct cpp_path, cpp_set_include_chains): New.
(struct cpp_options): Remove quote_include, bracket_include,
include_prefix, include_prefix_len, verbose, ignore_srcdir,
no_standard_includes, no_standard_cplusplus_includes.
(struct cpp_callbacks): Add simplify_path.
(cpp_handle_options): Remove.
* fix-header.c: Include c-incpath.h.
(read_scan_file): Update to use c-incpath functionality.
* doc/passes.texi: Update.
cp:
* Make-lang.in (CXX_C_OBJS): Update.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63612 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
| |
* c-lex.c (c_lex): Set the token value to error_mark_node for
invalid numeric constants.
PR c++/9264
* g++.dg/parse/octal1.C: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61235 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
| |
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61136 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
| |
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60174 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* real.c, real.h: Rewrite from scratch.
* Makefile.in (simplify-rtx.o): Depend on TREE_H.
(paranoia): New target.
* builtins.c (fold_builtin_inf): Use new real.h interface.
* c-common.c (builtin_define_with_hex_fp_value): Likewise.
* c-lex.c (interpret_float): Likewise.
* emit-rtl.c (gen_lowpart_common): Likewise.
* optabs.c (expand_float): Use real_2expN.
* config/ia64/ia64.md (divsi3, udivsi3): Likewise.
* defaults.h (INTEL_EXTENDED_IEEE_FORMAT): New.
(FLOAT_WORDS_BIG_ENDIAN): New.
* cse.c (find_comparison_args): Don't pass FLOAT_STORE_FLAG_VALUE
directly to REAL_VALUE_NEGATIVE.
* loop.c (canonicalize_condition): Likewise.
* simplify-rtx.c: Include tree.h.
(simplify_unary_operation): Don't handle FIX and UNSIGNED_FIX
with floating-point result modes.
* toplev.c (backend_init): Call init_real_once.
* fold-const.c (force_fit_type): Don't call CHECK_FLOAT_VALUE.
* tree.c (build_real): Likewise.
* config/alpha/alpha.c, config/vax/vax.c (float_strings,
float_values, inited_float_values, check_float_value): Remove.
* config/alpha/alpha.h, config/m68hc11/m68hc11.h,
config/m88k/m88k.h, config/vax/vax.h (CHECK_FLOAT_VALUE): Remove.
* doc/tm.texi (CHECK_FLOAT_VALUE): Remove.
gcc/f/
* target.c (ffetarget_real1): Don't pass FFETARGET_ATOF_
directly to ffetarget_make_real1.
(ffetarget_real2): Similarly.
* target.h (ffetarget_cvt_r1_to_rv_, ffetarget_cvt_rv_to_r2_,
ffetarget_cvt_r2_to_rv_): Use new real.h interface and simplify.
gcc/java/
* jcf-parse.c (get_constant): Runtime check for IEEE format;
use new real.h interface.
* jcf-write.c (find_constant_index): Use new real.h interface.
* lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
contrib/
* paranoia.cc: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57198 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* ChangeLog: Likewise.
* ChangeLog.1: Likewise.
* ChangeLog.2: Likewise.
* ChangeLog.3: Likewise.
* ChangeLog.4: Likewise.
* ChangeLog.5: Likewise.
* ChangeLog.6: Likewise.
* FSFChangeLog.10: Likewise.
* FSFChangeLog.11: Likewise.
* c-common.c: Likewise.
* c-lex.c: Likewise.
* c-objc-common.c: Likewise.
* cppexp.c: Likewise.
* cppinit.c: Likewise.
* cpplex.c: Likewise.
* doloop.c: Likewise.
* flow.c: Likewise.
* function.c: Likewise.
* integrate.c: Likewise.
* loop.c: Likewise.
* reg-stack.c: Likewise.
* reload.h: Likewise.
* ssa.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57188 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* c-common.c: Likewise.
* c-common.h: Likewise.
* c-lex.c: Likewise.
* c-pretty-print.c: Likewise.
* cfglayout.c: Likewise.
* cfgloop.c: Likewise.
* defaults.h: Likewise.
* et-forest.c: Likewise.
* explow.c: Likewise.
* function.h: Likewise.
* gcov.c: Likewise.
* genattrtab.c: Likewise.
* gengtype.c: Likewise.
* ifcvt.c: Likewise.
* libgcc2.c: Likewise.
* loop.c: Likewise.
* profile.c: Likewise.
* ra-build.c: Likewise.
* real.c: Likewise.
* rtl.h: Likewise.
* tracer.c: Likewise.
* tree-inline.c: Likewise.
* varasm.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56952 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to c-copts.c.
(warn_multichar): Die.
(cb_register_builtins): Export.
* c-common.h (warn_multichar, preprocess_file): Remove.
(cb_register_builtins): New.
* c-lang.c (c_init): Remove.
(LANG_HOOKS_INIT): Use c_objc_common_init.
* c-lex.c (init_c_lex): Don't canonicalize filename.
* c-opts.c (in_fname, STDC_0_IN_SYSTEM_HEADERS): New.
(preprocess_file): Make static. Update for cpplib.
(c_common_decode_option): Remove warn_multichar. Use in_fname.
(c_common_post_options): Set some cpp options here.
(c_common_init): Move from c-common.c.
* cppinit.c (cpp_post_options): Don't canonicalize in_fname.
* cpplib.h (struct cpp_options): Remove in_fname.
(cpp_preprocess_file): Update.
* cppmain.c (cpp_preprocess_file): Update for new prototypes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56223 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* c-common.c (flag_objc): New.
* c-common.h (c_language_kind): Get rid of clk_objective_c
enum value.
(flag_objc): New extern declaration.
* c-decl.c (implicitly_declare): Call objc_check_decl
instead of maybe_objc_check_decl.
(finish_decl): Likewise.
(grokfield): Likewise.
(finish_struct): Likewise.
* c-lang.c (maybe_objc_check_decl): Rename to objc_check_decl.
(maybe_objc_comptypes): Rename to objc_comptypes.
(maybe_building_objc_message_expr): Rename to
objc_message_selector.
* c-lex.c (lex_charconst): Remove uses of clk_objective_c,
replace with flag_objc as needed.
* c-opts.c (c_common_init_options): Likewise.
(c_common_decode_option): Likewise.
* c-parse.in (init_reswords): Likewise.
* c-tree.h (maybe_objc_check_decl): Rename to objc_check_decl.
(maybe_objc_comptypes): Rename to objc_comptypes.
(maybe_building_objc_message_expr): Rename to
objc_message_selector.
* c-typeck.c (comptypes): Call objc_comptypes instead of
maybe_objc_comptypes, and/or objc_message_selector instead of
(comp_target_types): Likewise.
(convert_for_assignment): Likewise.
(warn_for_assignment): Likewise.
* cppinit.c (init_builtins): Set __OBJC__ manifest constant
independently of those for other languages.
* objc/objc-act.c (maybe_objc_comptypes): Delete.
(maybe_objc_check_decl): Delete.
(maybe_building_objc_message_expr): Rename to
objc_message_selector.
* objc/objc-lang.c (objc_init_options): Use clk_c instead of
clk_objective_c; set flag_objc flag.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56173 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* collect2.c (GET_ENV_PATH_LIST): Remove.
(prefix_from_env): Use GET_ENVIRONMENT.
* cppinit.c (GET_ENV_PATH_LIST): Remove.
(init_standard_includes): Use GET_ENVIRONMENT.
* defaults.h (GET_ENVIRONMENT): Define here if not already.
* gcc.c (GET_ENV_PATH_LIST): Remove.
(make_relative_prefix, process_command): Update.
* protoize.c (GET_ENV_PATH_LIST): Remove.
(do_processing): Update.
java:
* jcf-path.c (GET_ENV_PATH_LIST): Remove.
(jcf_path_init): Use GET_ENVIRONMENT.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55630 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* c-decl.c (build_array_declarator): Say 'ISO C90', not 'ISO C89'.
(grokdeclarator): Likewise.
* c-format.c (C_STD_NAME): Likewise.
* c-lex.c (interpret_integer): Likewise.
* c-typeck.c (build_array_ref): Likewise.
* cpplex.c (_cpp_lex_direct): Likewise.
* toplev.c (documented_lang_options): Likewise.
testsuite/
2002-07-21 Gabriel Dos Reis <gdr@nerim.net>
* gcc.dg/c90-arraydecl-1.c: Change C89 too C90.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55629 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
| |
* c-lex.c (cb_def_pragma): Don't try to spell CPP_EOF.
testsuite:
* gcc.dg/Wunknownprag.c: New tests.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55021 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
| |
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54185 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
warn_long_long setting.
* c-lex.c (lex_number): Replace with interpret_integer,
interpret_float, narrowest_unsigned_type and
narrowest_signed_type, taking advantage of the new
cpplib functionality.
* cpperror.c (_cpp_begin_message): If a warning is turned
into an error, avoid printing "warning:".
* cppexp.c (cpp_num_sign_extend): New.
* cppinit.c: Update comment.
* cpplib.h (cpp_num_sign_extend): New.
* tree.h: Update comment.
testsuite:
* gcc.dg/wtr-int-type-1.c, gcc.dg/wtr-suffix-1.c,
gcc.dg/cpp/paste4.c, gcc.dg/cpp/sysmac2.c:
Update for mofified diagnostics.
* gcc.dg/c99-intconst-1.c: No longer fail.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54180 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(struct tree_real_cst): Point to the REAL_VALUE_TYPE, do not
contain it.
(TREE_REAL_CST_PTR): New accessor.
(TREE_REAL_CST): Update.
* real.h: Include machmode.h.
(realvaluetype): Make it struct realvaluetype, not a typedef.
(build_real): Prototype here.
* tree.c: Include real.h.
(build_real): Allocate the REAL_VALUE_TYPE as a separate
object in GC memory, set TREE_REAL_CST_PTR to point to it.
(build_real_from_int_cst): Use build_real.
* ggc-common.c (ggc_mark_trees): Mark TREE_REAL_CST_PTR of a
REAL_CST.
* builtins.c, c-common.c, c-lex.c, dwarf2out.c, expr.c,
fold-const.c, print-tree.c, real.c, cp/mangle.c, cp/tree.c,
f/bld.c, f/com.c, f/expr.c, f/target.c, java/decl.c,
java/jcf-parse.c, java/parse.y, java/typeck.c: Include real.h.
* Makefile.in, cp/Make-lang.in, f/Make-lang.in,
java/Make-lang.in: Update dependency lists.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53959 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update other targets.
* c-common.c: Don't include c-lex.h.
(builtin_define_with_value): Make static and prototype.
(builtin_define_std): Move from c-lex.h.
* c-common.h (init_c_lex): Move from c-lex.h.
* c-decl.c: Don't include c-lex.h.
(make_pointer_declarator): Move from c-parse.in.
* c-lex.c: Don't include c-lex.h.
* c-lex.h: Remove.
* c-parse.in: Don't include c-lex.h; include c-pragma.h.
(make_pointer_declarator): Move to c-decl.c.
* c-pragma.c: Don't include c-lex.h.
* c-pragma.h (yydebug, YYDEBUG, parse_in, c_lex): Move from c-lex.h.
* c-tree.h (make_pointer_declarator): New.
cp:
* lex.c: Don't include c-lex.h.
* parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
doc:
* passes.texi, tm.texi: Update.
objc:
* Make-lang.in: Update and correct.
* objc-act.c: Don't include c-lex.h or cpplib.h.
treelang:
* treetree.c: Don't include c-lex.h.
config:
* darwin-c.c: Don't include c-lex.h.
* c4x/c4x-c.c: Don't include c-lex.h.
* c4x/t-c4x: Update.
* i370/i370-c.c: Don't include c-lex.h.
* i370/t-i370: Update.
* i960/i960-c.c: Don't include c-lex.h.
* i960/i960.c: Don't include cpplib.h, c-lex.h or c-pragma.h.
* i960/t-960bare: Update.
* i960/t-vxworks: Update.
* rs6000/rs6000-c.c: Don't include c-lex.h; include c-pragma.h.
* rs6000/t-darwin: Update.
* rs6000/t-rs6000-c-rule: Update.
* v850/v850-c.c: Don't include c-lex.h.
* v850/v850.c: Don't include c-lex.h or cpplib.h.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53876 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
| |
(cb_file_change, c_lex): Remove indent level handling.
* c-lex.h (indent_level): Remove.
* input.h (struct file_stack): Remove indent_level.
* toplev.c (push_srcloc): Remove indent_level handling.
cp:
* spew.c (yyungetc, snarf_block): Remove indent_level handling.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53786 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* c-common.c (flag_iso, flag_undef, cb_register_builtins,
builtin_define_std): New.
(c_common_init): Register CPP builtins callback.
* c-common.h (flag_iso, flag_undef): New.
* c-decl.c (c_decode_option): Set flag_iso and flag_undef.
* c-lex.c: Don't include target.h.
(cb_register_builtins): Move to c-common.c.
(init_c_lex): Don't register hook here.
* c-lex.h (builtin_define, builtin_assert, builtin_define_std): New.
(cpp_define, cpp_assert): Remove.
* gcc.c (cc1_options): Pass -undef to front end.
* target-def.h (TARGET_REGISTER_CPP_BUILTINS): Remove.
(TARGET_INITIALIZER): Update.
* target.h (struct cpp_reader): Don't predeclare.
(struct gcc_target): Remove cpp builtin hook.
* tree.c (default_register_cpp_builtins): Remove.
cp:
* cp-tree.h (flag_ansi): Remove.
* decl2.c (flag_ansi): Remove.
(cxx_decode_option): Set flag_iso and flag_undef.
doc:
* tm.texi: Update.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53349 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(c_common_init): Set CPP's warn_multichar.
* c-common.h (warn_multichar): New.
* c-decl.c (warn_multichar): Remove.
* c-lex.c (lex_charconst): Update.
* c-tree.h (warn_multichar): Remove.
* cppexp.c (eval_token): Sign-extend charconst value.
* cppinit.c (cpp_create_reader): Set warn_multichar.
* cpplex.c (cpp_interpret_charconst): Don't sign-extend
each character. Update prototype. Sign-extend the result.
* cpplib.h: Fix conditions.
(struct cpp_options): Add new warning flag.
(cpp_interpret_charconst): Update prototype.
cp:
* Make-lang.in (decl2.o): Update.
* cp-tree.h (warn_multichar): Remove.
* decl2.c: Include c-common.h.
(warn_multichar): Remove.
doc:
* cpp.texi: Update documentation.
testsuite:
* gcc.dg/cpp/charconst-3.c: Correct tests accordingly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53240 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* c-lex.c: Include target.h.
(cb_register_builtins): New.
(init_c_lex): Set builtins callback.
* c-lex.h (cpp_define, cpp_assert): New prototypes.
* cppinit.c (init_builtins): Use callback, including for
GXX_WEAK.
* cpplib.h (struct cpp_callbacks): New member.
* target-def.h (TARGET_REGISTER_CPP_BUILTINS): New.
(TARGET_INITIALIZER): Update.
* target.h (struct gcc_target): New hook.
* tree.c (default_register_cpp_builtins): New.
* tree.h (default_register_cpp_builtins): New.
doc:
* tm.texi (TARGET_REGISTER_CPP_BUILTINS): Document.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53165 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and sign-extension.
(lex_charconst): Update for change in prototype of
cpp_interpret_charconst. Extend from cppchar_t to HOST_WIDE_INT
appropriately.
* cpphash.h (BITS_PER_CPPCHAR_T): New.
* cppinit.c (cpp_create_reader): Initialize them for no
change in semantics.
(cpp_post_options): Add sanity checks.
* cpplex.c (cpp_parse_escape): Handle precision, sign-extension
and truncation issues. Calculate in type cppchar_t.
(MAX_CHAR_TYPE_SIZE, MAX_WCHAR_TYPE_SIZE): Remove.
(cpp_interpret_charconst): Calculate in type cppchar_t. Handle
run-time dependent precision correctly. Return whether the
result is signed or not.
* cpplib.c (dequote_string): Use cppchar_t; update.
* cpplib.h (cppchar_signed_t): New.
struct cpp_options): New precision members.
(cpp_interpret_charconst, cpp_parse_escape): Update prototypes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53152 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(yyoverflow): Re-add. Set them.
(free_parser_stacks): New.
* c-common.h: Declare it.
* c-lex.c (c_common_parse_file): Call it.
* parse.y (malloced_yyss, malloced_yyvs): New.
(yyoverflow): Re-add. Set them.
(free_parser_stacks): New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52827 138bc75d-0d04-0410-961f-82ee72b054a4
|