diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2009-03-29 16:06:24 +0000 |
---|---|---|
committer | H.J. Lu <hongjiu.lu@intel.com> | 2009-03-29 16:06:24 +0000 |
commit | 6343bc718da7673c1f4631c2d2eae74aa2116fcd (patch) | |
tree | a7b6218634dd45ca1f36568dea885d1805ec92be | |
parent | 3d179537c59b30dfd1adbf69d8bd75073ea4062b (diff) |
Merged with trunk at revision 145235.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/ix86/atom@145240 138bc75d-0d04-0410-961f-82ee72b054a4
200 files changed, 10672 insertions, 18199 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index 0db98af7ded..ed9397bb49c 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,11 @@ +2009-03-28 Joseph Myers <joseph@codesourcery.com> + + * inclhack.def (aix_syswait, exception_structure, + pthread_page_size): Remove. + (math_exception): Remove mention of fixproto in comment. + * fixincl.x: Regenerate. + * mkheaders.in: Do not handle STMP_FIXPROTO. + 2009-03-27 Sandra Loosemore <sandra@codesourcery.com> * server.c (run_shell): Quote directory name passed to cd. diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index e2e28db88e5..285db9a6ac2 100644 --- a/fixincludes/fixincl.x +++ b/fixincludes/fixincl.x @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed Saturday February 28, 2009 at 10:11:41 AM PST + * It has been AutoGen-ed Saturday March 28, 2009 at 12:12:55 AM UTC * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Feb 28 10:11:41 PST 2009 +/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Mar 28 00:12:55 UTC 2009 * * You must regenerate it. Use the ./genfixes script. * @@ -15,7 +15,7 @@ * certain ANSI-incompatible system header files which are fixed to work * correctly with ANSI C and placed in a directory that GNU C will search. * - * This file contains 180 fixup descriptions. + * This file contains 177 fixup descriptions. * * See README for more information. * @@ -557,45 +557,6 @@ static const char* apzAix_SysmachinePatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Aix_Syswait fix - */ -tSCC zAix_SyswaitName[] = - "aix_syswait"; - -/* - * File name selection pattern - */ -tSCC zAix_SyswaitList[] = - "sys/wait.h\0"; -/* - * Machine/OS name selection pattern - */ -#define apzAix_SyswaitMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAix_SyswaitSelect0[] = - "^extern pid_t wait3\\(\\);\n"; -tSCC zAix_SyswaitSelect1[] = - "bos325,"; - -#define AIX_SYSWAIT_TEST_CT 2 -static tTestDesc aAix_SyswaitTests[] = { - { TT_EGREP, zAix_SyswaitSelect0, (regex_t*)NULL }, - { TT_EGREP, zAix_SyswaitSelect1, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Aix_Syswait - */ -static const char* apzAix_SyswaitPatch[] = { - "format", - "struct rusage;\n\ -%0", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * * Description of Aix_Syswait_2 fix */ tSCC zAix_Syswait_2Name[] = @@ -1933,48 +1894,6 @@ static const char* apzEcd_CursorPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Exception_Structure fix - */ -tSCC zException_StructureName[] = - "exception_structure"; - -/* - * File name selection pattern - */ -tSCC zException_StructureList[] = - "math.h\0"; -/* - * Machine/OS name selection pattern - */ -#define apzException_StructureMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zException_StructureSelect0[] = - "matherr"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zException_StructureBypass0[] = - "matherr.*(struct exception|__MATH_EXCEPTION|[ \\t]*__FP_EXCEPTION[ \\t]*\\*[ \\t]*)"; - -#define EXCEPTION_STRUCTURE_TEST_CT 2 -static tTestDesc aException_StructureTests[] = { - { TT_NEGREP, zException_StructureBypass0, (regex_t*)NULL }, - { TT_EGREP, zException_StructureSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Exception_Structure - */ -static const char* apzException_StructurePatch[] = { - "wrap", - "struct exception;\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * * Description of Freebsd_Gcc3_Breakage fix */ tSCC zFreebsd_Gcc3_BreakageName[] = @@ -4959,41 +4878,6 @@ typedef __regmatch_t\tregmatch_t;", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Pthread_Page_Size fix - */ -tSCC zPthread_Page_SizeName[] = - "pthread_page_size"; - -/* - * File name selection pattern - */ -tSCC zPthread_Page_SizeList[] = - "pthread.h\0"; -/* - * Machine/OS name selection pattern - */ -#define apzPthread_Page_SizeMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zPthread_Page_SizeSelect0[] = - "^int __page_size"; - -#define PTHREAD_PAGE_SIZE_TEST_CT 1 -static tTestDesc aPthread_Page_SizeTests[] = { - { TT_EGREP, zPthread_Page_SizeSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Pthread_Page_Size - */ -static const char* apzPthread_Page_SizePatch[] = { - "format", - "extern %0", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * * Description of Pthread_Incomplete_Struct_Argument fix */ tSCC zPthread_Incomplete_Struct_ArgumentName[] = @@ -7308,9 +7192,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 226 +#define REGEX_COUNT 221 #define MACH_LIST_SIZE_LIMIT 181 -#define FIX_COUNT 180 +#define FIX_COUNT 177 /* * Enumerate the fixes @@ -7326,7 +7210,6 @@ typedef enum { AAB_SUN_MEMCPY_FIXIDX, AIX_PTHREAD_FIXIDX, AIX_SYSMACHINE_FIXIDX, - AIX_SYSWAIT_FIXIDX, AIX_SYSWAIT_2_FIXIDX, AIX_VOLATILE_FIXIDX, ALPHA___ASSERT_FIXIDX, @@ -7362,7 +7245,6 @@ typedef enum { DEC_INTERN_ASM_FIXIDX, DJGPP_WCHAR_H_FIXIDX, ECD_CURSOR_FIXIDX, - EXCEPTION_STRUCTURE_FIXIDX, FREEBSD_GCC3_BREAKAGE_FIXIDX, FREEBSD_GCC4_BREAKAGE_FIXIDX, GLIBC_C99_INLINE_1_FIXIDX, @@ -7438,7 +7320,6 @@ typedef enum { OPENBSD_VA_START_FIXIDX, OSF_NAMESPACE_A_FIXIDX, OSF_NAMESPACE_C_FIXIDX, - PTHREAD_PAGE_SIZE_FIXIDX, PTHREAD_INCOMPLETE_STRUCT_ARGUMENT_FIXIDX, READ_RET_TYPE_FIXIDX, RPC_XDR_LVALUE_CAST_A_FIXIDX, @@ -7549,11 +7430,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = { AIX_SYSMACHINE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aAix_SysmachineTests, apzAix_SysmachinePatch, 0 }, - { zAix_SyswaitName, zAix_SyswaitList, - apzAix_SyswaitMachs, - AIX_SYSWAIT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aAix_SyswaitTests, apzAix_SyswaitPatch, 0 }, - { zAix_Syswait_2Name, zAix_Syswait_2List, apzAix_Syswait_2Machs, AIX_SYSWAIT_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -7729,11 +7605,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ECD_CURSOR_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aEcd_CursorTests, apzEcd_CursorPatch, 0 }, - { zException_StructureName, zException_StructureList, - apzException_StructureMachs, - EXCEPTION_STRUCTURE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aException_StructureTests, apzException_StructurePatch, 0 }, - { zFreebsd_Gcc3_BreakageName, zFreebsd_Gcc3_BreakageList, apzFreebsd_Gcc3_BreakageMachs, FREEBSD_GCC3_BREAKAGE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -8109,11 +7980,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = { OSF_NAMESPACE_C_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aOsf_Namespace_CTests, apzOsf_Namespace_CPatch, 0 }, - { zPthread_Page_SizeName, zPthread_Page_SizeList, - apzPthread_Page_SizeMachs, - PTHREAD_PAGE_SIZE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aPthread_Page_SizeTests, apzPthread_Page_SizePatch, 0 }, - { zPthread_Incomplete_Struct_ArgumentName, zPthread_Incomplete_Struct_ArgumentList, apzPthread_Incomplete_Struct_ArgumentMachs, PTHREAD_INCOMPLETE_STRUCT_ARGUMENT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index 4a5af1df609..7dddccc57de 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -386,23 +386,6 @@ fix = { /* - * sys/wait.h on AIX 3.2.5 puts the declaration of wait3 before the - * definition of struct rusage, so the prototype added by fixproto fails. - */ -fix = { - hackname = aix_syswait; - files = sys/wait.h; - select = "^extern pid_t wait3\\(\\);\n"; - select = "bos325,"; - c_fix = format; - c_fix_arg = "struct rusage;\n%0"; - test_text = "/* bos325, */\n" - "extern pid_t wait3();\n" - "\t/* pid_t wait3(int *, int, struct rusage *); */"; -}; - - -/* * sys/wait.h on AIX 5.2 defines macros that have both signed and * unsigned types in conditional expressions. */ @@ -1089,26 +1072,6 @@ fix = { /* - * math.h on SunOS 4 puts the declaration of matherr before the definition - * of struct exception, so the prototype (added by fixproto) causes havoc. - * This must appear before the math_exception fix. - */ -fix = { - hackname = exception_structure; - files = math.h; - - /* If matherr has a prototype already, the header needs no fix. */ - bypass = 'matherr.*(struct exception|__MATH_EXCEPTION|[ \t]*__FP_EXCEPTION[ \t]*\*[ \t]*)'; - select = matherr; - - c_fix = wrap; - c_fix_arg = "struct exception;\n"; - - test_text = "extern int matherr();"; -}; - - -/* * Between 8/24/1998 and 2/17/2001, FreeBSD system headers presume * neither the existence of GCC 3 nor its exact feature set yet break * (by design?) when __GNUC__ is set beyond 2. @@ -2306,9 +2269,7 @@ fix = { * Interface Definition), which conflicts with the class exception defined * in the C++ file std/stdexcept.h. We redefine it to __math_exception. * This is not a great fix, but I haven't been able to think of anything - * better. Note that we have to put the #ifdef/#endif blocks at beginning - * and end of file, because fixproto runs after us and may insert - * additional references to struct exception. + * better. */ fix = { hackname = math_exception; @@ -2658,20 +2619,6 @@ fix = { /* - * Fix __page_size* declarations in pthread.h AIX 4.1.[34]. - * The original ones fail if uninitialized externs are not common. - * This is the default for all ANSI standard C++ compilers. - */ -fix = { - hackname = pthread_page_size; - files = pthread.h; - select = "^int __page_size"; - c_fix = format; - c_fix_arg = "extern %0"; - test_text = "int __page_size;"; -}; - -/* * On broken glibc-2.3.3 systems an array of incomplete structures is * passed to __sigsetjmp. Fix that to take a pointer instead. */ diff --git a/fixincludes/mkheaders.in b/fixincludes/mkheaders.in index b584b68d6af..6fc0c51a41e 100644 --- a/fixincludes/mkheaders.in +++ b/fixincludes/mkheaders.in @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2002, 2007 Free Software Foundation, Inc. +# Copyright (C) 2002, 2007, 2009 Free Software Foundation, Inc. #This file is part of GCC. @@ -102,9 +102,4 @@ for ml in `cat ${itoolsdatadir}/fixinc_list`; do fi cp ${itoolsdatadir}/include${multi_dir}/limits.h ${subincdir} - - if [ x${STMP_FIXPROTO} != x ] ; then - export FIXPROTO_DEFINES mkinstalldirs - @SHELL@ fixproto ${subincdir} ${subincdir} ${isysroot}${SYSTEM_HEADER_DIR} || exit 1 - fi done diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ad0c1f09c21..0f8d30cab8d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,392 @@ +2009-03-29 H.J. Lu <hongjiu.lu@intel.com> + + * config/i386/i386-protos.h (ix86_agi_dependent): New. + + * config/i386/i386.c (ix86_agi_dependent): Rewrite. + (ix86_adjust_cost): Updated. + +2009-03-29 Jan Hubicka <jh@suse.cz> + + PR middle-end/28850 + * tree-pass.h (pass_cleanup_eh): New function. + (remove_unreachable_regions): Break code handling RTL + to rtl_remove_unreachable_regions; remove ERT_MUST_NOT_THROW + that can not be reached by runtime. + (can_be_reached_by_runtime): New function. + (label_to_region_map): New function. + (num_eh_regions): New function. + (rtl_remove_unreachable_regions): New function. + (convert_from_eh_region_ranges): Call rtl_remove_unreachable_regions. + (remove_eh_region): New function. + * except.h: Include sbitmap and vecprim. + (remove_eh_region, remove_unreachable_regions, label_to_region_map, + num_eh_regions): Declare. + * passes.c (init_optimization_passes): Schedule cleanup_eh. + * Makefile.in (EXCEPT_H): New; replace all uses of except.h + by it. + * tree-eh.c (tree_remove_unreachable_handlers): New function. + (tree_empty_eh_handler_p): New function. + (cleanup_empty_eh): New function. + (cleanup_eh): New function. + (pass_cleanup_eh): New function. + +2009-03-29 Jan Hubicka <jh@suse.cz> + + * except.c (verify_eh_tree): Fix handling of fun!=cfun; be ready + for removed regions. + +2009-03-29 Jan Hubicka <jh@suse.cz> + + * except.c (dump_eh_tree): Dump all datastructures. + +2009-03-29 Jan Hubicka <jh@suse.cz> + + * except.c (duplicate_eh_regions_0): Handle AKA bitmap. + (duplicate_eh_regions_1): Likewise. + (duplicate_eh_regions): Likewise; cleanup code gorwing the region + vector; call EH verification. + (foreach_reachable_handler, can_throw_internal_1, can_throw_external_1): + Be ready for region being removed. + +2009-03-29 Jan Hubicka <jh@suse.cz> + + * bitmap.c (bitmap_last_set_bit): New function. + * bitmap.h (bitmap_last_set_bit): Declare. + +2009-03-29 David Ayers <ayers@fsfe.org> + + PR objc/27377 + * c-typeck.c (build_conditional_expr): Emit ObjC warnings + by calling objc_compare_types and surpress warnings about + incompatible C pointers that are compatible ObjC pointers. + +2009-03-29 Adam Nemet <anemet@caviumnetworks.com> + + * cgraphbuild.c (build_cgraph_edges, rebuild_cgraph_edges): Don't + call initialize_inline_failed. + (initialize_inline_failed): Move it from here ... + * cgraph.c (initialize_inline_failed): ... to here. + (cgraph_create_edge): Call initialize_inline_failed rather than + setting inline_failed directly. + +2009-03-29 Ben Elliston <bje@au.ibm.com> + + PR target/32542 + * sysv4.opt (msdata): Improve comment. + * linux64.h (ASM_SPEC32): Do not pass -memb when -msdata is given. + * sysv4.h (SVR4_ASM_SPEC): Likewise. + +2009-03-29 Ben Elliston <bje@au.ibm.com> + + PR target/30451 + * config/rs6000/rs6000.md (*movti_ppc64): Correct the order of + load and store attributes. + +2009-03-29 Ben Elliston <bje@au.ibm.com> + + * config/i386/i386.c (enum ix86_builtins): Add IX86_BUILTIN_HUGE_VALQ. + (ix86_init_builtins): Add built-in function __builtin_huge_valq. + (ix86_expand_builtin): Handle IX86_BUILTIN_HUGE_VALQ. + * doc/extend.texi (X86 Built-in Functions): Add index entries for + __builtin_infq and __builtin_huge_valq. + +2009-03-28 Anatoly Sokolov <aesok@post.ru> + + * config/avr/avr.c (avr_mcu_t): Add atmega8c1, atmega16c1 and + atmega8m1 devices. + * config/avr/avr.h (LINK_SPEC, CRT_BINUTILS_SPECS): (Ditto.). + * config/avr/t-avr (MULTILIB_MATCHES): (Ditto.) + +2009-03-28 Xinliang David Li <davidxl@google.com> + + * tree-ssa-ccp.c (ccp_finalize): Add dbg_count support. + (do_dbg_cnt): New function. + +2009-03-28 Jan Hubicka <jh@suse.cz> + + Merge from pretty-ipa: + + 2009-03-27 Jan Hubicka <jh@suse.cz> + * cgraph.c (dump_cgraph_node): Add replace output flag by process. + * tree-pass.h (function_called_by_processed_nodes_p): Declare. + * passes.c (function_called_by_processed_nodes_p): New. + * ipa-pure-const.c (check_call): Fix handling of operands. + (analyze_function): Dump debug output for skipped bodies. + (local_pure_const): Use function_called_by_processed_nodes_p. + * dwarf2out.c (reference_to_unused): Use output. + * passes.c (do_per_function_toporder): Likewise. + + 2008-11-12 Jan Hubicka <jh@suse.cz> + + * tree-pass.h (pass_fixup_cfg, pass_local_pure_const): Declare. + * ipa-pure-const.c (funct_state_d): Add can throw field; make + state_set_in_source enum + (check_decl): Ignore memory tags; do not set fake looping flags; + dump diagnostics. + (check_operand, check_tree, check_rhs_var, check_lhs_var, + get_asm_expr_operands, scan_function_op, scan_function_stmt): Remove. + (check_call, analyze_function): Rewrite. + (check_stmt): New. + (add_new_function): Update call of analyze_function. + (generate_summary): Add call of analyze_function. + (propagate): Propagate can_throw; handle state_set_in_source correctly. + (local_pure_const): New function. + (pass_local_pure_const): New pass. + * ipa-inline.c (inline_transform): Set after_inlining. + * tree-eh.c (stmt_can_throw_external): New. + * tree-optimize.c (execute_fixup_cfg): Do not set after_inlining; + work with aliasing built. + * tree-flow.h (stmt_can_throw_external): New. + * passes.c (init_optimization_passes): Schedule fixup_cfg pass early; + and local pure/const pass in early and late optimization queue. +2009-03-28 Martin Jambor <mjambor@suse.cz> + + * fold-const.c (get_pointer_modulus_and_residue): New parameter + allow_func_align. + (fold_binary): Allow function decl aligment consideration is the + second argument is integer constant one. + * tree-ssa-forwprop.c (simplify_bitwise_and): New function. + (tree_ssa_forward_propagate_single_use_vars): Handle assing statements + with BIT_AND_EXPR on the RHS by calling simplify_bitwise_and. + +2009-03-28 Jan Hubicka <jh@suse.cz> + + * dwarf2out.c (dwarf2out_begin_prologue): Use crtl->nothrow + * tree-eh.c (stmt_could_throw_p): Remove check for WEAK decls. + * function.h (rtl_data): Add nothrow flag. + * except.c (set_nothrow_function_flags): Use crtl->nothrow; + set DECL_NOTHROW for AVAILABLE functions. + +2009-03-28 Jakub Jelinek <jakub@redhat.com> + + * config/rs6000/rs6000-c.c (rs6000_macro_to_expand): If macro + following vector keyword has expansion starting with pixel or bool + keyword, expand vector to __vector and pixel or bool to __pixel or + __bool. + + PR c++/39554 + * opts.c (warning_disallowed_functions, warn_disallowed_functions, + warn_if_disallowed_function_p): Removed. + (common_handle_option): Don't handle OPT_Wdisallowed_function_list_. + * c-parser.c (c_parser_postfix_expression_after_primary): Don't call + warning_if_disallowed_function_p. + * flags.h (warn_if_disallowed_function_p, + warn_disallowed_functions): Removed. + * common.opt (Wdisallowed-function-list=): Removed. + * doc/invoke.texi (-Wdisallowed-function-list=): Removed. + +2009-03-28 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/38723 + * tree-ssa-pre.c (compute_avail): Add all default definitions to + the entry block. + +2009-03-28 Jan Hubicka <jh@suse.cz> + + * tree-ssa-structalias.c (ipa_pta_execute): Fix bogus node->analyzed + test introduced by my previous patch. + +2009-03-28 Richard Guenther <rguenther@suse.de> + + * tree-ssa-copy.c (copy_prop_visit_phi_node): Do not leave + the PHIs value undefined. + +2009-03-28 Jan Hubicka <jh@suse.cz> + + * tree-pass.h (pass_fixup_cfg): New pass. + * ipa-inline.c (inline_transform): Set + always_inline_functions_inlined/after_inlining. + * tree-optimize.c (execute_fixup_cfg): Do not set them here. + (pass_fixup_cfg): New pass. + * passes.c (init_optimization_passes): Add fixup_cfg. + +2009-03-28 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/38458 + * tree-ssa-copy.c (copy_prop_visit_phi_node): For the first + argument use the arguments copy-of value. + +2009-03-28 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/38180 + * tree-ssa-ccp.c (get_default_value): Simplify. + (likely_value): Likewise. + (surely_varying_stmt_p): Properly handle VOP case. + (ccp_initialize): Likewise. + (ccp_fold): Handle propagating through *&. + (fold_const_aggregate_ref): Also handle decls. + +2009-03-28 Jan Hubicka <jh@suse.cz> + + * cgraph.c (dump_cgraph_node): Add replace output flag by process. + * cgraph.h (cgraph_node): Likewise. + * cgraphunit.c (cgraph_process_new_functions): Set process flag. + (cgraph_reset_node): Use process flag. + (cgraph_mark_functions_to_output): Likewise. + (cgraph_expand_function): Likewise. + (cgraph_expand_all_functions): Likewise. + (cgraph_output_in_order): Likewise. + * dwarf2out.c (reference_to_unused): Likewise. + * passes.c do_per_function_toporder): Likewise. + +2009-03-28 Jan Hubicka <jh@suse.cz> + + Bring from lto-branch: + 2008-09-03 Doug Kwan <dougkwan@google.com> + + * cgraphbuild.c (initialize_inline_failed): Use cgraph_inline_failed_t + enums instead of reason strings. + * cgraph.c (cgraph_create_edge): Same. + (cgraph_inline_failed_string): New function. + * cgraph.h (cgraph_inline_failed_t): New enum type. + (cgraph_inline_failed_string): New prototype. + (struct cgraph_edge): Change type of INLINED_FAILED from constant + char pointer to cgraph_inline_failed_t. + (cgraph_inline_p): Adjust prototype to use cgraph_inline_failed_t. + (cgraph_default_inline_p): Ditto. + * gcc/cgraphunit.c (cgraph_inline_p): Change type of parameter REASON + to cgraph_inline_failed_t pointer. + * cif-code.def: New file. + * ipa-inline.c (cgraph_mark_inline_edge): Use an enum instead of a + reason string. + (cgraph_check_inline_limits): Change type of REASON to pointer to + cgraph_inline_failed_t. Replace reason strings with enums. + (cgraph_default_inline_p): Ditto. + (cgraph_recursive_inlining_p): Ditto. + (update_caller_keys): Change type of FAILED_REASON to + cgraph_inline_failed_t. + (cgraph_set_inline_failed): Change type of REASON to pointer to + cgraph_inline_failed_t. Call cgraph_inline_failed_string to + convert enums to strings for text output. + (cgraph_decide_inlining_of_small_function): Change FAILED_REASON + to be of type cgraph_inline_failed_t. Replace reason strings with + enums. Call cgraph_inline_failed_string to covert enums + to strings for text output. + (cgraph_decide_inlining): Replace reason strings with enums. + (cgraph_decide_inlining_incrementally): Change type of FAILED_REASON + to cgraph_inline_failed_t type. Call cgraph_inline_failed_string + for text output. + * tree-inline.c (expand_call_inline): Change type of REASON + to cgraph_inline_failed_t. Replace reason strings with enums. + Call cgraph_inline_failed_string for text output. + * Makefile.in (CGRAPH_H): Add cif-code.def to dependencies. + (cgraph.o): Ditto. + +2009-03-28 Jan Hubicka <jh@suse.cz> + + * cgraph.c (cgraph_node, cgraph_remove_node, dump_cgraph_node, + cgraph_clone_node): Remove master clone handling. + (cgraph_is_master_clone, cgraph_master_clone): Remove. + * cgraph.h (master_clone): Remove. + (cgraph_is_master_clone, cgraph_master_clone): Remove. + * ipa-type-escape.c (type_escape_execute): Remove use of master clone. + (tree-ssa-structalias.c (ipa_pta_execute): Likewise. + +2009-03-28 Jan Hubicka <jh@suse.cz> + + * cgraph.c (cgraph_function_body_availability): Functions declared + inline are always safe to assume that it is not going to be replaced. + +2009-03-28 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/38513 + * tree-ssa-pre.c (eliminate): Remove redundant stores. + * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Handle + EXC_PTR_EXPR and FILTER_EXPR. + (get_ref_from_reference_ops): Likewise. + +2009-03-28 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/38968 + * tree-vect-analyze.c (vect_compute_data_ref_alignment): + Use FLOOR_MOD_EXPR to compute misalignment. + +2009-03-28 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/37795 + * tree.h (combine_comparisons): Declare. + * fold-const.c (combine_comparisons): Export. + * tree-ssa-ifcombine.c (ifcombine_ifandif): Optimize two successive + comparisons. + (ifcombine_iforif): Use combine_comparisons. + +2009-03-28 Jan Hubicka <jh@suse.cz> + + * tree-eh.c (inlinable_call_p): New function. + (make_eh_edges): Use it. + (verify_eh_edges): Use it. + (stmt_can_throw_external, stmt_can_throw_internal): Use it. + * except.c (reachable_next_level): Add inlinable_function argument + (sjlj_find_directly_reachable_regions): Update. + (add_reachable_handler): Do not set saw_any_handlers. + (reachable_next_level): Handle MUST_NOT_THROW more curefully. + (foreach_reachable_handler, can_throw_internal_1, can_throw_external_1): + Add new inlinable call parameter. + (can_throw_internal, can_throw_external): Update. + * except.h (can_throw_internal_1, can_throw_external_1, + foreach_reachable_handler): Update declaration. + +2009-03-28 Joseph Myers <joseph@codesourcery.com> + + * config/arm/t-arm-coff, config/h8300/coff.h, + config/i386/i386-aout.h, config/i386/i386-coff.h, + config/libgloss.h, config/m68k/coff.h, config/m68k/m68k-aout.h, + config/pdp11/2bsd.h, config/rs6000/aix41.h, + config/rs6000/aix41.opt, config/rs6000/t-newas, config/sh/coff.h, + fix-header.c, fixproto, gen-protos.c, protoize.c, scan-decls.c, + scan-types.sh, scan.c, scan.h, sort-protos, sys-protos.h, + sys-types.h: Remove. + * Makefile.in: Remove protoize and fixproto support and references + in comments. + (SYSCALLS.c.X-warn, TARGET_GETGROUPS_T, STMP_FIXPROTO, + PROTOIZE_INSTALL_NAME, UNPROTOIZE_INSTALL_NAME, FIXPROTO_DEFINES): + Remove. + (ALL_HOST_OBJS): Remove $(PROTO_OBJS). + (MOSTLYCLEANFILES): Remove protoize$(exeext) and + unprotoize$(exeext). + (rest.encap): Don't depend on $(STMP_FIXPROTO) + (.PHONY): Don't depend on proto. + (libgcc-support): Don't depend on $(STMP_FIXPROTO). + (proto, PROTO_OBJS, protoize$(exeext), unprotoize$(exeext), + protoize.o, unprotoize.o, SYSCALLS.c.X, test-protoize-simple, + deduced.h, GEN_PROTOS_OBJS, build/gen-protos$(build_exeext), + build/gen-protos.o, build/scan.o, xsys-protos.h, + build/fix-header$(build_exeext), build/fix-header.o, + build/scan-decls.o, fixhdr.ready, stmp-fixproto, + stmp-install-fixproto): Remove. + (mostlyclean): Don't remove xsys-protos.hT, SYSCALLS.c.X, + SYSCALLS.c or fixproto files. + (install-common): Don't install protoize. + (install-headers-tar, install-headers-cpio, install-headers-cp): + Don't depend on $(STMP_FIXPROTO). + (install-mkheaders): Don't depend on $(STMP_FIXPROTO). Don't + install fixproto files or write out fixproto settings. + (uninstall): Don't uninstall protoize. + * config.gcc (use_fixproto): Remove. + (arm-*-coff*, armel-*-coff*, h8300-*-*, i[34567]86-*-aout*, + i[34567]86-*-coff*, m68k-*-aout*, m68k-*-coff*, pdp11-*-bsd, + rs6000-ibm-aix4.[12]*, powerpc-ibm-aix4.[12]*, sh-*-*): Remove. + * config/m32r/t-linux (STMP_FIXPROTO): Remove. + * config/m68k/m68k.c: Remove M68K_TARGET_COFF-conditional code. + * config/mips/t-iris (FIXPROTO_DEFINES): Remove. + * config/pa/t-pa-hpux (FIXPROTO_DEFINES): Remove. + * config/pdp11/pdp11.c: Remove TWO_BSD-conditional code. + * config/t-svr4 (FIXPROTO_DEFINES): Remove. + * config/t-vxworks (STMP_FIXPROTO): Remove. + * configure.ac (AC_TYPE_GETGROUPS, TARGET_GETGROUPS_T, + STMP_FIXPROTO): Remove. + * config.in, configure: Regenerate. + * crtstuff.c (gid_t, uid_t): Don't undefine. + * doc/install.texi: Change m68k-coff to m68k-elf in example. + (arm-*-coff, arm-*-aout: Remove target entries. + (*-ibm-aix*): Mention removal of support for AIX 4.2 and older. + Remove mention of AIX 4.1. + (m68k-*-*): Remove mention of m68k-*-aout and m68k-*-coff*. + * doc/invoke.texi (Running Protoize): Remove. + * doc/trouble.texi (Actual Bugs): Remove mention of fixproto. + (Protoize Caveats): Remove. + * tsystem.h: Update comments on headers assumed to exist. + 2009-03-27 Vladimir Makarov <vmakarov@redhat.com> * genautomata.c: Add a new year to the copyright. Add a new diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index ad933e294bd..8d8c233d5bf 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20090328 +20090329 diff --git a/gcc/Makefile.in b/gcc/Makefile.in index e973c2a8c7f..7464d3ec617 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -22,7 +22,7 @@ #<http://www.gnu.org/licenses/>. # The targets for external use include: -# all, doc, proto, install, install-cross, install-cross-rest, +# all, doc, install, install-cross, install-cross-rest, # uninstall, TAGS, mostlyclean, clean, distclean, maintainer-clean. # This is the default target. @@ -175,8 +175,6 @@ GCC_WARN_CFLAGS = $(LOOSE_WARN) $($(@D)-warn) $(NOCOMMON_FLAG) $($@-warn) # be subject to -Werror: # flex output may yield harmless "no previous prototype" warnings build/gengtype-lex.o-warn = -Wno-error -# SYSCALLS.c misses prototypes -SYSCALLS.c.X-warn = -Wno-strict-prototypes -Wno-error # dfp.c contains many alias violations dfp.o-warn = -fno-strict-aliasing # mips-tfile.c contains -Wcast-qual warnings. @@ -297,9 +295,6 @@ DECNUMFMT = $(srcdir)/../libdecnumber/$(enable_decimal_float) DECNUMINC = -I$(DECNUM) -I$(DECNUMFMT) -I../libdecnumber LIBDECNUMBER = ../libdecnumber/libdecnumber.a -# Substitution type for target's getgroups 2nd arg. -TARGET_GETGROUPS_T = @TARGET_GETGROUPS_T@ - # Target to use when installing include directory. Either # install-headers-tar, install-headers-cpio or install-headers-cp. INSTALL_HEADERS_DIR = @build_install_headers_dir@ @@ -395,8 +390,7 @@ CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@ # macro is also used in a double-quoted context. SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta` -# Control whether to run fixproto and fixincludes. -STMP_FIXPROTO = @STMP_FIXPROTO@ +# Control whether to run fixincludes. STMP_FIXINC = @STMP_FIXINC@ # Test to see whether <limits.h> exists in the system header files. @@ -701,8 +695,6 @@ BUILD_CPPFLAGS=$(ALL_CPPFLAGS) GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)') GCC_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo gcc|sed '$(program_transform_name)') CPP_INSTALL_NAME := $(shell echo cpp|sed '$(program_transform_name)') -PROTOIZE_INSTALL_NAME := $(shell echo protoize|sed '$(program_transform_name)') -UNPROTOIZE_INSTALL_NAME := $(shell echo unprotoize|sed '$(program_transform_name)') GCOV_INSTALL_NAME := $(shell echo gcov|sed '$(program_transform_name)') GCCBUG_INSTALL_NAME := $(shell echo gccbug|sed '$(program_transform_name)') @@ -716,9 +708,6 @@ RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \ else echo runtest; fi` RUNTESTFLAGS = -# Extra symbols for fixproto to define when parsing headers. -FIXPROTO_DEFINES = - # Extra flags to use when compiling crt{begin,end}.o. CRTSTUFF_T_CFLAGS = @@ -791,6 +780,7 @@ REVISION_s := endif # Shorthand variables for dependency lists. +EXCEPT_H = except.h sbitmap.h vecprim.h TOPLEV_H = toplev.h input.h TARGET_H = $(TM_H) target.h insn-modes.h MACHMODE_H = machmode.h mode-classes.def insn-modes.h @@ -1324,7 +1314,7 @@ ALL_HOST_OBJS = $(GCC_OBJS) $(C_OBJS) $(OBJS) libbackend.o \ $(foreach v,$(CONFIG_LANGUAGES),$($(v)_OBJS)) \ $(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) \ mips-tfile.o mips-tdump.o \ - $(PROTO_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS) + $(GCOV_OBJS) $(GCOV_DUMP_OBJS) BACKEND = main.o @TREEBROWSER@ libbackend.a $(CPPLIB) $(LIBDECNUMBER) @@ -1336,7 +1326,6 @@ MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \ genrtl.c genrtl.h gt-*.h gtype-*.h gtype-desc.c gtyp-input.list \ xgcc$(exeext) cpp$(exeext) cc1$(exeext) cc1*-dummy$(exeext) $(EXTRA_PASSES) \ $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \ - protoize$(exeext) unprotoize$(exeext) \ $(SPECS) collect2$(exeext) \ gcov-iov$(build_exeext) gcov$(exeext) gcov-dump$(exeext) \ *.[0-9][0-9].* *.[si] *-checksum.c libbackend.a libgcc.mk @@ -1586,7 +1575,7 @@ all.cross: native gcc-cross$(exeext) cpp$(exeext) specs \ start.encap: native xgcc$(exeext) cpp$(exeext) specs \ libgcc-support lang.start.encap @GENINSRC@ srcextra # These can't be made until after GCC can run. -rest.encap: $(STMP_FIXPROTO) lang.rest.encap +rest.encap: lang.rest.encap # This is what is made with the host's compiler # whether making a cross compiler or not. native: config.status auto-host.h build-@POSUB@ $(LANGUAGES) \ @@ -1596,7 +1585,7 @@ native: config.status auto-host.h build-@POSUB@ $(LANGUAGES) \ c: cc1$(exeext) # Tell GNU make these are phony targets. -.PHONY: c proto +.PHONY: c # On the target machine, finish building a cross compiler. # This does the things that can't be done on the host machine. @@ -1670,7 +1659,7 @@ srcdirify = $(patsubst $(srcdir)%,$$(gcc_srcdir)%,$(filter $(srcdir)%,$(1))) \ # so we combine them. Sort removes duplicates. GCC_EXTRA_PARTS := $(sort $(EXTRA_MULTILIB_PARTS) $(EXTRA_PARTS)) -libgcc-support: libgcc.mvars stmp-int-hdrs $(STMP_FIXPROTO) $(TCONFIG_H) \ +libgcc-support: libgcc.mvars stmp-int-hdrs $(TCONFIG_H) \ $(MACHMODE_H) $(FPBIT) $(DPBIT) $(TPBIT) $(LIB2ADD) \ $(LIB2ADD_ST) $(LIB2ADDEH) $(srcdir)/emutls.c gcov-iov.h $(SFP_MACHINE) @@ -1822,7 +1811,7 @@ c-decl.o : c-decl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ $(RTL_H) $(C_TREE_H) $(GGC_H) $(TARGET_H) $(FLAGS_H) $(FUNCTION_H) output.h \ $(EXPR_H) debug.h $(TOPLEV_H) intl.h $(TM_P_H) $(TREE_INLINE_H) $(TIMEVAR_H) \ opts.h $(C_PRAGMA_H) gt-c-decl.h $(CGRAPH_H) $(HASHTAB_H) libfuncs.h \ - except.h $(LANGHOOKS_DEF_H) $(TREE_DUMP_H) $(C_COMMON_H) $(CPPLIB_H) \ + $(EXCEPT_H) $(LANGHOOKS_DEF_H) $(TREE_DUMP_H) $(C_COMMON_H) $(CPPLIB_H) \ $(DIAGNOSTIC_H) $(INPUT_H) langhooks.h $(GIMPLE_H) tree-mudflap.h \ pointer-set.h $(BASIC_BLOCK_H) $(GIMPLE_H) tree-iterator.h c-typeck.o : c-typeck.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ @@ -1906,7 +1895,7 @@ c-opts.o : c-opts.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ c-cppbuiltin.o : c-cppbuiltin.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(TREE_H) version.h $(C_COMMON_H) $(C_PRAGMA_H) $(FLAGS_H) \ - $(TOPLEV_H) output.h except.h $(REAL_H) $(TARGET_H) $(TM_P_H) \ + $(TOPLEV_H) output.h $(EXCEPT_H) $(REAL_H) $(TARGET_H) $(TM_P_H) \ $(BASEVER) debug.h $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) -DBASEVER=$(BASEVER_s) \ $< $(OUTPUT_OPTION) @@ -1923,7 +1912,7 @@ c-format.o : c-format.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) la c-semantics.o : c-semantics.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(TREE_H) $(FLAGS_H) $(TOPLEV_H) output.h $(RTL_H) $(GGC_H) \ - $(PREDICT_H) $(TREE_INLINE_H) $(C_COMMON_H) except.h $(FUNCTION_H) \ + $(PREDICT_H) $(TREE_INLINE_H) $(C_COMMON_H) $(EXCEPT_H) $(FUNCTION_H) \ langhooks.h $(SPLAY_TREE_H) $(TIMEVAR_H) $(GIMPLE_H) \ $(VARRAY_H) tree-iterator.h @@ -2020,7 +2009,7 @@ gtype-desc.o: gtype-desc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ input.h $(TREE_H) $(RTL_H) $(FUNCTION_H) insn-config.h $(EXPR_H) \ hard-reg-set.h $(BASIC_BLOCK_H) cselib.h $(INSN_ADDR_H) $(OPTABS_H) \ libfuncs.h debug.h $(GGC_H) $(CGRAPH_H) $(TREE_FLOW_H) reload.h \ - $(CPP_ID_DATA_H) tree-chrec.h $(CFGLAYOUT_H) except.h output.h \ + $(CPP_ID_DATA_H) tree-chrec.h $(CFGLAYOUT_H) $(EXCEPT_H) output.h \ $(CFGLOOP_H) ggc-common.o: ggc-common.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(GGC_H) \ @@ -2066,7 +2055,7 @@ tree-inline.o : tree-inline.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(TREE_H) $(RTL_H) $(EXPR_H) $(FLAGS_H) $(PARAMS_H) $(INPUT_H) insn-config.h \ $(VARRAY_H) $(HASHTAB_H) $(TOPLEV_H) langhooks.h $(TREE_INLINE_H) $(CGRAPH_H) \ intl.h $(FUNCTION_H) $(GGC_H) $(GIMPLE_H) \ - debug.h $(DIAGNOSTIC_H) except.h $(TREE_FLOW_H) tree-iterator.h tree-mudflap.h \ + debug.h $(DIAGNOSTIC_H) $(EXCEPT_H) $(TREE_FLOW_H) tree-iterator.h tree-mudflap.h \ $(IPA_PROP_H) value-prof.h tree-pass.h $(TARGET_H) $(INTEGRATE_H) print-tree.o : print-tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ $(GGC_H) langhooks.h $(REAL_H) tree-iterator.h fixed-value.h \ @@ -2189,13 +2178,13 @@ tree-vrp.o : tree-vrp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ tree-cfg.o : tree-cfg.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) $(FLAGS_H) output.h \ $(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \ - $(TREE_DUMP_H) except.h langhooks.h $(CFGLOOP_H) tree-pass.h \ + $(TREE_DUMP_H) $(EXCEPT_H) langhooks.h $(CFGLOOP_H) tree-pass.h \ $(CFGLAYOUT_H) $(BASIC_BLOCK_H) hard-reg-set.h $(TOPLEV_H) \ value-prof.h tree-ssa-propagate.h $(TREE_INLINE_H) tree-cfgcleanup.o : tree-cfgcleanup.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) $(FLAGS_H) output.h \ $(DIAGNOSTIC_H) $(TOPLEV_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \ - $(TREE_DUMP_H) except.h langhooks.h $(CFGLOOP_H) tree-pass.h \ + $(TREE_DUMP_H) $(EXCEPT_H) langhooks.h $(CFGLOOP_H) tree-pass.h \ $(CFGLAYOUT_H) $(BASIC_BLOCK_H) hard-reg-set.h $(HASHTAB_H) $(TOPLEV_H) \ tree-ssa-propagate.h tree-scalar-evolution.h rtl-factoring.o : rtl-factoring.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \ @@ -2204,7 +2193,7 @@ rtl-factoring.o : rtl-factoring.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \ $(TIMEVAR_H) output.h $(DF_H) tree-tailcall.o : tree-tailcall.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(RTL_H) $(TREE_H) $(TM_P_H) $(FUNCTION_H) $(TM_H) coretypes.h \ - $(TREE_DUMP_H) $(DIAGNOSTIC_H) except.h tree-pass.h $(FLAGS_H) langhooks.h \ + $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(EXCEPT_H) tree-pass.h $(FLAGS_H) langhooks.h \ $(BASIC_BLOCK_H) hard-reg-set.h $(DBGCNT_H) tree-ssa-sink.o : tree-ssa-sink.c $(TREE_FLOW_H) $(CONFIG_H) \ $(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \ @@ -2233,7 +2222,7 @@ tree-ssa-operands.o : tree-ssa-operands.c $(TREE_FLOW_H) $(CONFIG_H) \ $(FLAGS_H) $(FUNCTION_H) $(TM_H) $(TIMEVAR_H) tree-pass.h $(TOPLEV_H) \ coretypes.h langhooks.h $(IPA_REFERENCE_H) tree-eh.o : tree-eh.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ - $(RTL_H) $(TREE_H) $(TM_H) $(FLAGS_H) $(FUNCTION_H) except.h langhooks.h \ + $(RTL_H) $(TREE_H) $(TM_H) $(FLAGS_H) $(FUNCTION_H) $(EXCEPT_H) langhooks.h \ $(GGC_H) tree-pass.h coretypes.h $(TIMEVAR_H) $(TM_P_H) pointer-set.h \ $(TREE_DUMP_H) $(TREE_INLINE_H) tree-iterator.h $(TOPLEV_H) tree-ssa-loop.o : tree-ssa-loop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ @@ -2313,7 +2302,7 @@ tree-optimize.o : tree-optimize.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(DIAGNOSTIC_H) $(BASIC_BLOCK_H) $(FLAGS_H) $(TIMEVAR_H) $(TM_H) coretypes.h \ $(TREE_DUMP_H) $(TOPLEV_H) $(FUNCTION_H) langhooks.h $(FLAGS_H) $(CGRAPH_H) \ $(TREE_INLINE_H) tree-mudflap.h $(GGC_H) graph.h $(CGRAPH_H) tree-pass.h \ - $(CFGLOOP_H) except.h + $(CFGLOOP_H) $(EXCEPT_H) c-gimplify.o : c-gimplify.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \ $(C_TREE_H) $(C_COMMON_H) $(DIAGNOSTIC_H) $(GIMPLE_H) $(VARRAY_H) \ @@ -2323,7 +2312,7 @@ c-gimplify.o : c-gimplify.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \ gimplify.o : gimplify.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(GIMPLE_H) \ $(DIAGNOSTIC_H) $(GIMPLE_H) $(TREE_INLINE_H) $(VARRAY_H) langhooks.h \ $(LANGHOOKS_DEF_H) $(TREE_FLOW_H) $(CGRAPH_H) $(TIMEVAR_H) $(TM_H) \ - coretypes.h except.h $(FLAGS_H) $(RTL_H) $(FUNCTION_H) $(EXPR_H) output.h \ + coretypes.h $(EXCEPT_H) $(FLAGS_H) $(RTL_H) $(FUNCTION_H) $(EXPR_H) output.h \ $(GGC_H) gt-gimplify.h $(HASHTAB_H) $(TARGET_H) $(TOPLEV_H) $(OPTABS_H) \ $(REAL_H) $(SPLAY_TREE_H) vec.h tree-iterator.h gimple-iterator.o : gimple-iterator.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ @@ -2331,12 +2320,12 @@ gimple-iterator.o : gimple-iterator.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ gimple-low.o : gimple-low.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \ $(DIAGNOSTIC_H) $(GIMPLE_H) $(TREE_INLINE_H) $(VARRAY_H) langhooks.h \ $(LANGHOOKS_DEF_H) $(TREE_FLOW_H) $(TIMEVAR_H) $(TM_H) coretypes.h \ - except.h $(FLAGS_H) $(RTL_H) $(FUNCTION_H) $(EXPR_H) tree-pass.h \ + $(EXCEPT_H) $(FLAGS_H) $(RTL_H) $(FUNCTION_H) $(EXPR_H) tree-pass.h \ $(HASHTAB_H) $(TOPLEV.H) tree-iterator.h omp-low.o : omp-low.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ $(RTL_H) $(GIMPLE_H) $(TREE_INLINE_H) langhooks.h $(DIAGNOSTIC_H) \ $(TREE_FLOW_H) $(TIMEVAR_H) $(FLAGS_H) $(EXPR_H) $(TOPLEV_H) tree-pass.h \ - $(GGC_H) except.h $(SPLAY_TREE_H) $(OPTABS_H) $(CFGLOOP_H) \ + $(GGC_H) $(EXCEPT_H) $(SPLAY_TREE_H) $(OPTABS_H) $(CFGLOOP_H) \ tree-iterator.h tree-browser.o : tree-browser.c tree-browser.def $(CONFIG_H) $(SYSTEM_H) \ $(TREE_H) $(TREE_INLINE_H) $(DIAGNOSTIC_H) $(HASHTAB_H) \ @@ -2441,7 +2430,7 @@ toplev.o : toplev.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ version.h $(RTL_H) $(FUNCTION_H) $(FLAGS_H) xcoffout.h $(INPUT_H) \ $(INSN_ATTR_H) output.h $(DIAGNOSTIC_H) debug.h insn-config.h intl.h \ $(RECOG_H) Makefile $(TOPLEV_H) dwarf2out.h sdbout.h dbxout.h $(EXPR_H) \ - hard-reg-set.h $(BASIC_BLOCK_H) graph.h except.h $(REGS_H) $(TIMEVAR_H) \ + hard-reg-set.h $(BASIC_BLOCK_H) graph.h $(EXCEPT_H) $(REGS_H) $(TIMEVAR_H) \ value-prof.h $(PARAMS_H) $(TM_P_H) reload.h ira.h dwarf2asm.h $(TARGET_H) \ langhooks.h insn-flags.h $(CFGLAYOUT_H) $(CFGLOOP_H) hosthooks.h \ $(CGRAPH_H) $(COVERAGE_H) alloc-pool.h $(GGC_H) $(INTEGRATE_H) \ @@ -2454,7 +2443,7 @@ passes.o : passes.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ $(RTL_H) $(FUNCTION_H) $(FLAGS_H) xcoffout.h $(INPUT_H) $(INSN_ATTR_H) output.h \ $(DIAGNOSTIC_H) debug.h insn-config.h intl.h $(RECOG_H) $(TOPLEV_H) \ dwarf2out.h sdbout.h dbxout.h $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) \ - graph.h except.h $(REGS_H) $(TIMEVAR_H) value-prof.h \ + graph.h $(EXCEPT_H) $(REGS_H) $(TIMEVAR_H) value-prof.h \ $(PARAMS_H) $(TM_P_H) reload.h dwarf2asm.h $(TARGET_H) \ langhooks.h insn-flags.h $(CFGLAYOUT_H) $(REAL_H) $(CFGLOOP_H) \ hosthooks.h $(CGRAPH_H) $(COVERAGE_H) tree-pass.h $(TREE_DUMP_H) \ @@ -2489,26 +2478,26 @@ varasm.o : varasm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ function.o : function.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(CFGLAYOUT_H) $(GIMPLE_H) $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) \ $(OPTABS_H) libfuncs.h $(REGS_H) hard-reg-set.h insn-config.h $(RECOG_H) \ - output.h $(TOPLEV_H) except.h $(HASHTAB_H) $(GGC_H) $(TM_P_H) langhooks.h \ + output.h $(TOPLEV_H) $(EXCEPT_H) $(HASHTAB_H) $(GGC_H) $(TM_P_H) langhooks.h \ gt-function.h $(TARGET_H) $(BASIC_BLOCK_H) $(INTEGRATE_H) $(PREDICT_H) \ tree-pass.h $(DF_H) $(TIMEVAR_H) vecprim.h statistics.o : statistics.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ tree-pass.h $(TREE_DUMP_H) $(HASHTAB_H) statistics.h $(TM_H) $(FUNCTION_H) stmt.o : stmt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(FLAGS_H) $(FUNCTION_H) insn-config.h hard-reg-set.h $(EXPR_H) \ - libfuncs.h except.h $(RECOG_H) $(TOPLEV_H) output.h $(GGC_H) $(TM_P_H) \ + libfuncs.h $(EXCEPT_H) $(RECOG_H) $(TOPLEV_H) output.h $(GGC_H) $(TM_P_H) \ langhooks.h $(PREDICT_H) $(OPTABS_H) $(TARGET_H) $(MACHMODE_H) \ $(REGS_H) alloc-pool.h except.o : except.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ - $(TREE_H) $(FLAGS_H) except.h $(FUNCTION_H) $(EXPR_H) libfuncs.h \ + $(TREE_H) $(FLAGS_H) $(EXCEPT_H) $(FUNCTION_H) $(EXPR_H) libfuncs.h \ langhooks.h insn-config.h hard-reg-set.h $(BASIC_BLOCK_H) output.h \ dwarf2asm.h dwarf2out.h $(TOPLEV_H) $(HASHTAB_H) intl.h $(GGC_H) \ - gt-except.h $(CGRAPH_H) $(INTEGRATE_H) $(DIAGNOSTIC_H) dwarf2.h \ + gt-$(EXCEPT_H) $(CGRAPH_H) $(INTEGRATE_H) $(DIAGNOSTIC_H) dwarf2.h \ $(TARGET_H) $(TM_P_H) tree-pass.h $(TIMEVAR_H) expr.o : expr.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(FLAGS_H) $(FUNCTION_H) $(REGS_H) $(EXPR_H) $(OPTABS_H) \ libfuncs.h $(INSN_ATTR_H) insn-config.h $(RECOG_H) output.h \ - typeclass.h hard-reg-set.h $(TOPLEV_H) hard-reg-set.h except.h reload.h \ + typeclass.h hard-reg-set.h $(TOPLEV_H) hard-reg-set.h $(EXCEPT_H) reload.h \ $(GGC_H) langhooks.h intl.h $(TM_P_H) $(REAL_H) $(TARGET_H) \ tree-iterator.h gt-expr.h $(MACHMODE_H) $(TIMEVAR_H) $(TREE_FLOW_H) \ tree-pass.h $(DF_H) $(DIAGNOSTIC_H) vecprim.h @@ -2518,23 +2507,23 @@ dojump.o : dojump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_ builtins.o : builtins.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(GIMPLE_H) $(FLAGS_H) $(TARGET_H) $(FUNCTION_H) $(REGS_H) \ $(EXPR_H) $(OPTABS_H) insn-config.h $(RECOG_H) output.h typeclass.h \ - hard-reg-set.h $(TOPLEV_H) hard-reg-set.h except.h $(TM_P_H) $(PREDICT_H) \ + hard-reg-set.h $(TOPLEV_H) hard-reg-set.h $(EXCEPT_H) $(TM_P_H) $(PREDICT_H) \ libfuncs.h $(REAL_H) langhooks.h $(BASIC_BLOCK_H) tree-mudflap.h \ $(BUILTINS_DEF) $(MACHMODE_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) value-prof.h calls.o : calls.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(FLAGS_H) $(EXPR_H) $(OPTABS_H) langhooks.h $(TARGET_H) \ libfuncs.h $(REGS_H) $(TOPLEV_H) output.h $(FUNCTION_H) $(TIMEVAR_H) $(TM_P_H) \ - $(CGRAPH_H) except.h sbitmap.h $(DBGCNT_H) $(TREE_FLOW_H) + $(CGRAPH_H) $(EXCEPT_H) sbitmap.h $(DBGCNT_H) $(TREE_FLOW_H) expmed.o : expmed.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \ $(FLAGS_H) insn-config.h $(EXPR_H) $(OPTABS_H) $(RECOG_H) $(REAL_H) \ $(TOPLEV_H) $(TM_P_H) langhooks.h $(DF_H) $(TARGET_H) explow.o : explow.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \ $(FLAGS_H) hard-reg-set.h insn-config.h $(EXPR_H) $(OPTABS_H) $(RECOG_H) \ - $(TOPLEV_H) except.h $(FUNCTION_H) $(GGC_H) $(TM_P_H) langhooks.h gt-explow.h \ + $(TOPLEV_H) $(EXCEPT_H) $(FUNCTION_H) $(GGC_H) $(TM_P_H) langhooks.h gt-explow.h \ $(TARGET_H) output.h optabs.o : optabs.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(FLAGS_H) insn-config.h $(EXPR_H) $(OPTABS_H) libfuncs.h \ - $(RECOG_H) reload.h $(TOPLEV_H) $(GGC_H) $(REAL_H) $(TM_P_H) except.h \ + $(RECOG_H) reload.h $(TOPLEV_H) $(GGC_H) $(REAL_H) $(TM_P_H) $(EXCEPT_H) \ gt-optabs.h $(BASIC_BLOCK_H) $(TARGET_H) $(FUNCTION_H) dbxout.o : dbxout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ $(RTL_H) $(FLAGS_H) $(REGS_H) debug.h $(TM_P_H) $(TARGET_H) $(FUNCTION_H) \ @@ -2548,7 +2537,7 @@ sdbout.o : sdbout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) debug.h \ dwarf2out.o : dwarf2out.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(TREE_H) version.h $(RTL_H) dwarf2.h debug.h $(FLAGS_H) insn-config.h \ output.h $(DIAGNOSTIC_H) $(REAL_H) hard-reg-set.h $(REGS_H) $(EXPR_H) \ - libfuncs.h $(TOPLEV_H) dwarf2out.h reload.h $(GGC_H) except.h dwarf2asm.h \ + libfuncs.h $(TOPLEV_H) dwarf2out.h reload.h $(GGC_H) $(EXCEPT_H) dwarf2asm.h \ $(TM_P_H) langhooks.h $(HASHTAB_H) gt-dwarf2out.h $(TARGET_H) $(CGRAPH_H) \ $(MD5_H) $(INPUT_H) $(FUNCTION_H) $(VARRAY_H) dwarf2asm.o : dwarf2asm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ @@ -2573,11 +2562,11 @@ fixed-value.o: fixed-value.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ integrate.o : integrate.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(TREE_H) $(FLAGS_H) debug.h $(INTEGRATE_H) insn-config.h \ $(EXPR_H) $(REAL_H) $(REGS_H) intl.h $(FUNCTION_H) output.h $(RECOG_H) \ - except.h $(TOPLEV_H) $(PARAMS_H) $(TM_P_H) $(TARGET_H) langhooks.h \ + $(EXCEPT_H) $(TOPLEV_H) $(PARAMS_H) $(TM_P_H) $(TARGET_H) langhooks.h \ gt-integrate.h $(GGC_H) tree-pass.h $(DF_H) jump.o : jump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(FLAGS_H) hard-reg-set.h $(REGS_H) insn-config.h $(RECOG_H) $(EXPR_H) \ - $(REAL_H) except.h $(FUNCTION_H) tree-pass.h $(DIAGNOSTIC_H) \ + $(REAL_H) $(EXCEPT_H) $(FUNCTION_H) tree-pass.h $(DIAGNOSTIC_H) \ $(TOPLEV_H) $(INSN_ATTR_H) $(TM_P_H) reload.h $(PREDICT_H) \ $(TIMEVAR_H) $(TARGET_H) simplify-rtx.o : simplify-rtx.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ @@ -2660,7 +2649,7 @@ cselib.o : cselib.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ cse.o : cse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \ hard-reg-set.h $(FLAGS_H) insn-config.h $(RECOG_H) $(EXPR_H) $(TOPLEV_H) \ output.h $(FUNCTION_H) $(BASIC_BLOCK_H) $(GGC_H) $(TM_P_H) $(TIMEVAR_H) \ - except.h $(TARGET_H) $(PARAMS_H) rtlhooks-def.h tree-pass.h $(REAL_H) \ + $(EXCEPT_H) $(TARGET_H) $(PARAMS_H) rtlhooks-def.h tree-pass.h $(REAL_H) \ $(DF_H) $(DBGCNT_H) dce.o : dce.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) $(DF_H) cselib.h \ @@ -2683,11 +2672,11 @@ see.o : see.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ gcse.o : gcse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(REGS_H) hard-reg-set.h $(FLAGS_H) $(REAL_H) insn-config.h $(GGC_H) \ $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h $(TOPLEV_H) \ - $(TM_P_H) $(PARAMS_H) except.h gt-gcse.h $(TREE_H) cselib.h $(TIMEVAR_H) \ + $(TM_P_H) $(PARAMS_H) $(EXCEPT_H) gt-gcse.h $(TREE_H) cselib.h $(TIMEVAR_H) \ intl.h $(OBSTACK_H) tree-pass.h $(DF_H) $(DBGCNT_H) resource.o : resource.c $(CONFIG_H) $(RTL_H) hard-reg-set.h $(SYSTEM_H) \ coretypes.h $(TM_H) $(REGS_H) $(FLAGS_H) output.h $(RESOURCE_H) $(DF_H) \ - $(FUNCTION_H) $(TOPLEV_H) $(INSN_ATTR_H) except.h $(PARAMS_H) $(TM_P_H) + $(FUNCTION_H) $(TOPLEV_H) $(INSN_ATTR_H) $(EXCEPT_H) $(PARAMS_H) $(TM_P_H) lcm.o : lcm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \ hard-reg-set.h $(FLAGS_H) insn-config.h $(INSN_ATTR_H) $(RECOG_H) \ $(BASIC_BLOCK_H) $(TM_P_H) $(FUNCTION_H) output.h $(REAL_H) @@ -2734,7 +2723,7 @@ df-core.o : df-core.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ df-problems.o : df-problems.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \ hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) $(BITMAP_H) sbitmap.h $(TIMEVAR_H) \ - $(TM_P_H) $(FLAGS_H) output.h except.h dce.h vecprim.h + $(TM_P_H) $(FLAGS_H) output.h $(EXCEPT_H) dce.h vecprim.h df-scan.o : df-scan.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \ hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) $(BITMAP_H) sbitmap.h $(TIMEVAR_H) \ @@ -2743,7 +2732,7 @@ df-scan.o : df-scan.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ df-byte-scan.o : df-byte-scan.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ tm_p.h $(DF_H) output.h $(DBGCNT_H) regstat.o : regstat.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ - $(TM_P_H) $(FLAGS_H) $(REGS_H) output.h except.h hard-reg-set.h \ + $(TM_P_H) $(FLAGS_H) $(REGS_H) output.h $(EXCEPT_H) hard-reg-set.h \ $(BASIC_BLOCK_H) $(TIMEVAR_H) $(DF_H) var-tracking.o : var-tracking.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(TREE_H) hard-reg-set.h insn-config.h reload.h $(FLAGS_H) \ @@ -2770,22 +2759,22 @@ loop-doloop.o : loop-doloop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ alloc-pool.o : alloc-pool.c $(CONFIG_H) $(SYSTEM_H) alloc-pool.h $(HASHTAB_H) auto-inc-dec.o : auto-inc-dec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(TREE_H) $(RTL_H) $(TM_P_H) hard-reg-set.h $(BASIC_BLOCK_H) insn-config.h \ - $(REGS_H) $(FLAGS_H) output.h $(FUNCTION_H) except.h $(TOPLEV_H) $(RECOG_H) \ + $(REGS_H) $(FLAGS_H) output.h $(FUNCTION_H) $(EXCEPT_H) $(TOPLEV_H) $(RECOG_H) \ $(EXPR_H) $(TIMEVAR_H) tree-pass.h $(DF_H) $(DBGCNT_H) cfg.o : cfg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(FLAGS_H) \ - $(REGS_H) hard-reg-set.h output.h $(TOPLEV_H) $(FUNCTION_H) except.h $(GGC_H) \ + $(REGS_H) hard-reg-set.h output.h $(TOPLEV_H) $(FUNCTION_H) $(EXCEPT_H) $(GGC_H) \ $(TM_P_H) $(TIMEVAR_H) $(OBSTACK_H) $(TREE_H) alloc-pool.h \ $(HASHTAB_H) $(DF_H) $(CFGLOOP_H) $(TREE_FLOW_H) tree-pass.h cfghooks.o: cfghooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) $(TIMEVAR_H) $(TOPLEV_H) $(CFGLOOP_H) cfgexpand.o : cfgexpand.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) \ - coretypes.h $(TREE_DUMP_H) except.h langhooks.h tree-pass.h $(RTL_H) \ + coretypes.h $(TREE_DUMP_H) $(EXCEPT_H) langhooks.h tree-pass.h $(RTL_H) \ $(DIAGNOSTIC_H) $(TOPLEV_H) $(BASIC_BLOCK_H) $(FLAGS_H) debug.h $(PARAMS_H) \ value-prof.h $(TREE_INLINE_H) $(TARGET_H) cfgrtl.o : cfgrtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(FLAGS_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h \ - output.h $(TOPLEV_H) $(FUNCTION_H) except.h $(TM_P_H) insn-config.h $(EXPR_H) \ + output.h $(TOPLEV_H) $(FUNCTION_H) $(EXCEPT_H) $(TM_P_H) insn-config.h $(EXPR_H) \ $(CFGLAYOUT_H) $(CFGLOOP_H) $(OBSTACK_H) $(TARGET_H) $(TREE_H) \ tree-pass.h $(DF_H) $(GGC_H) cfganal.o : cfganal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ @@ -2793,7 +2782,7 @@ cfganal.o : cfganal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TIMEVAR_H) $(OBSTACK_H) $(TOPLEV_H) vecprim.h cfgbuild.o : cfgbuild.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(FLAGS_H) $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h $(TOPLEV_H) \ - $(FUNCTION_H) except.h $(TIMEVAR_H) $(TREE_H) + $(FUNCTION_H) $(EXCEPT_H) $(TIMEVAR_H) $(TREE_H) cfgcleanup.o : cfgcleanup.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(TIMEVAR_H) hard-reg-set.h output.h $(FLAGS_H) $(RECOG_H) \ $(TOPLEV_H) insn-config.h cselib.h $(TARGET_H) $(TM_P_H) $(PARAMS_H) \ @@ -2814,7 +2803,7 @@ loop-iv.o : loop-iv.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(BASIC_BLOCK_H) \ loop-invariant.o : loop-invariant.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \ $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(EXPR_H) $(RECOG_H) coretypes.h \ $(TM_H) $(TM_P_H) $(FUNCTION_H) $(FLAGS_H) $(DF_H) $(OBSTACK_H) output.h \ - $(HASHTAB_H) except.h $(PARAMS_H) + $(HASHTAB_H) $(EXCEPT_H) $(PARAMS_H) cfgloopmanip.o : cfgloopmanip.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \ $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(CFGLAYOUT_H) output.h \ coretypes.h $(TM_H) cfghooks.h $(OBSTACK_H) $(TREE_FLOW_H) @@ -2856,31 +2845,31 @@ reload.o : reload.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ reload1.o : reload1.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(EXPR_H) $(OPTABS_H) reload.h $(REGS_H) hard-reg-set.h insn-config.h \ $(BASIC_BLOCK_H) $(RECOG_H) output.h $(FUNCTION_H) $(TOPLEV_H) $(TM_P_H) \ - addresses.h except.h $(TREE_H) $(REAL_H) $(FLAGS_H) $(MACHMODE_H) \ + addresses.h $(EXCEPT_H) $(TREE_H) $(REAL_H) $(FLAGS_H) $(MACHMODE_H) \ $(OBSTACK_H) $(DF_H) $(TARGET_H) $(EMIT_RTL_H) ira.h rtlhooks.o : rtlhooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ rtlhooks-def.h $(EXPR_H) $(RECOG_H) postreload.o : postreload.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(REAL_H) $(FLAGS_H) $(EXPR_H) $(OPTABS_H) reload.h $(REGS_H) \ hard-reg-set.h insn-config.h $(BASIC_BLOCK_H) $(RECOG_H) output.h \ - $(FUNCTION_H) $(TOPLEV_H) cselib.h $(TM_P_H) except.h $(TREE_H) $(MACHMODE_H) \ + $(FUNCTION_H) $(TOPLEV_H) cselib.h $(TM_P_H) $(EXCEPT_H) $(TREE_H) $(MACHMODE_H) \ $(OBSTACK_H) $(TIMEVAR_H) tree-pass.h $(DF_H) $(DBGCNT_H) postreload-gcse.o : postreload-gcse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \ $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h $(TOPLEV_H) \ - $(TM_P_H) except.h $(TREE_H) $(TARGET_H) $(HASHTAB_H) intl.h $(OBSTACK_H) \ + $(TM_P_H) $(EXCEPT_H) $(TREE_H) $(TARGET_H) $(HASHTAB_H) intl.h $(OBSTACK_H) \ $(PARAMS_H) $(TIMEVAR_H) tree-pass.h $(REAL_H) $(DBGCNT_H) caller-save.o : caller-save.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(FLAGS_H) $(REGS_H) hard-reg-set.h insn-config.h $(BASIC_BLOCK_H) $(FUNCTION_H) \ addresses.h $(RECOG_H) reload.h $(EXPR_H) $(TOPLEV_H) $(TM_P_H) $(DF_H) \ output.h ira.h gt-caller-save.h $(GGC_H) -bt-load.o : bt-load.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) except.h \ +bt-load.o : bt-load.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(EXCEPT_H) \ $(RTL_H) hard-reg-set.h $(REGS_H) $(TM_P_H) $(FIBHEAP_H) output.h $(EXPR_H) \ $(TARGET_H) $(FLAGS_H) $(INSN_ATTR_H) $(FUNCTION_H) tree-pass.h $(TOPLEV_H) \ $(DF_H) vecprim.h $(RECOG_H) reorg.o : reorg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ conditions.h hard-reg-set.h $(BASIC_BLOCK_H) $(REGS_H) insn-config.h \ - $(INSN_ATTR_H) except.h $(RECOG_H) $(FUNCTION_H) $(FLAGS_H) output.h \ + $(INSN_ATTR_H) $(EXCEPT_H) $(RECOG_H) $(FUNCTION_H) $(FLAGS_H) output.h \ $(EXPR_H) $(TOPLEV_H) $(PARAMS_H) $(TM_P_H) $(OBSTACK_H) $(RESOURCE_H) \ $(TIMEVAR_H) $(TARGET_H) tree-pass.h alias.o : alias.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ @@ -2916,7 +2905,7 @@ ira-emit.o: ira-emit.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(EXPR_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) $(PARAMS_H) \ $(IRA_INT_H) ira-lives.o: ira-lives.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ - $(TARGET_H) $(RTL_H) $(REGS_H) except.h hard-reg-set.h $(FLAGS_H) \ + $(TARGET_H) $(RTL_H) $(REGS_H) $(EXCEPT_H) hard-reg-set.h $(FLAGS_H) \ insn-config.h $(RECOG_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) $(PARAMS_H) \ $(DF_H) sparseset.h $(IRA_INT_H) ira.o: ira.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ @@ -2928,62 +2917,62 @@ ira.o: ira.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ regmove.o : regmove.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ insn-config.h $(TIMEVAR_H) tree-pass.h $(DF_H)\ $(RECOG_H) output.h $(REGS_H) hard-reg-set.h $(FLAGS_H) $(FUNCTION_H) \ - $(EXPR_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) except.h reload.h + $(EXPR_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) $(EXCEPT_H) reload.h combine-stack-adj.o : combine-stack-adj.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(RTL_H) insn-config.h $(TIMEVAR_H) tree-pass.h \ $(RECOG_H) output.h $(REGS_H) hard-reg-set.h $(FLAGS_H) $(FUNCTION_H) \ - $(EXPR_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) $(DF_H) except.h reload.h + $(EXPR_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) $(DF_H) $(EXCEPT_H) reload.h ddg.o : ddg.c $(DDG_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TARGET_H) \ $(TOPLEV_H) $(RTL_H) $(TM_P_H) $(REGS_H) $(FUNCTION_H) \ - $(FLAGS_H) insn-config.h $(INSN_ATTR_H) except.h $(RECOG_H) \ + $(FLAGS_H) insn-config.h $(INSN_ATTR_H) $(EXCEPT_H) $(RECOG_H) \ $(SCHED_INT_H) $(CFGLAYOUT_H) $(CFGLOOP_H) $(EXPR_H) $(BITMAP_H) \ hard-reg-set.h sbitmap.h $(TM_H) modulo-sched.o : modulo-sched.c $(DDG_H) $(CONFIG_H) $(CONFIG_H) $(SYSTEM_H) \ coretypes.h $(TARGET_H) $(TOPLEV_H) $(RTL_H) $(TM_P_H) $(REGS_H) $(FUNCTION_H) \ - $(FLAGS_H) insn-config.h $(INSN_ATTR_H) except.h $(RECOG_H) \ + $(FLAGS_H) insn-config.h $(INSN_ATTR_H) $(EXCEPT_H) $(RECOG_H) \ $(SCHED_INT_H) $(CFGLAYOUT_H) $(CFGLOOP_H) $(EXPR_H) $(PARAMS_H) \ cfghooks.h $(GCOV_IO_H) hard-reg-set.h $(TM_H) $(TIMEVAR_H) tree-pass.h \ $(DF_H) $(DBGCNT_H) haifa-sched.o : haifa-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h $(FUNCTION_H) \ - $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) except.h $(TM_P_H) $(TARGET_H) output.h \ + $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) $(TM_P_H) $(TARGET_H) output.h \ $(PARAMS_H) $(DBGCNT_H) sched-deps.o : sched-deps.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \ - $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) except.h cselib.h \ + $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) cselib.h \ $(PARAMS_H) $(TM_P_H) sched-rgn.o : sched-rgn.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \ - $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) except.h $(PARAMS_H) \ + $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \ $(TM_P_H) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) tree-pass.h \ $(DBGCNT_H) sched-ebb.o : sched-ebb.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \ - $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) except.h $(TM_P_H) \ + $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) $(TM_P_H) \ $(PARAMS_H) $(CFGLAYOUT_H) $(TARGET_H) output.h sched-vis.o : sched-vis.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(SCHED_INT_H) hard-reg-set.h $(BASIC_BLOCK_H) $(OBSTACK_H) \ $(REAL_H) tree-pass.h $(INSN_ATTR_H) sel-sched.o : sel-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \ - $(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(PARAMS_H) \ + $(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \ $(TM_P_H) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) tree-pass.h \ $(SCHED_INT_H) $(GGC_H) $(TREE_H) $(LANGHOOKS_DEF_H) \ $(SEL_SCHED_IR_H) $(SEL_SCHED_DUMP_H) sel-sched.h sel-sched-dump.o : sel-sched-dump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \ - $(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(PARAMS_H) \ + $(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \ $(TM_P_H) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) tree-pass.h \ $(SEL_SCHED_DUMP_H) $(GGC_H) $(TREE_H) $(LANGHOOKS_DEF_H) $(SEL_SCHED_IR_H) sel-sched-ir.o : sel-sched-ir.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \ - $(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(PARAMS_H) \ + $(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \ $(TM_P_H) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) tree-pass.h \ $(SCHED_INT_H) $(GGC_H) $(TREE_H) $(LANGHOOKS_DEF_H) $(SEL_SCHED_IR_H) final.o : final.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(FLAGS_H) intl.h $(REGS_H) $(RECOG_H) conditions.h \ insn-config.h $(INSN_ATTR_H) $(FUNCTION_H) output.h hard-reg-set.h \ - except.h debug.h xcoffout.h $(TOPLEV_H) reload.h dwarf2out.h tree-pass.h \ + $(EXCEPT_H) debug.h xcoffout.h $(TOPLEV_H) reload.h dwarf2out.h tree-pass.h \ $(BASIC_BLOCK_H) $(TM_P_H) $(TARGET_H) $(EXPR_H) $(CFGLAYOUT_H) dbxout.h \ $(TIMEVAR_H) $(CGRAPH_H) $(COVERAGE_H) $(REAL_H) $(DF_H) vecprim.h $(GGC_H) \ $(CFGLOOP_H) $(PARAMS_H) @@ -3000,7 +2989,7 @@ reg-stack.o : reg-stack.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ sreal.o: sreal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) sreal.h predict.o: predict.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(FLAGS_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) \ - hard-reg-set.h output.h $(TOPLEV_H) $(RECOG_H) $(FUNCTION_H) except.h \ + hard-reg-set.h output.h $(TOPLEV_H) $(RECOG_H) $(FUNCTION_H) $(EXCEPT_H) \ $(TM_P_H) $(PREDICT_H) sreal.h $(PARAMS_H) $(TARGET_H) $(CFGLOOP_H) \ $(COVERAGE_H) $(SCEV_H) $(GGC_H) predict.def $(TIMEVAR_H) $(TREE_DUMP_H) \ $(TREE_FLOW_H) tree-pass.h $(EXPR_H) pointer-set.h @@ -3027,7 +3016,7 @@ regrename.o : regrename.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ addresses.h reload.h $(TOPLEV_H) $(TIMEVAR_H) tree-pass.h $(DF_H) ifcvt.o : ifcvt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(REGS_H) $(TOPLEV_H) $(FLAGS_H) insn-config.h $(FUNCTION_H) $(RECOG_H) \ - $(TARGET_H) $(BASIC_BLOCK_H) $(EXPR_H) output.h except.h $(TM_P_H) \ + $(TARGET_H) $(BASIC_BLOCK_H) $(EXPR_H) output.h $(EXCEPT_H) $(TM_P_H) \ $(REAL_H) $(OPTABS_H) $(CFGLOOP_H) hard-reg-set.h $(TIMEVAR_H) tree-pass.h \ $(DF_H) $(DBGCNT_H) lambda-mat.o : lambda-mat.c $(LAMBDA_H) $(GGC_H) $(SYSTEM_H) $(CONFIG_H) \ @@ -3050,7 +3039,7 @@ dbgcnt.o: dbgcnt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h errors.h $(DBGCNT_H) \ lower-subreg.o : lower-subreg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(MACHMODE_H) $(TM_H) $(RTL_H) $(TM_P_H) $(TIMEVAR_H) $(FLAGS_H) \ insn-config.h $(BASIC_BLOCK_H) $(RECOG_H) $(OBSTACK_H) $(BITMAP_H) \ - $(EXPR_H) except.h $(REGS_H) tree-pass.h $(DF_H) + $(EXPR_H) $(EXCEPT_H) $(REGS_H) tree-pass.h $(DF_H) $(out_object_file): $(out_file) $(CONFIG_H) coretypes.h $(TM_H) $(TREE_H) \ $(RTL_H) $(REGS_H) hard-reg-set.h insn-config.h conditions.h \ @@ -3133,7 +3122,7 @@ insn-output.o : insn-output.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TARGET_H) tm-constrs.h insn-peep.o : insn-peep.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ insn-config.h $(RTL_H) $(TM_P_H) $(REGS_H) output.h $(REAL_H) \ - $(RECOG_H) except.h $(FUNCTION_H) $(TOPLEV_H) $(FLAGS_H) tm-constrs.h + $(RECOG_H) $(EXCEPT_H) $(FUNCTION_H) $(TOPLEV_H) $(FLAGS_H) tm-constrs.h insn-preds.o : insn-preds.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(RTL_H) $(TREE_H) insn-config.h $(RECOG_H) output.h \ $(FLAGS_H) $(FUNCTION_H) hard-reg-set.h $(RESOURCE_H) $(TM_P_H) \ @@ -3370,7 +3359,7 @@ build/vec.o : vec.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h vec.h \ build/gencondmd.o : build/gencondmd.c $(BCONFIG_H) $(SYSTEM_H) \ coretypes.h $(GTM_H) insn-constants.h $(RTL_H) $(TM_P_H) \ $(FUNCTION_H) $(REGS_H) $(RECOG_H) $(REAL_H) output.h $(FLAGS_H) \ - $(RESOURCE_H) $(TOPLEV_H) reload.h except.h tm-constrs.h + $(RESOURCE_H) $(TOPLEV_H) reload.h $(EXCEPT_H) tm-constrs.h # This pulls in tm-pred.h which contains inline functions wrapping up # predicates from the back-end so those functions must be discarded. # No big deal since gencondmd.c is a dummy file for non-GCC compilers. @@ -3460,7 +3449,7 @@ intl.o: intl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) intl.h Makefile -c $(srcdir)/intl.c $(OUTPUT_OPTION) # -# Remake cpp and protoize. +# Remake cpp. PREPROCESSOR_DEFINES = \ -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \ @@ -3484,72 +3473,6 @@ cppdefault.o: cppdefault.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ # Note for the stamp targets, we run the program `true' instead of # having an empty command (nothing following the semicolon). -proto: config.status protoize$(exeext) unprotoize$(exeext) SYSCALLS.c.X - -PROTO_OBJS = intl.o version.o cppdefault.o errors.o - -protoize$(exeext): protoize.o $(PROTO_OBJS) $(LIBDEPS) - $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ protoize.o $(PROTO_OBJS) $(LIBS) - -unprotoize$(exeext): unprotoize.o $(PROTO_OBJS) $(LIBDEPS) - $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ unprotoize.o $(PROTO_OBJS) $(LIBS) - -protoize.o: protoize.c $(srcdir)/../include/getopt.h $(CONFIG_H) $(SYSTEM_H) \ - coretypes.h $(TM_H) Makefile version.h cppdefault.h intl.h - (SHLIB_LINK='$(SHLIB_LINK)'; \ - $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) \ - $(DRIVER_DEFINES) \ - $(srcdir)/protoize.c $(OUTPUT_OPTION)) - -unprotoize.o: protoize.c $(srcdir)/../include/getopt.h $(CONFIG_H) \ - $(SYSTEM_H) coretypes.h $(TM_H) Makefile version.h cppdefault.h intl.h - (SHLIB_LINK='$(SHLIB_LINK)'; \ - $(CC) -c -DUNPROTOIZE $(ALL_CFLAGS) $(ALL_CPPFLAGS) \ - $(DRIVER_DEFINES) \ - $(srcdir)/protoize.c $(OUTPUT_OPTION)) - -# This info describes the target machine, so compile with GCC just built. -SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES) \ - stmp-int-hdrs - -rm -f SYSCALLS.c tmp-SYSCALLS.s - sed -e s/TARGET_GETGROUPS_T/$(TARGET_GETGROUPS_T)/ \ - $(srcdir)/sys-types.h $(srcdir)/sys-protos.h > SYSCALLS.c - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) \ - -aux-info $@ -S -o tmp-SYSCALLS.s SYSCALLS.c - -rm -f SYSCALLS.c tmp-SYSCALLS.s - - -test-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES) - -rm -f tmp-proto.[cso] - cp $(srcdir)/protoize.c tmp-proto.c - chmod u+w tmp-proto.c - ./protoize -N -B ./ -x getopt.h -c "-B./ -Wall -Wwrite-strings \ - $(GCC_CFLAGS) $(INCLUDES) \ - -DGCC_INCLUDE_DIR=0 \ - -DFIXED_INCLUDE_DIR=0 \ - -DGPLUSPLUS_INCLUDE_DIR=0 \ - -DCROSS_INCLUDE_DIR=0 \ - -DTOOL_INCLUDE_DIR=0 \ - -DSTANDARD_EXEC_PREFIX=0 \ - -DDEFAULT_TARGET_MACHINE=0 \ - -DDEFAULT_TARGET_VERSION=0" tmp-proto.c - @echo '**********' Expect 400 lines of differences. - -diff $(srcdir)/protoize.c tmp-proto.c > tmp-proto.diff - -wc -l tmp-proto.diff - ./unprotoize -N -x getopt.h -c "-B./ -Wall -Wwrite-strings \ - $(GCC_CFLAGS) $(INCLUDES) \ - -DGCC_INCLUDE_DIR=0 \ - -DFIXED_INCLUDE_DIR=0 \ - -DGPLUSPLUS_INCLUDE_DIR=0 \ - -DCROSS_INCLUDE_DIR=0 \ - -DTOOL_INCLUDE_DIR=0 \ - -DSTANDARD_EXEC_PREFIX=0 \ - -DDEFAULT_TARGET_MACHINE=0 \ - -DDEFAULT_TARGET_VERSION=0" tmp-proto.c - @echo Expect zero differences. - diff $(srcdir)/protoize.c tmp-proto.c | cat - -rm -f tmp-proto.[cs] tmp-proto$(objext) - # gcov-iov.c is run on the build machine to generate gcov-iov.h from version.c build/gcov-iov.o: gcov-iov.c $(BCONFIG_H) coretypes.h $(GTM_H) \ $(SYSTEM_H) coretypes.h $(TM_H) @@ -3712,98 +3635,6 @@ stmp-fixinc: gsyslimits.h macro_list fixinc_list \ done; \ fi $(STAMP) stmp-fixinc - -# Files related to the fixproto script. -# gen-protos and fix-header are compiled with CC_FOR_BUILD, but they are only -# used in native and host-x-target builds, so it's safe to link them with -# libiberty.a. - -deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh stmp-int-hdrs - if [ -d "$(SYSTEM_HEADER_DIR)" ]; \ - then \ - CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -isystem include -isystem ${SYSTEM_HEADER_DIR}"; \ - export CC; \ - $(SHELL) $(srcdir)/scan-types.sh "$(srcdir)" >tmp-deduced.h; \ - mv tmp-deduced.h deduced.h; \ - else \ - $(STAMP) deduced.h; \ - fi - -GEN_PROTOS_OBJS = build/gen-protos.o build/scan.o $(BUILD_ERRORS) -build/gen-protos$(build_exeext): $(GEN_PROTOS_OBJS) - ${CC_FOR_BUILD} $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o $@ \ - $(GEN_PROTOS_OBJS) $(BUILD_LIBS) - -build/gen-protos.o: gen-protos.c scan.h $(BCONFIG_H) $(SYSTEM_H) coretypes.h \ - $(GTM_H) errors.h - -build/scan.o: scan.c scan.h $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) - -xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h \ - build/gen-protos$(build_exeext) Makefile - sed -e s/TARGET_GETGROUPS_T/$(TARGET_GETGROUPS_T)/ \ - deduced.h $(srcdir)/sys-protos.h > tmp-fixtmp.c - mv tmp-fixtmp.c fixtmp.c - $(GCC_FOR_TARGET) fixtmp.c -w -U__SIZE_TYPE__ -U__PTRDIFF_TYPE__ -U__WCHAR_TYPE__ -E \ - | sed -e 's/ / /g' -e 's/ *(/ (/g' -e 's/ [ ]*/ /g' -e 's/( )/()/' \ - | $(RUN_GEN) build/gen-protos >xsys-protos.hT - mv xsys-protos.hT xsys-protos.h - rm -rf fixtmp.c - -# This is nominally a 'build' program, but it's run only when host==build, -# so we can (indeed, must) use $(LIBDEPS) and $(LIBS). -build/fix-header$(build_exeext): build/fix-header.o build/scan-decls.o \ - build/scan.o xsys-protos.h \ - $(BUILD_ERRORS) $(LIBDEPS) - $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o $@ \ - build/fix-header.o incpath.o cppdefault.o build/scan-decls.o prefix.o \ - build/scan.o $(BUILD_ERRORS) $(LIBS) - -build/fix-header.o: fix-header.c $(OBSTACK_H) scan.h errors.h \ - xsys-protos.h $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) $(CPPLIB_H) - -build/scan-decls.o: scan-decls.c scan.h $(CPPLIB_H) $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) - -# stmp-fixproto depends on this, not on fix-header directly. -# The idea is to make sure fix-header gets built, -# but not rerun fixproto after each stage -# just because fix-header's mtime has changed. -fixhdr.ready: build/fix-header$(build_exeext) - -if [ -f fixhdr.ready ] ; then \ - true; \ - else \ - $(STAMP) fixhdr.ready; \ - fi - -# stmp-int-hdrs is to make sure fixincludes has already finished. -# The if statement is so that we don't run fixproto a second time -# if it has already been run on the files in `include-fixed'. -stmp-fixproto: fixhdr.ready fixproto fixinc_list stmp-int-hdrs - set -e; for ml in `cat fixinc_list`; do \ - sysroot_headers_suffix=`echo $${ml} | sed -e 's/;.*$$//'`; \ - multi_dir=`echo $${ml} | sed -e 's/^[^;]*;//'`; \ - fix_dir=include-fixed$${multi_dir}; \ - if [ -f $${fix_dir}/fixed ] ; then true; \ - else \ - : This line works around a 'make' bug in BSDI 1.1.; \ - FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \ - FIX_HEADER="build/fix-header$(build_exeext)"; export FIX_HEADER; \ - mkinstalldirs="$(mkinstalldirs)"; \ - export mkinstalldirs; \ - if [ -d "$(SYSTEM_HEADER_DIR)" ]; then \ - $(SHELL) ${srcdir}/fixproto $${fix_dir} $${fix_dir} $(SYSTEM_HEADER_DIR); \ - if [ $$? -eq 0 ] ; then true ; else exit 1 ; fi ; \ - else true; fi; \ - $(STAMP) $${fix_dir}/fixed; \ - fi; \ - done - $(STAMP) stmp-fixproto - -# We can't run fixproto (it's being built for a different host), but we still -# need to install it so that the user can run it when the compiler is -# installed. -stmp-install-fixproto: fixproto - $(STAMP) $@ # # Remake the info files. @@ -4009,7 +3840,6 @@ mostlyclean: lang.mostlyclean -rm -f build/* -rm -f mddeps.mk # Delete other built files. - -rm -f xsys-protos.hT -rm -f specs.h options.c options.h # Delete the stamp and temporary files. -rm -f s-* tmp-* stamp-* stmp-* @@ -4017,11 +3847,8 @@ mostlyclean: lang.mostlyclean # Delete debugging dump files. -rm -f *.[0-9][0-9].* */*.[0-9][0-9].* # Delete some files made during installation. - -rm -f specs $(SPECS) SYSCALLS.c.X SYSCALLS.c + -rm -f specs $(SPECS) -rm -f collect collect2 mips-tfile mips-tdump -# Delete files generated for fixproto - -rm -rf $(build_exeext) xsys-protos.h deduced.h tmp-deduced.h \ - gen-protos$(build_exeext) fixproto.list fixtmp.* fixhdr.ready # Delete unwanted output files from TeX. -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg -rm -f */*.toc */*.log */*.vr */*.fn */*.cp */*.tp */*.ky */*.pg @@ -4142,16 +3969,6 @@ install-common: native lang.install-common installdirs # using -dumpspecs. We remove any old version because it would # otherwise override the specs built into the driver. rm -f $(DESTDIR)$(libsubdir)/specs -# Install protoize if it was compiled. - -if [ -f protoize$(exeext) ]; then \ - rm -f $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \ - $(INSTALL_PROGRAM) protoize$(exeext) $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \ - rm -f $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \ - $(INSTALL_PROGRAM) unprotoize$(exeext) $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \ - rm -f $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \ - $(INSTALL_DATA) SYSCALLS.c.X $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \ - chmod a-x $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \ - fi # Install gcov if it was compiled. -if [ -f gcov$(exeext) ]; \ then \ @@ -4299,7 +4116,7 @@ install-itoolsdirs: installdirs $(mkinstalldirs) $(DESTDIR)$(itoolsdir) # Install the include directory using tar. -install-headers-tar: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir +install-headers-tar: stmp-int-hdrs install-include-dir # We use `pwd`/include instead of just include to problems with CDPATH # Unless a full pathname is provided, some shells would print the new CWD, # found in CDPATH, corrupting the output. We could just redirect the @@ -4313,7 +4130,7 @@ install-headers-tar: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir # So use `exit 0' to ignore its exit status. # Install the include directory using cpio. -install-headers-cpio: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir +install-headers-cpio: stmp-int-hdrs install-include-dir # See discussion about the use of `pwd` above cd `${PWD_COMMAND}`/include ; \ find . -print | cpio -pdum $(DESTDIR)$(libsubdir)/include @@ -4321,7 +4138,7 @@ install-headers-cpio: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir find . -print | cpio -pdum $(DESTDIR)$(libsubdir)/include-fixed # Install the include directory using cp. -install-headers-cp: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir +install-headers-cp: stmp-int-hdrs install-include-dir cp -p -r include $(DESTDIR)$(libsubdir) cp -p -r include-fixed $(DESTDIR)$(libsubdir) @@ -4338,7 +4155,7 @@ real-install-headers-cp: cp -p -r include-fixed $(DESTDIR)$(libsubdir) # Install supporting files for fixincludes to be run later. -install-mkheaders: stmp-int-hdrs $(STMP_FIXPROTO) install-itoolsdirs \ +install-mkheaders: stmp-int-hdrs install-itoolsdirs \ macro_list fixinc_list $(INSTALL_DATA) $(srcdir)/gsyslimits.h \ $(DESTDIR)$(itoolsdatadir)/gsyslimits.h @@ -4351,20 +4168,11 @@ install-mkheaders: stmp-int-hdrs $(STMP_FIXPROTO) install-itoolsdirs \ done $(INSTALL_SCRIPT) $(srcdir)/../mkinstalldirs \ $(DESTDIR)$(itoolsdir)/mkinstalldirs ; \ - if [ x$(STMP_FIXPROTO) != x ] ; then \ - $(INSTALL_SCRIPT) $(srcdir)/fixproto $(DESTDIR)$(itoolsdir)/fixproto ; \ - $(INSTALL_PROGRAM) build/fix-header$(build_exeext) \ - $(DESTDIR)$(itoolsdir)/fix-header$(build_exeext) ; \ - else :; fi sysroot_headers_suffix='$${sysroot_headers_suffix}'; \ echo 'SYSTEM_HEADER_DIR="'"$(SYSTEM_HEADER_DIR)"'"' \ > $(DESTDIR)$(itoolsdatadir)/mkheaders.conf echo 'OTHER_FIXINCLUDES_DIRS="$(OTHER_FIXINCLUDES_DIRS)"' \ >> $(DESTDIR)$(itoolsdatadir)/mkheaders.conf - echo 'FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"' \ - >> $(DESTDIR)$(itoolsdatadir)/mkheaders.conf - echo 'STMP_FIXPROTO="$(STMP_FIXPROTO)"' \ - >> $(DESTDIR)$(itoolsdatadir)/mkheaders.conf echo 'STMP_FIXINC="$(STMP_FIXINC)"' \ >> $(DESTDIR)$(itoolsdatadir)/mkheaders.conf @@ -4383,13 +4191,9 @@ uninstall: lang.uninstall -if [ x$(cpp_install_dir) != x ]; then \ rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ else true; fi - -rm -rf $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext) - -rm -rf $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext) -rm -rf $(DESTDIR)$(bindir)/$(GCOV_INSTALL_NAME)$(exeext) -rm -rf $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext) -rm -rf $(DESTDIR)$(man1dir)/cpp$(man1ext) - -rm -rf $(DESTDIR)$(man1dir)/protoize$(man1ext) - -rm -rf $(DESTDIR)$(man1dir)/unprotoize$(man1ext) -rm -f $(DESTDIR)$(infodir)/cpp.info* $(DESTDIR)$(infodir)/gcc.info* -rm -f $(DESTDIR)$(infodir)/cppinternals.info* $(DESTDIR)$(infodir)/gccint.info* # diff --git a/gcc/bitmap.c b/gcc/bitmap.c index d2c2e05aae0..6230adbc029 100644 --- a/gcc/bitmap.c +++ b/gcc/bitmap.c @@ -806,6 +806,59 @@ bitmap_first_set_bit (const_bitmap a) #endif return bit_no; } + +/* Return the bit number of the first set bit in the bitmap. The + bitmap must be non-empty. */ + +unsigned +bitmap_last_set_bit (const_bitmap a) +{ + const bitmap_element *elt = a->current ? a->current : a->first; + unsigned bit_no; + BITMAP_WORD word; + int ix; + + gcc_assert (elt); + while (elt->next) + elt = elt->next; + bit_no = elt->indx * BITMAP_ELEMENT_ALL_BITS; + for (ix = BITMAP_ELEMENT_WORDS - 1; ix >= 0; ix--) + { + word = elt->bits[ix]; + if (word) + goto found_bit; + } + gcc_unreachable (); + found_bit: + bit_no += ix * BITMAP_WORD_BITS; + + /* Binary search for the last set bit. */ +#if GCC_VERSION >= 3004 + gcc_assert (sizeof(long) == sizeof (word)); + bit_no += sizeof (long) * 8 - __builtin_ctzl (word); +#else +#if BITMAP_WORD_BITS > 64 +#error "Fill out the table." +#endif +#if BITMAP_WORD_BITS > 32 + if ((word & 0xffffffff00000000)) + word >>= 32, bit_no += 32; +#endif + if (word & 0xffff0000) + word >>= 16, bit_no += 16; + if (!(word & 0xff00)) + word >>= 8, bit_no += 8; + if (!(word & 0xf0)) + word >>= 4, bit_no += 4; + if (!(word & 12)) + word >>= 2, bit_no += 2; + if (!(word & 2)) + word >>= 1, bit_no += 1; +#endif + + gcc_assert (word & 1); + return bit_no; +} /* DST = A & B. */ diff --git a/gcc/bitmap.h b/gcc/bitmap.h index a5b0528c3b6..99cf752f686 100644 --- a/gcc/bitmap.h +++ b/gcc/bitmap.h @@ -183,6 +183,7 @@ extern void bitmap_obstack_free (bitmap); #define dump_bitmap(file, bitmap) bitmap_print (file, bitmap, "", "\n") #define bitmap_zero(a) bitmap_clear (a) extern unsigned bitmap_first_set_bit (const_bitmap); +extern unsigned bitmap_last_set_bit (const_bitmap); /* Compute bitmap hash (for purposes of hashing etc.) */ extern hashval_t bitmap_hash(const_bitmap); diff --git a/gcc/c-parser.c b/gcc/c-parser.c index ea0036c0ba2..f910128de3f 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -5584,8 +5584,6 @@ c_parser_postfix_expression_after_primary (c_parser *parser, "expected %<)%>"); expr.value = build_function_call (expr.value, exprlist); expr.original_code = ERROR_MARK; - if (warn_disallowed_functions) - warn_if_disallowed_function_p (expr.value); break; case CPP_DOT: /* Structure element reference. */ diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 83188baf22f..4b5fa0eac1e 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -3437,6 +3437,7 @@ build_conditional_expr (tree ifexp, tree op1, tree op2) enum tree_code code2; tree result_type = NULL; tree orig_op1 = op1, orig_op2 = op2; + bool objc_ok; /* Promote both alternatives. */ @@ -3463,6 +3464,8 @@ build_conditional_expr (tree ifexp, tree op1, tree op2) return error_mark_node; } + objc_ok = objc_compare_types (type1, type2, -3, NULL_TREE); + /* Quickly detect the usual case where op1 and op2 have the same type after promotion. */ if (TYPE_MAIN_VARIANT (type1) == TYPE_MAIN_VARIANT (type2)) @@ -3546,8 +3549,9 @@ build_conditional_expr (tree ifexp, tree op1, tree op2) } else { - pedwarn (input_location, 0, - "pointer type mismatch in conditional expression"); + if (!objc_ok) + pedwarn (input_location, 0, + "pointer type mismatch in conditional expression"); result_type = build_pointer_type (void_type_node); } } diff --git a/gcc/cgraph.c b/gcc/cgraph.c index b1eea0b080f..d5dba426b1a 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -464,8 +464,6 @@ cgraph_node (tree decl) if (*slot) { node = *slot; - if (!node->master_clone) - node->master_clone = node; return node; } @@ -477,7 +475,6 @@ cgraph_node (tree decl) node->origin = cgraph_node (DECL_CONTEXT (decl)); node->next_nested = node->origin->nested; node->origin->nested = node; - node->master_clone = node; } if (assembler_name_hash) { @@ -655,6 +652,26 @@ cgraph_set_call_stmt (struct cgraph_edge *e, gimple new_stmt) } } +/* Give initial reasons why inlining would fail on EDGE. This gets either + nullified or usually overwritten by more precise reasons later. */ + +static void +initialize_inline_failed (struct cgraph_edge *e) +{ + struct cgraph_node *callee = e->callee; + + if (!callee->analyzed) + e->inline_failed = CIF_BODY_NOT_AVAILABLE; + else if (callee->local.redefined_extern_inline) + e->inline_failed = CIF_REDEFINED_EXTERN_INLINE; + else if (!callee->local.inlinable) + e->inline_failed = CIF_FUNCTION_NOT_INLINABLE; + else if (gimple_call_cannot_inline_p (e->call_stmt)) + e->inline_failed = CIF_MISMATCHED_ARGUMENTS; + else + e->inline_failed = CIF_FUNCTION_NOT_CONSIDERED; +} + /* Create edge from CALLER to CALLEE in the cgraph. */ struct cgraph_edge * @@ -682,16 +699,6 @@ cgraph_create_edge (struct cgraph_node *caller, struct cgraph_node *callee, edge->uid = cgraph_edge_max_uid++; } - if (!callee->analyzed) - edge->inline_failed = N_("function body not available"); - else if (callee->local.redefined_extern_inline) - edge->inline_failed = N_("redefined extern inline functions are not " - "considered for inlining"); - else if (callee->local.inlinable) - edge->inline_failed = N_("function not considered for inlining"); - else - edge->inline_failed = N_("function not inlinable"); - edge->aux = NULL; edge->caller = caller; @@ -725,6 +732,9 @@ cgraph_create_edge (struct cgraph_node *caller, struct cgraph_node *callee, gcc_assert (!*slot); *slot = edge; } + + initialize_inline_failed (edge); + return edge; } @@ -985,11 +995,6 @@ cgraph_remove_node (struct cgraph_node *node) if (node->next_clone) { struct cgraph_node *new_node = node->next_clone; - struct cgraph_node *n; - - /* Make the next clone be the master clone */ - for (n = new_node; n; n = n->next_clone) - n->master_clone = new_node; *slot = new_node; node->next_clone->prev_clone = NULL; @@ -1113,6 +1118,24 @@ cgraph_rtl_info (tree decl) return &node->rtl; } +/* Return a string describing the failure REASON. */ + +const char* +cgraph_inline_failed_string (cgraph_inline_failed_t reason) +{ +#undef DEFCIFCODE +#define DEFCIFCODE(code, string) string, + + static const char *cif_string_table[CIF_N_REASONS] = { +#include "cif-code.def" + }; + + /* Signedness of an enum type is implementation defined, so cast it + to unsigned before testing. */ + gcc_assert ((unsigned) reason < CIF_N_REASONS); + return cif_string_table[reason]; +} + /* Return name of the node used in debug output. */ const char * cgraph_node_name (struct cgraph_node *node) @@ -1139,8 +1162,6 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node) if (cgraph_function_flags_ready) fprintf (f, " availability:%s", cgraph_availability_names [cgraph_function_body_availability (node)]); - if (node->master_clone && node->master_clone->uid != node->uid) - fprintf (f, "(%i)", node->master_clone->uid); if (node->count) fprintf (f, " executed "HOST_WIDEST_INT_PRINT_DEC"x", (HOST_WIDEST_INT)node->count); @@ -1161,8 +1182,8 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node) fprintf (f, " reachable"); if (gimple_has_body_p (node->decl)) fprintf (f, " body"); - if (node->output) - fprintf (f, " output"); + if (node->process) + fprintf (f, " process"); if (node->local.local) fprintf (f, " local"); if (node->local.externally_visible) @@ -1349,7 +1370,6 @@ cgraph_clone_node (struct cgraph_node *n, gcov_type count, int freq, new_node->local = n->local; new_node->global = n->global; new_node->rtl = n->rtl; - new_node->master_clone = n->master_clone; new_node->count = count; if (n->count) { @@ -1381,28 +1401,6 @@ cgraph_clone_node (struct cgraph_node *n, gcov_type count, int freq, return new_node; } -/* Return true if N is an master_clone, (see cgraph_master_clone). */ - -bool -cgraph_is_master_clone (struct cgraph_node *n) -{ - return (n == cgraph_master_clone (n)); -} - -struct cgraph_node * -cgraph_master_clone (struct cgraph_node *n) -{ - enum availability avail = cgraph_function_body_availability (n); - - if (avail == AVAIL_NOT_AVAILABLE || avail == AVAIL_OVERWRITABLE) - return NULL; - - if (!n->master_clone) - n->master_clone = cgraph_node (n->decl); - - return n->master_clone; -} - /* NODE is no longer nested function; update cgraph accordingly. */ void cgraph_unnest_node (struct cgraph_node *node) @@ -1429,6 +1427,11 @@ cgraph_function_body_availability (struct cgraph_node *node) avail = AVAIL_LOCAL; else if (!node->local.externally_visible) avail = AVAIL_AVAILABLE; + /* Inline functions are safe to be analyzed even if their sybol can + be overwritten at runtime. It is not meaningful to enfore any sane + behaviour on replacing inline function by different body. */ + else if (DECL_DECLARED_INLINE_P (node->decl)) + avail = AVAIL_AVAILABLE; /* If the function can be overwritten, return OVERWRITABLE. Take care at least of two notable extensions - the COMDAT functions @@ -1438,15 +1441,9 @@ cgraph_function_body_availability (struct cgraph_node *node) ??? Does the C++ one definition rule allow us to always return AVAIL_AVAILABLE here? That would be good reason to preserve this - hook Similarly deal with extern inline functions - this is again - necessary to get C++ shared functions having keyed templates - right and in the C extension documentation we probably should - document the requirement of both versions of function (extern - inline and offline) having same side effect characteristics as - good optimization is what this optimization is about. */ - - else if (!(*targetm.binds_local_p) (node->decl) - && !DECL_COMDAT (node->decl) && !DECL_EXTERNAL (node->decl)) + bit. */ + + else if (DECL_REPLACEABLE_P (node->decl) && !DECL_EXTERNAL (node->decl)) avail = AVAIL_OVERWRITABLE; else avail = AVAIL_AVAILABLE; diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 29fc1ba4a4d..0e01a659419 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -143,9 +143,6 @@ struct cgraph_node GTY((chain_next ("%h.next"), chain_prev ("%h.previous"))) /* Pointer to the next clone. */ struct cgraph_node *next_clone; struct cgraph_node *prev_clone; - /* Pointer to a single unique cgraph node for this function. If the - function is to be output, this is the copy that will survive. */ - struct cgraph_node *master_clone; /* For functions with many calls sites it holds map from call expression to the edge to speed up cgraph_edge function. */ htab_t GTY((param_is (struct cgraph_edge))) call_site_hash; @@ -181,8 +178,8 @@ struct cgraph_node GTY((chain_next ("%h.next"), chain_prev ("%h.previous"))) /* Set once the function has been instantiated and its callee lists created. */ unsigned analyzed : 1; - /* Set when function is scheduled to be assembled. */ - unsigned output : 1; + /* Set when function is scheduled to be processed by local passes. */ + unsigned process : 1; /* Set for aliases once they got through assemble_alias. */ unsigned alias : 1; @@ -192,6 +189,13 @@ struct cgraph_node GTY((chain_next ("%h.next"), chain_prev ("%h.previous"))) tree inline_decl; }; +#define DEFCIFCODE(code, string) CIF_ ## code, +/* Reasons for inlining failures. */ +typedef enum { +#include "cif-code.def" + CIF_N_REASONS +} cgraph_inline_failed_t; + struct cgraph_edge GTY((chain_next ("%h.next_caller"), chain_prev ("%h.prev_caller"))) { struct cgraph_node *caller; @@ -202,9 +206,9 @@ struct cgraph_edge GTY((chain_next ("%h.next_caller"), chain_prev ("%h.prev_call struct cgraph_edge *next_callee; gimple call_stmt; PTR GTY ((skip (""))) aux; - /* When NULL, inline this call. When non-NULL, points to the explanation - why function was not inlined. */ - const char *inline_failed; + /* When equal to CIF_OK, inline this call. Otherwise, points to the + explanation why function was not inlined. */ + cgraph_inline_failed_t inline_failed; /* Expected number of executions: calculated in profile.c. */ gcov_type count; /* Expected frequency of executions within the function. @@ -334,9 +338,8 @@ bool cgraph_function_possibly_inlined_p (tree); void cgraph_unnest_node (struct cgraph_node *); enum availability cgraph_function_body_availability (struct cgraph_node *); -bool cgraph_is_master_clone (struct cgraph_node *); -struct cgraph_node *cgraph_master_clone (struct cgraph_node *); void cgraph_add_new_function (tree, bool); +const char* cgraph_inline_failed_string (cgraph_inline_failed_t); /* In cgraphunit.c */ void cgraph_finalize_function (tree, bool); @@ -345,7 +348,7 @@ void cgraph_finalize_compilation_unit (void); void cgraph_optimize (void); void cgraph_mark_needed_node (struct cgraph_node *); void cgraph_mark_reachable_node (struct cgraph_node *); -bool cgraph_inline_p (struct cgraph_edge *, const char **reason); +bool cgraph_inline_p (struct cgraph_edge *, cgraph_inline_failed_t *reason); bool cgraph_preserve_function_body_p (tree); void verify_cgraph (void); void verify_cgraph_node (struct cgraph_node *); @@ -454,7 +457,6 @@ varpool_next_static_initializer (struct varpool_node *node) /* In ipa-inline.c */ void cgraph_clone_inlined_nodes (struct cgraph_edge *, bool, bool); -bool cgraph_default_inline_p (struct cgraph_node *, const char **); unsigned int compute_inline_parameters (struct cgraph_node *); diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c index 75db87544ce..3868712b3f7 100644 --- a/gcc/cgraphbuild.c +++ b/gcc/cgraphbuild.c @@ -78,31 +78,6 @@ record_reference (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED) return NULL_TREE; } -/* Give initial reasons why inlining would fail on all calls from - NODE. Those get either nullified or usually overwritten by more precise - reason later. */ - -static void -initialize_inline_failed (struct cgraph_node *node) -{ - struct cgraph_edge *e; - - for (e = node->callers; e; e = e->next_caller) - { - gcc_assert (!e->callee->global.inlined_to); - gcc_assert (e->inline_failed); - if (node->local.redefined_extern_inline) - e->inline_failed = N_("redefined extern inline functions are not " - "considered for inlining"); - else if (!node->local.inlinable) - e->inline_failed = N_("function not inlinable"); - else if (gimple_call_cannot_inline_p (e->call_stmt)) - e->inline_failed = N_("mismatched arguments"); - else - e->inline_failed = N_("function not considered for inlining"); - } -} - /* Computes the frequency of the call statement so that it can be stored in cgraph_edge. BB is the basic block of the call statement. */ int @@ -194,7 +169,6 @@ build_cgraph_edges (void) } pointer_set_destroy (visited_nodes); - initialize_inline_failed (node); return 0; } @@ -254,8 +228,8 @@ rebuild_cgraph_edges (void) bb->loop_depth); } - initialize_inline_failed (node); gcc_assert (!node->global.inlined_to); + return 0; } diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 07998d4af8c..9f6a50ddcbe 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -426,7 +426,7 @@ cgraph_process_new_functions (void) case CGRAPH_STATE_EXPANSION: /* Functions created during expansion shall be compiled directly. */ - node->output = 0; + node->process = 0; cgraph_expand_function (node); break; @@ -452,12 +452,12 @@ cgraph_process_new_functions (void) static void cgraph_reset_node (struct cgraph_node *node) { - /* If node->output is set, then we have already begun whole-unit analysis. + /* If node->process is set, then we have already begun whole-unit analysis. This is *not* testing for whether we've already emitted the function. That case can be sort-of legitimately seen with real function redefinition errors. I would argue that the front end should never present us with such a case, but don't enforce that for now. */ - gcc_assert (!node->output); + gcc_assert (!node->process); /* Reset our data structures so we can analyze the function again. */ memset (&node->local, 0, sizeof (node->local)); @@ -990,7 +990,7 @@ cgraph_mark_functions_to_output (void) tree decl = node->decl; struct cgraph_edge *e; - gcc_assert (!node->output); + gcc_assert (!node->process); for (e = node->callers; e; e = e->next_caller) if (e->inline_failed) @@ -1005,7 +1005,7 @@ cgraph_mark_functions_to_output (void) || (e && node->reachable)) && !TREE_ASM_WRITTEN (decl) && !DECL_EXTERNAL (decl)) - node->output = 1; + node->process = 1; else { /* We should've reclaimed all functions that are not needed. */ @@ -1038,6 +1038,7 @@ cgraph_expand_function (struct cgraph_node *node) gcc_assert (!node->global.inlined_to); announce_function (decl); + node->process = 0; gcc_assert (node->lowered); @@ -1061,7 +1062,7 @@ cgraph_expand_function (struct cgraph_node *node) /* Return true when CALLER_DECL should be inlined into CALLEE_DECL. */ bool -cgraph_inline_p (struct cgraph_edge *e, const char **reason) +cgraph_inline_p (struct cgraph_edge *e, cgraph_inline_failed_t *reason) { *reason = e->inline_failed; return !e->inline_failed; @@ -1093,16 +1094,16 @@ cgraph_expand_all_functions (void) /* Garbage collector may remove inline clones we eliminate during optimization. So we must be sure to not reference them. */ for (i = 0; i < order_pos; i++) - if (order[i]->output) + if (order[i]->process) order[new_order_pos++] = order[i]; for (i = new_order_pos - 1; i >= 0; i--) { node = order[i]; - if (node->output) + if (node->process) { gcc_assert (node->reachable); - node->output = 0; + node->process = 0; cgraph_expand_function (node); } } @@ -1151,7 +1152,7 @@ cgraph_output_in_order (void) for (pf = cgraph_nodes; pf; pf = pf->next) { - if (pf->output) + if (pf->process) { i = pf->order; gcc_assert (nodes[i].kind == ORDER_UNDEFINED); @@ -1191,7 +1192,7 @@ cgraph_output_in_order (void) switch (nodes[i].kind) { case ORDER_FUNCTION: - nodes[i].u.f->output = 0; + nodes[i].u.f->process = 0; cgraph_expand_function (nodes[i].u.f); break; diff --git a/gcc/cif-code.def b/gcc/cif-code.def new file mode 100644 index 00000000000..48dbabffbed --- /dev/null +++ b/gcc/cif-code.def @@ -0,0 +1,86 @@ +/* This file contains the definitions of the cgraph_inline_failed_t + enums used in GCC. + + Copyright (C) 2008 Free Software Foundation, Inc. + Contributed by Doug Kwan <dougkwan@google.com> + +This file is part of GCC. + +GCC is free software you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with GCC see the file COPYING3. If not see +<http://www.gnu.org/licenses/>. */ + +/* The format of this file is + DEFCIFCODE(code, string). + + Where symbol is the enumeration name without the ``''. + The argument STRING is a explain the failure. Except for OK, + which is a NULL pointer. */ + +/* Inlining successful. This must be the first code. */ +DEFCIFCODE(OK , NULL) + +/* Inlining failed for an unspecified reason. */ +DEFCIFCODE(UNSPECIFIED , "") + +/* Function has not be considered for inlining. This is the code for + functions that have not been rejected for inlining yet. */ +DEFCIFCODE(FUNCTION_NOT_CONSIDERED, + N_("function not considered for inlining")) + +/* Inlining failed owing to unavailable function body. */ +DEFCIFCODE(BODY_NOT_AVAILABLE, N_("function body not available")) + +DEFCIFCODE(REDEFINED_EXTERN_INLINE, + N_("redefined extern inline functions are not considered for " + "inlining")) + +/* Function is not inlinable. */ +DEFCIFCODE(FUNCTION_NOT_INLINABLE, N_("function not inlinable")) + +/* Function is not an inlining candidate. */ +DEFCIFCODE(FUNCTION_NOT_INLINE_CANDIDATE, N_("function not inline candidate")) + +/* Inlining failed because of various limit parameters. */ +DEFCIFCODE(LARGE_FUNCTION_GROWTH_LIMIT, + N_("--param large-function-growth limit reached")) +DEFCIFCODE(LARGE_STACK_FRAME_GROWTH_LIMIT, + N_("--param large-stack-frame-growth limit reached")) +DEFCIFCODE(MAX_INLINE_INSNS_SINGLE_LIMIT, + N_("--param max-inline-insns-single limit reached")) +DEFCIFCODE(MAX_INLINE_INSNS_AUTO_LIMIT, + N_("--param max-inline-insns-auto limit reached")) +DEFCIFCODE(INLINE_UNIT_GROWTH_LIMIT, + N_("--param inline-unit-growth limit reached")) + +/* Recursive inlining. */ +DEFCIFCODE(RECURSIVE_INLINING, N_("recursive inlining")) + +/* Call is unlikely. */ +DEFCIFCODE(UNLIKELY_CALL, N_("call is unlikely and code size would grow")) + +/* Function is not declared as an inline. */ +DEFCIFCODE(NOT_DECLARED_INLINED, + N_("function not declared inline and code size would grow")) + +/* Inlining suppressed due to size optimization. */ +DEFCIFCODE(OPTIMIZING_FOR_SIZE, + N_("optimizing for size and code size would grow")) + +/* Inlining failed because of mismatched options or arguments. */ +DEFCIFCODE(TARGET_OPTION_MISMATCH, N_("target specific option mismatch")) +DEFCIFCODE(MISMATCHED_ARGUMENTS, N_("mismatched arguments")) + +/* Call was originally indirect. */ +DEFCIFCODE(ORIGINALLY_INDIRECT_CALL, + N_("originally indirect function call not considered for inlining")) diff --git a/gcc/common.opt b/gcc/common.opt index b2807f06033..023d773586a 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -94,10 +94,6 @@ Wdisabled-optimization Common Var(warn_disabled_optimization) Warning Warn when an optimization pass is disabled -Wdisallowed-function-list= -Common RejectNegative Joined Warning -Warn on calls to these functions - Werror Common Var(warnings_are_errors) Treat all warnings as errors diff --git a/gcc/config.gcc b/gcc/config.gcc index d89de15bacd..17c713679b6 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -155,9 +155,6 @@ # configure_default_options # Set to an initializer for configure_default_options # in configargs.h, based on --with-cpu et cetera. -# -# use_fixproto Set to "yes" if fixproto should be run normally, -# "no" if fixproto should never be run. # The following variables are used in each case-construct to build up the # outgoing variables: @@ -196,40 +193,21 @@ default_use_cxa_atexit=no target_gtfiles= need_64bit_hwint= -# Default to not using fixproto. Targets which need fixproto should -# specifically set this to 'yes'. -use_fixproto=no - # Don't carry these over build->host->target. Please. xm_file= md_file= # Obsolete configurations. -case ${target} in -# Avoid generic cases below matching. - h8300-*-rtems* | h8300-*-elf* \ - | sh-*-elf* | sh-*-symbianelf* | sh-*-linux* | sh-*-netbsdelf* \ - | sh-*-rtems* | sh-wrs-vxworks) ;; - arm-*-coff* \ - | armel-*-coff* \ - | h8300-*-* \ - | i[34567]86-*-aout* \ - | i[34567]86-*-coff* \ - | m68k-*-aout* \ - | m68k-*-coff* \ - | sh-*-* \ - | pdp11-*-bsd \ - | rs6000-ibm-aix4.[12]* \ - | powerpc-ibm-aix4.[12]* \ - ) - if test "x$enable_obsolete" != xyes; then - echo "*** Configuration ${target} is obsolete." >&2 - echo "*** Specify --enable-obsolete to build it anyway." >&2 - echo "*** Support will be REMOVED in the next major release of GCC," >&2 - echo "*** unless a maintainer comes forward." >&2 - exit 1 - fi;; -esac +#case ${target} in +# ) +# if test "x$enable_obsolete" != xyes; then +# echo "*** Configuration ${target} is obsolete." >&2 +# echo "*** Specify --enable-obsolete to build it anyway." >&2 +# echo "*** Support will be REMOVED in the next major release of GCC," >&2 +# echo "*** unless a maintainer comes forward." >&2 +# exit 1 +# fi;; +#esac # Unsupported targets list. Do not put an entry in this list unless # it would otherwise be caught by a more permissive pattern. The list @@ -238,6 +216,7 @@ case ${target} in i[34567]86-go32-* \ | i[34567]86-*-go32* \ | mips64orion*-*-rtems* \ + | pdp11-*-bsd \ | sparc-hal-solaris2* \ | thumb-*-* \ | *-*-linux*aout* \ @@ -681,10 +660,6 @@ arc-*-elf*) tm_file="dbxelf.h elfos.h svr4.h ${tm_file}" extra_parts="crtinit.o crtfini.o" ;; -arm-*-coff* | armel-*-coff*) - tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h dbxcoff.h" - tmake_file="arm/t-arm arm/t-arm-coff" - ;; arm-wrs-vxworks) tm_file="elfos.h arm/elf.h arm/aout.h ${tm_file} vx-common.h vxworks.h arm/vxworks.h" tmake_file="${tmake_file} arm/t-arm arm/t-vxworks" @@ -885,9 +860,6 @@ h8300-*-elf*) tmake_file="h8300/t-h8300 h8300/t-elf" tm_file="h8300/h8300.h dbxelf.h elfos.h h8300/elf.h" ;; -h8300-*-*) - tm_file="h8300/h8300.h dbxcoff.h h8300/coff.h" - ;; hppa*64*-*-linux*) target_cpu_default="MASK_PA_11|MASK_PA_20" tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h svr4.h linux.h \ @@ -1037,9 +1009,6 @@ x86_64-*-elf*) tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h i386/x86-64.h" tmake_file="${tmake_file} i386/t-i386elf t-svr4" ;; -i[34567]86-*-aout*) - tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h i386/i386-aout.h" - ;; i[34567]86-*-freebsd*) tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h" ;; @@ -1073,9 +1042,6 @@ i[34567]86-*-openbsd*) gas=yes gnu_ld=yes ;; -i[34567]86-*-coff*) - tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/i386-coff.h" - ;; i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu) # Intel 80386's running GNU/* # with ELF format using glibc 2 @@ -1404,19 +1370,6 @@ m68hc12-*-*|m6812-*-*) tmake_file="m68hc11/t-m68hc11" extra_options="${extra_options} m68hc11/m68hc11.opt" ;; -m68k-*-aout*) - default_m68k_cpu=68020 - default_cf_cpu=5206 - tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-mlibs" - tm_file="${tm_file} m68k/m68k-none.h m68k/m68kemb.h m68k/m68k-aout.h libgloss.h" - ;; -m68k-*-coff*) - default_m68k_cpu=68020 - default_cf_cpu=5206 - tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-mlibs" - tm_defines="${tm_defines} MOTOROLA=1" - tm_file="${tm_file} m68k/m68k-none.h m68k/m68kemb.h dbxcoff.h m68k/coff.h dbx.h" - ;; m68k-*-elf* | fido-*-elf*) case ${target} in fido-*-elf*) @@ -1715,10 +1668,6 @@ mn10300-*-*) fi use_collect2=no ;; -pdp11-*-bsd) - tm_file="${tm_file} pdp11/2bsd.h" - use_fixproto=yes - ;; pdp11-*-*) ;; picochip-*) @@ -1915,14 +1864,6 @@ powerpc-xilinx-eabi*) extra_options="${extra_options} rs6000/sysv4.opt" tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm" ;; -rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*) - tm_file="${tm_file} rs6000/aix.h rs6000/aix41.h rs6000/xcoff.h" - tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-newas" - extra_options="${extra_options} rs6000/aix41.opt" - use_collect2=yes - extra_headers= - use_fixproto=yes - ;; rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*) tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix43.h rs6000/xcoff.h" tmake_file=rs6000/t-aix43 @@ -2164,9 +2105,6 @@ sh-wrs-vxworks) tmake_file="$tmake_file sh/t-sh sh/t-elf sh/t-vxworks" tm_file="${tm_file} elfos.h svr4.h sh/elf.h sh/embed-elf.h vx-common.h vxworks.h sh/vxworks.h" ;; -sh-*-*) - tm_file="${tm_file} dbxcoff.h sh/coff.h" - ;; sparc-*-netbsdelf*) tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h" extra_options="${extra_options} sparc/long-double-switch.opt" diff --git a/gcc/config.in b/gcc/config.in index cb4d82bc5fc..7c34eed3282 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -169,13 +169,6 @@ #endif -/* Define to the type of elements in the array set by `getgroups'. Usually - this is either `int' or `gid_t'. */ -#ifndef USED_FOR_TARGET -#undef GETGROUPS_T -#endif - - /* Define if the zone collector is in use */ #ifndef USED_FOR_TARGET #undef GGC_ZONE @@ -1553,12 +1546,6 @@ #endif -/* Define to `int' if <sys/types.h> doesn't define. */ -#ifndef USED_FOR_TARGET -#undef gid_t -#endif - - /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus @@ -1583,12 +1570,6 @@ #endif -/* Define to `int' if <sys/types.h> doesn't define. */ -#ifndef USED_FOR_TARGET -#undef uid_t -#endif - - /* Define as `fork' if `vfork' does not work. */ #ifndef USED_FOR_TARGET #undef vfork diff --git a/gcc/config/arm/t-arm-coff b/gcc/config/arm/t-arm-coff deleted file mode 100644 index 04880833e85..00000000000 --- a/gcc/config/arm/t-arm-coff +++ /dev/null @@ -1,34 +0,0 @@ -LIB1ASMSRC = arm/lib1funcs.asm -LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _bb_init_func _call_via_rX _interwork_call_via_rX _clzsi2 _clzdi2 - -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - echo '#ifndef __ARMEB__' >> fp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c - echo '#endif' >> fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - echo '#ifndef __ARMEB__' > dp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c - echo '#define FLOAT_WORD_ORDER_MISMATCH' >> dp-bit.c - echo '#endif' >> dp-bit.c - cat $(srcdir)/config/fp-bit.c >> dp-bit.c - -MULTILIB_OPTIONS = mlittle-endian/mbig-endian mhard-float/msoft-float marm/mthumb mno-thumb-interwork/mthumb-interwork -MULTILIB_DIRNAMES = le be fpu soft arm thumb normal interwork -MULTILIB_MATCHES = -EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o - -LIBGCC = stmp-multilib -INSTALL_LIBGCC = install-multilib - -# Currently there is a bug somewhere in GCC's alias analysis -# or scheduling code that is breaking _fpmul_parts in fp-bit.c. -# Disabling function inlining is a workaround for this problem. -TARGET_LIBGCC2_CFLAGS = -fno-inline diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 08aace66dda..82a9742392c 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -219,6 +219,8 @@ static const struct mcu_type_s avr_mcu_types[] = { { "atmega8hva", ARCH_AVR4, "__AVR_ATmega8HVA__" }, { "atmega4hvd", ARCH_AVR4, "__AVR_ATmega4HVD__" }, { "atmega8hvd", ARCH_AVR4, "__AVR_ATmega8HVD__" }, + { "atmega8c1", ARCH_AVR4, "__AVR_ATmega8C1__" }, + { "atmega8m1", ARCH_AVR4, "__AVR_ATmega8M1__" }, { "at90pwm1", ARCH_AVR4, "__AVR_AT90PWM1__" }, { "at90pwm2", ARCH_AVR4, "__AVR_AT90PWM2__" }, { "at90pwm2b", ARCH_AVR4, "__AVR_AT90PWM2B__" }, @@ -266,6 +268,7 @@ static const struct mcu_type_s avr_mcu_types[] = { { "at90can64", ARCH_AVR5, "__AVR_AT90CAN64__" }, { "at90pwm216", ARCH_AVR5, "__AVR_AT90PWM216__" }, { "at90pwm316", ARCH_AVR5, "__AVR_AT90PWM316__" }, + { "atmega16c1", ARCH_AVR5, "__AVR_ATmega16C1__" }, { "atmega32c1", ARCH_AVR5, "__AVR_ATmega32C1__" }, { "atmega64c1", ARCH_AVR5, "__AVR_ATmega64C1__" }, { "atmega16m1", ARCH_AVR5, "__AVR_ATmega16M1__" }, diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h index c41ac0b930d..54c607a0e04 100644 --- a/gcc/config/avr/avr.h +++ b/gcc/config/avr/avr.h @@ -890,8 +890,11 @@ mmcu=*:-mmcu=%*}" mmcu=attiny327|\ mmcu=at90can*|\ mmcu=at90pwm*|\ + mmcu=atmega8c1|\ + mmcu=atmega16c1|\ mmcu=atmega32c1|\ mmcu=atmega64c1|\ + mmcu=atmega8m1|\ mmcu=atmega16m1|\ mmcu=atmega32m1|\ mmcu=atmega64m1|\ @@ -972,6 +975,8 @@ mmcu=*:-mmcu=%*}" %{mmcu=atmega88p:crtm88p.o%s} \ %{mmcu=atmega8515:crtm8515.o%s} \ %{mmcu=atmega8535:crtm8535.o%s} \ +%{mmcu=atmega8c1:crtm8c1.o%s} \ +%{mmcu=atmega8m1:crtm8m1.o%s} \ %{mmcu=at90pwm1:crt90pwm1.o%s} \ %{mmcu=at90pwm2:crt90pwm2.o%s} \ %{mmcu=at90pwm2b:crt90pwm2b.o%s} \ @@ -1020,6 +1025,7 @@ mmcu=*:-mmcu=%*}" %{mmcu=at90can64:crtcan64.o%s} \ %{mmcu=at90pwm216:crt90pwm216.o%s} \ %{mmcu=at90pwm316:crt90pwm316.o%s} \ +%{mmcu=atmega16c1:crtm16c1.o%s} \ %{mmcu=atmega32c1:crtm32c1.o%s} \ %{mmcu=atmega64c1:crtm64c1.o%s} \ %{mmcu=atmega16m1:crtm16m1.o%s} \ diff --git a/gcc/config/avr/t-avr b/gcc/config/avr/t-avr index 9d8d386c787..7513b3d4afb 100644 --- a/gcc/config/avr/t-avr +++ b/gcc/config/avr/t-avr @@ -79,6 +79,8 @@ MULTILIB_MATCHES = \ mmcu?avr4=mmcu?atmega8hva \ mmcu?avr4=mmcu?atmega4hvd \ mmcu?avr4=mmcu?atmega8hvd \ + mmcu?avr4=mmcu?atmega8c1 \ + mmcu?avr4=mmcu?atmega8m1 \ mmcu?avr4=mmcu?at90pwm1 \ mmcu?avr4=mmcu?at90pwm2 \ mmcu?avr4=mmcu?at90pwm2b \ @@ -124,6 +126,7 @@ MULTILIB_MATCHES = \ mmcu?avr5=mmcu?at90can64 \ mmcu?avr5=mmcu?at90pwm216 \ mmcu?avr5=mmcu?at90pwm316 \ + mmcu?avr5=mmcu?atmega16c1 \ mmcu?avr5=mmcu?atmega32c1 \ mmcu?avr5=mmcu?atmega64c1 \ mmcu?avr5=mmcu?atmega16m1 \ diff --git a/gcc/config/h8300/coff.h b/gcc/config/h8300/coff.h deleted file mode 100644 index d4b6c9b7da9..00000000000 --- a/gcc/config/h8300/coff.h +++ /dev/null @@ -1,51 +0,0 @@ -/* Definitions of target machine for GNU compiler. - Renesas H8/300 version generating coff - Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc. - Contributed by Steve Chamberlain (sac@cygnus.com), - Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com). - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING3. If not see -<http://www.gnu.org/licenses/>. */ - -#ifndef GCC_H8300_COFF_H -#define GCC_H8300_COFF_H - -#define SDB_DEBUGGING_INFO 1 -#define SDB_DELIM "\n" - -/* Generate a blank trailing N_SO to mark the end of the .o file, since - we can't depend upon the linker to mark .o file boundaries with - embedded stabs. */ - -#define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END - -/* This is how to output an assembler line - that says to advance the location counter by SIZE bytes. */ - -#define ASM_OUTPUT_IDENT(FILE, NAME) \ - fprintf (FILE, "%s\"%s\"\n", IDENT_ASM_OP, NAME) - -#define IDENT_ASM_OP "\t.ident\t" -#define INIT_SECTION_ASM_OP "\t.section .init" -#define READONLY_DATA_SECTION_ASM_OP "\t.section .rodata" - -/* Switch into a generic section. */ -#define TARGET_ASM_NAMED_SECTION h8300_asm_named_section - -/* A bit-field declared as `int' forces `int' alignment for the struct. */ -#define PCC_BITFIELD_TYPE_MATTERS 0 - -#endif /* h8300/coff.h */ diff --git a/gcc/config/i386/i386-aout.h b/gcc/config/i386/i386-aout.h deleted file mode 100644 index e28f28c0280..00000000000 --- a/gcc/config/i386/i386-aout.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Definitions for "naked" Intel 386 using a.out (or coff encap'd - a.out) object format and stabs debugging info. - - Copyright (C) 1994, 2002, 2007 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING3. If not see -<http://www.gnu.org/licenses/>. */ - - -#define TARGET_VERSION fprintf (stderr, " (80386, BSD a.out syntax)"); - -/* end of i386-aout.h */ diff --git a/gcc/config/i386/i386-coff.h b/gcc/config/i386/i386-coff.h deleted file mode 100644 index af0204bb59e..00000000000 --- a/gcc/config/i386/i386-coff.h +++ /dev/null @@ -1,69 +0,0 @@ -/* Definitions for "naked" Intel 386 using coff object format files - and coff debugging info. - - Copyright (C) 1994, 2000, 2002, 2004, 2007 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING3. If not see -<http://www.gnu.org/licenses/>. */ - - -#define TARGET_VERSION fprintf (stderr, " (80386, COFF BSD syntax)"); - -#define TARGET_OS_CPP_BUILTINS() /* Sweet FA. */ - -/* We want to be able to get DBX debugging information via -gstabs. */ - -#define DBX_DEBUGGING_INFO 1 - -#undef PREFERRED_DEBUGGING_TYPE -#define PREFERRED_DEBUGGING_TYPE SDB_DEBUG - -/* Switch into a generic section. */ -#define TARGET_ASM_NAMED_SECTION default_coff_asm_named_section - -/* Prefix for internally generated assembler labels. If we aren't using - underscores, we are using prefix `.'s to identify labels that should - be ignored, as in `i386/gas.h' --karl@cs.umb.edu */ - -#undef LPREFIX -#define LPREFIX ".L" - -/* The prefix to add to user-visible assembler symbols. */ - -#undef USER_LABEL_PREFIX -#define USER_LABEL_PREFIX "" - -/* If user-symbols don't have underscores, - then it must take more than `L' to identify - a label that should be ignored. */ - -/* This is how to store into the string BUF - the symbol_ref name of an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. - This is suitable for output with `assemble_name'. */ - -#undef ASM_GENERATE_INTERNAL_LABEL -#define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ - sprintf ((BUF), ".%s%ld", (PREFIX), (long)(NUMBER)) - -/* GNU as expects alignment to be the number of bytes instead of the log for - COFF targets. */ - -#undef ASM_OUTPUT_ALIGN -#define ASM_OUTPUT_ALIGN(FILE,LOG) \ - if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1<<(LOG)) - -/* end of i386-coff.h */ diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index a87b762f966..02ab022f320 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -19474,6 +19474,8 @@ ix86_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost) if (modified_in_p (addr, dep_insn)) cost += 1; } + else if (ix86_agi_dependent (dep_insn, insn)) + cost += 1; /* ??? Compares pair with jump/setcc. */ if (ix86_flags_dependent (insn, dep_insn, insn_type)) @@ -20566,6 +20568,7 @@ enum ix86_builtins /* TFmode support builtins. */ IX86_BUILTIN_INFQ, + IX86_BUILTIN_HUGE_VALQ, IX86_BUILTIN_FABSQ, IX86_BUILTIN_COPYSIGNQ, @@ -23734,6 +23737,11 @@ ix86_init_builtins (void) NULL, NULL_TREE); ix86_builtins[(int) IX86_BUILTIN_INFQ] = decl; + decl = add_builtin_function ("__builtin_huge_valq", ftype, + IX86_BUILTIN_HUGE_VALQ, BUILT_IN_MD, + NULL, NULL_TREE); + ix86_builtins[(int) IX86_BUILTIN_HUGE_VALQ] = decl; + /* We will expand them to normal call if SSE2 isn't available since they are used by libgcc. */ ftype = build_function_type_list (float128_type_node, @@ -25189,6 +25197,7 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED, return ix86_expand_vec_set_builtin (exp); case IX86_BUILTIN_INFQ: + case IX86_BUILTIN_HUGE_VALQ: { REAL_VALUE_TYPE inf; rtx tmp; diff --git a/gcc/config/libgloss.h b/gcc/config/libgloss.h deleted file mode 100644 index 2e4553b3b42..00000000000 --- a/gcc/config/libgloss.h +++ /dev/null @@ -1,37 +0,0 @@ -/* libgloss.h -- operating system specific defines to be used when - targeting GCC for Libgloss supported targets. - Copyright (C) 1996, 2004, 2007 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING3. If not see -<http://www.gnu.org/licenses/>. */ - -/* This file should not be used for ELF targets, as this definition of - STARTFILE_SPEC is all wrong. */ - -/* The libgloss standard for crt0.s has the name based on the command line - option. */ -#undef STARTFILE_SPEC -#define STARTFILE_SPEC "%{!shared:%{pg:pgcrt0%O%s}%{!pg:%{p:pcrt0%O%s}%{!p:crt0%O%s}}}" - -/* This file used to force LINK_SPEC to be the null string, but that is not - correct. LINK_SPEC is used to pass machine specific arguments to the - linker and hence cannot be redefined here. LINK_SPEC is never used to - specify startup files or libraries, so it should never conflict with - libgloss. */ - -/* Don't set the target flags, this is done by the linker script */ -#undef LIB_SPEC -#define LIB_SPEC "" diff --git a/gcc/config/m32r/t-linux b/gcc/config/m32r/t-linux index 311c4e7ef9b..1ccdcc93473 100644 --- a/gcc/config/m32r/t-linux +++ b/gcc/config/m32r/t-linux @@ -27,10 +27,6 @@ dp-bit.c: $(srcdir)/config/fp-bit.c CRTSTUFF_T_CFLAGS_S = -fPIC - -# Don't run fixproto -STMP_FIXPROTO = - # Don't install "assert.h" in gcc. We use the one in glibc. INSTALL_ASSERT_H = diff --git a/gcc/config/m68k/coff.h b/gcc/config/m68k/coff.h deleted file mode 100644 index cb548abd020..00000000000 --- a/gcc/config/m68k/coff.h +++ /dev/null @@ -1,88 +0,0 @@ -/* Definitions of target machine for GNU compiler. - m68k series COFF object files and debugging, version. - Copyright (C) 1994, 1996, 1997, 2000, 2002, 2003, 2004, 2007 - Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING3. If not see -<http://www.gnu.org/licenses/>. */ - -/* This file is included after m68k.h by CPU COFF specific files. It - is not a complete target itself. */ - -/* Used in m68k.c to include required support code. */ - -#define M68K_TARGET_COFF 1 - -/* Generate sdb debugging information. */ - -#define SDB_DEBUGGING_INFO 1 - -/* COFF symbols don't start with an underscore. */ - -#undef USER_LABEL_PREFIX -#define USER_LABEL_PREFIX "" - -/* Use a prefix for local labels, just to be on the save side. */ - -#undef LOCAL_LABEL_PREFIX -#define LOCAL_LABEL_PREFIX "." - -/* Use a register prefix to avoid clashes with external symbols (classic - example: `extern char PC;' in termcap). */ - -#undef REGISTER_PREFIX -#define REGISTER_PREFIX "%" - -/* config/m68k.md has an explicit reference to the program counter, - prefix this by the register prefix. */ - -#define ASM_RETURN_CASE_JUMP \ - do { \ - if (TARGET_COLDFIRE) \ - { \ - if (ADDRESS_REG_P (operands[0])) \ - return "jmp %%pc@(2,%0:l)"; \ - else \ - return "ext%.l %0\n\tjmp %%pc@(2,%0:l)"; \ - } \ - else \ - return "jmp %%pc@(2,%0:w)"; \ - } while (0) - -#define TARGET_ASM_FILE_START_FILE_DIRECTIVE true - -/* If defined, a C expression whose value is a string containing the - assembler operation to identify the following data as uninitialized global - data. */ - -#define BSS_SECTION_ASM_OP "\t.section\t.bss" - -/* A C statement (sans semicolon) to output to the stdio stream - FILE the assembler definition of uninitialized global DECL named - NAME whose size is SIZE bytes and alignment is ALIGN bytes. - Try to use asm_output_aligned_bss to implement this macro. */ - -#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ - asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN)) - -/* Switch into a generic section. */ -#undef TARGET_ASM_NAMED_SECTION -#define TARGET_ASM_NAMED_SECTION m68k_coff_asm_named_section - -/* Don't assume anything about startfiles. */ - -#undef STARTFILE_SPEC -#define STARTFILE_SPEC "" diff --git a/gcc/config/m68k/m68k-aout.h b/gcc/config/m68k/m68k-aout.h deleted file mode 100644 index df2cdf7a44a..00000000000 --- a/gcc/config/m68k/m68k-aout.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Definitions of target machine for GNU compiler. "naked" 68020, - a.out object files and debugging, version. - Copyright (C) 1994, 1996, 2003, 2007 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING3. If not see -<http://www.gnu.org/licenses/>. */ - -#define DBX_DEBUGGING_INFO 1 -#undef SDB_DEBUGGING_INFO - -/* If defined, a C expression whose value is a string containing the - assembler operation to identify the following data as uninitialized global - data. */ -#define BSS_SECTION_ASM_OP "\t.bss" - -/* A C statement (sans semicolon) to output to the stdio stream - FILE the assembler definition of uninitialized global DECL named - NAME whose size is SIZE bytes. The variable ROUNDED - is the size rounded up to whatever alignment the caller wants. - Try to use asm_output_bss to implement this macro. */ -/* a.out files typically can't handle arbitrary variable alignments so - define ASM_OUTPUT_BSS instead of ASM_OUTPUT_ALIGNED_BSS. */ -#define ASM_OUTPUT_BSS(FILE, DECL, NAME, SIZE, ROUNDED) \ - asm_output_bss ((FILE), (DECL), (NAME), (SIZE), (ROUNDED)) diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index 2f931c6be42..bccb8348a55 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -1,6 +1,6 @@ /* Subroutines for insn-output.c for Motorola 68000 family. Copyright (C) 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2003, 2004, 2005, 2006, 2007, 2008 + 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of GCC. @@ -134,9 +134,6 @@ static int m68k_sched_first_cycle_multipass_dfa_lookahead (void); static bool m68k_handle_option (size_t, const char *, int); static rtx find_addr_reg (rtx); static const char *singlemove_string (rtx *); -#ifdef M68K_TARGET_COFF -static void m68k_coff_asm_named_section (const char *, unsigned int, tree); -#endif /* M68K_TARGET_COFF */ static void m68k_output_mi_thunk (FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT, tree); static rtx m68k_struct_value_rtx (tree, int); @@ -4336,26 +4333,6 @@ output_sibcall (rtx x) return "jmp %a0"; } -#ifdef M68K_TARGET_COFF - -/* Output assembly to switch to section NAME with attribute FLAGS. */ - -static void -m68k_coff_asm_named_section (const char *name, unsigned int flags, - tree decl ATTRIBUTE_UNUSED) -{ - char flagchar; - - if (flags & SECTION_WRITE) - flagchar = 'd'; - else - flagchar = 'x'; - - fprintf (asm_out_file, "\t.section\t%s,\"%c\"\n", name, flagchar); -} - -#endif /* M68K_TARGET_COFF */ - static void m68k_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED, HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset, diff --git a/gcc/config/mips/t-iris b/gcc/config/mips/t-iris index 4a7143f9ddd..a200cf8c19c 100644 --- a/gcc/config/mips/t-iris +++ b/gcc/config/mips/t-iris @@ -1,6 +1,3 @@ -# Find all of the declarations from the header files -FIXPROTO_DEFINES = -D__EXTENSIONS__ -D_SGI_SOURCE -D_LANGUAGE_C_PLUS_PLUS - $(T)irix-crti.o: $(srcdir)/config/mips/irix-crti.asm $(GCC_PASSES) $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ -c -o $@ -x assembler-with-cpp $< diff --git a/gcc/config/pa/t-pa-hpux b/gcc/config/pa/t-pa-hpux index 1c62f4ee237..63eab636200 100644 --- a/gcc/config/pa/t-pa-hpux +++ b/gcc/config/pa/t-pa-hpux @@ -1,6 +1,3 @@ -# So putenv and other functions get seen by fixproto. -FIXPROTO_DEFINES = -D_HPUX_SOURCE -D_HIUX_SOURCE - lib2funcs.asm: $(srcdir)/config/pa/lib2funcs.asm rm -f lib2funcs.asm cp $(srcdir)/config/pa/lib2funcs.asm . diff --git a/gcc/config/pdp11/2bsd.h b/gcc/config/pdp11/2bsd.h deleted file mode 100644 index c96065a6490..00000000000 --- a/gcc/config/pdp11/2bsd.h +++ /dev/null @@ -1,65 +0,0 @@ -/* Definitions of target machine for GNU compiler, for a PDP with 2BSD - Copyright (C) 1995, 1996, 1999, 2000, 2007 Free Software Foundation, Inc. - Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at). - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING3. If not see -<http://www.gnu.org/licenses/>. */ - -#define TWO_BSD - -/* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, - the stack pointer does not matter. The value is tested only in - functions that have frame pointers. - No definition is equivalent to always zero. */ - -#undef EXIT_IGNORE_STACK -#define EXIT_IGNORE_STACK 1 - -#undef INITIAL_FRAME_POINTER_OFFSET -#define INITIAL_FRAME_POINTER_OFFSET(DEPTH_VAR) \ -{ \ - int offset; \ - offset = get_frame_size(); \ - offset = (offset <= 2)? 0: (offset -2); \ - (DEPTH_VAR) = offset+10; \ -} - -/* Value should be nonzero if functions must have frame pointers. - Zero means the frame pointer need not be set up (and parms - may be accessed via the stack pointer) in functions that seem suitable. - This is computed in `reload', in reload1.c. - */ - -#undef FRAME_POINTER_REQUIRED -#define FRAME_POINTER_REQUIRED 1 - -/* Offset within stack frame to start allocating local variables at. - If FRAME_GROWS_DOWNWARD, this is the offset to the END of the - first local allocated. Otherwise, it is the offset to the BEGINNING - of the first local allocated. */ -#undef STARTING_FRAME_OFFSET -#define STARTING_FRAME_OFFSET -8 - - -#undef ASM_DECLARE_FUNCTION_NAME -#define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \ -do { \ -ASM_OUTPUT_LABEL (STREAM, NAME); \ -fprintf (STREAM, "~~%s:\n", NAME); \ -} while (0) - -#undef TARGET_UNIX_ASM_DEFAULT -#define TARGET_UNIX_ASM_DEFAULT MASK_UNIX_ASM diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c index f6171356a12..6e8941d75e9 100644 --- a/gcc/config/pdp11/pdp11.c +++ b/gcc/config/pdp11/pdp11.c @@ -1,6 +1,6 @@ /* Subroutines for gcc2 for pdp11. Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2004, 2005, - 2006, 2007, 2008 Free Software Foundation, Inc. + 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at). This file is part of GCC. @@ -241,23 +241,6 @@ expand_shift_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) knowing which registers should not be saved even if used. */ -#ifdef TWO_BSD - -static void -pdp11_output_function_prologue (FILE *stream, HOST_WIDE_INT size) -{ - fprintf (stream, "\tjsr r5, csv\n"); - if (size) - { - fprintf (stream, "\t/*abuse empty parameter slot for locals!*/\n"); - if (size > 2) - asm_fprintf (stream, "\tsub $%#wo, sp\n", size - 2); - - } -} - -#else /* !TWO_BSD */ - static void pdp11_output_function_prologue (FILE *stream, HOST_WIDE_INT size) { @@ -331,8 +314,6 @@ pdp11_output_function_prologue (FILE *stream, HOST_WIDE_INT size) fprintf (stream, "\t;/* end of prologue */\n\n"); } -#endif /* !TWO_BSD */ - /* The function epilogue should not depend on the current stack pointer! It should use the frame pointer only. This is mandatory because @@ -352,18 +333,6 @@ pdp11_output_function_prologue (FILE *stream, HOST_WIDE_INT size) maybe as option if you want to generate code for kernel mode? */ -#ifdef TWO_BSD - -static void -pdp11_output_function_epilogue (FILE *stream, - HOST_WIDE_INT size ATTRIBUTE_UNUSED) -{ - fprintf (stream, "\t/* SP ignored by cret? */\n"); - fprintf (stream, "\tjmp cret\n"); -} - -#else /* !TWO_BSD */ - static void pdp11_output_function_epilogue (FILE *stream, HOST_WIDE_INT size) { @@ -469,8 +438,6 @@ pdp11_output_function_epilogue (FILE *stream, HOST_WIDE_INT size) fprintf (stream, "\t;/* end of epilogue*/\n\n\n"); } -#endif /* !TWO_BSD */ - /* Return the best assembler insn template for moving operands[1] into operands[0] as a fullword. */ static const char * diff --git a/gcc/config/rs6000/aix41.h b/gcc/config/rs6000/aix41.h deleted file mode 100644 index a109084994a..00000000000 --- a/gcc/config/rs6000/aix41.h +++ /dev/null @@ -1,101 +0,0 @@ -/* Definitions of target machine for GNU compiler, - for IBM RS/6000 POWER running AIX version 4.1. - Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, - 2005, 2007 - Free Software Foundation, Inc. - Contributed by David Edelsohn (edelsohn@gnu.org). - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - <http://www.gnu.org/licenses/>. */ - -#undef ASM_SPEC -#define ASM_SPEC "-u %(asm_cpu)" - -#undef ASM_DEFAULT_SPEC -#define ASM_DEFAULT_SPEC "-mcom" - -#undef TARGET_OS_CPP_BUILTINS -#define TARGET_OS_CPP_BUILTINS() \ - do \ - { \ - TARGET_OS_AIX_CPP_BUILTINS (); \ - } \ - while (0) - -#undef CPP_SPEC -#define CPP_SPEC "%{posix: -D_POSIX_SOURCE}\ - %{ansi: -D_ANSI_C_SOURCE}\ - %{mpe: -I/usr/lpp/ppe.poe/include}\ - %{pthread: -D_THREAD_SAFE}" - -#undef TARGET_DEFAULT -#define TARGET_DEFAULT MASK_NEW_MNEMONICS - -#undef PROCESSOR_DEFAULT -#define PROCESSOR_DEFAULT PROCESSOR_PPC601 - -/* AIX does not support Altivec. */ -#undef TARGET_ALTIVEC -#define TARGET_ALTIVEC 0 -#undef TARGET_ALTIVEC_ABI -#define TARGET_ALTIVEC_ABI 0 - -/* Define this macro as a C expression for the initializer of an - array of string to tell the driver program which options are - defaults for this target and thus do not need to be handled - specially when using `MULTILIB_OPTIONS'. - - Do not define this macro if `MULTILIB_OPTIONS' is not defined in - the target makefile fragment or if none of the options listed in - `MULTILIB_OPTIONS' are set by default. *Note Target Fragment::. */ - -#undef MULTILIB_DEFAULTS -#define MULTILIB_DEFAULTS { "mcpu=common" } - -#undef LIB_SPEC -#define LIB_SPEC "%{pg:-L/lib/profiled -L/usr/lib/profiled}\ - %{p:-L/lib/profiled -L/usr/lib/profiled} %{!shared:%{g*:-lg}}\ - %{mpe:-L/usr/lpp/ppe.poe/lib -lmpi -lvtd}\ - %{pthread: -L/usr/lib/threads -lpthreads -lc_r /usr/lib/libc.a}\ - %{!pthread: -lc}" - -#undef LINK_SPEC -#define LINK_SPEC "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro} -bnodelcsect\ - %{static:-bnso %(link_syscalls) } %{!shared: %{g*: %(link_libg) }}\ - %{shared:-bM:SRE %{!e:-bnoentry}}" - -#undef STARTFILE_SPEC -#define STARTFILE_SPEC "%{!shared:\ - %{mpe:%{pg:/usr/lpp/ppe.poe/lib/gcrt0.o}\ - %{!pg:%{p:/usr/lpp/ppe.poe/lib/mcrt0.o}\ - %{!p:/usr/lpp/ppe.poe/lib/crt0.o}}}\ - %{!mpe:\ - %{pthread:%{pg:gcrt0_r%O%s}%{!pg:%{p:mcrt0_r%O%s}%{!p:crt0_r%O%s}}}\ - %{!pthread:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}}}}" - -/* AIX 4 uses PowerPC nop (ori 0,0,0) instruction as call glue for PowerPC - and "cror 31,31,31" for POWER architecture. */ - -#undef RS6000_CALL_GLUE -#define RS6000_CALL_GLUE "{cror 31,31,31|nop}" - -/* The IBM AIX 4.x assembler doesn't support forward references in - .set directives. We handle this by deferring the output of .set - directives to the end of the compilation unit. */ -#define TARGET_DEFERRED_OUTPUT_DEFS(DECL,TARGET) true - -#undef TARGET_64BIT -#define TARGET_64BIT 0 diff --git a/gcc/config/rs6000/aix41.opt b/gcc/config/rs6000/aix41.opt deleted file mode 100644 index 62e37679f7f..00000000000 --- a/gcc/config/rs6000/aix41.opt +++ /dev/null @@ -1,24 +0,0 @@ -; Options for AIX4.1. -; -; Copyright (C) 2005, 2007 Free Software Foundation, Inc. -; Contributed by Aldy Hernandez <aldy@quesejoda.com>. -; -; This file is part of GCC. -; -; GCC is free software; you can redistribute it and/or modify it under -; the terms of the GNU General Public License as published by the Free -; Software Foundation; either version 3, or (at your option) any later -; version. -; -; GCC is distributed in the hope that it will be useful, but WITHOUT -; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -; License for more details. -; -; You should have received a copy of the GNU General Public License -; along with GCC; see the file COPYING3. If not see -; <http://www.gnu.org/licenses/>. - -mpe -Target Report RejectNegative Var(internal_nothing_1) -Support message passing with the Parallel Environment diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h index 46cb876ed2d..ad2eb4b7fea 100644 --- a/gcc/config/rs6000/linux64.h +++ b/gcc/config/rs6000/linux64.h @@ -152,7 +152,7 @@ extern int dot_symbols; #define ASM_SPEC32 "-a32 %{n} %{T} %{Ym,*} %{Yd,*} \ %{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} \ -%{memb} %{!memb: %{msdata: -memb} %{msdata=eabi: -memb}} \ +%{memb} %{!memb: %{msdata=eabi: -memb}} \ %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \ %{mcall-freebsd: -mbig} \ %{mcall-i960-old: -mlittle} \ diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c index f968b2f1467..3aa17143b67 100644 --- a/gcc/config/rs6000/rs6000-c.c +++ b/gcc/config/rs6000/rs6000-c.c @@ -188,7 +188,19 @@ rs6000_macro_to_expand (cpp_reader *pfile, const cpp_token *tok) tok = cpp_peek_token (pfile, idx++); while (tok->type == CPP_PADDING); ident = altivec_categorize_keyword (tok); - if (ident) + if (ident == C_CPP_HASHNODE (__pixel_keyword)) + { + expand_this = C_CPP_HASHNODE (__vector_keyword); + expand_bool_pixel = __pixel_keyword; + rid_code = RID_MAX; + } + else if (ident == C_CPP_HASHNODE (__bool_keyword)) + { + expand_this = C_CPP_HASHNODE (__vector_keyword); + expand_bool_pixel = __bool_keyword; + rid_code = RID_MAX; + } + else if (ident) rid_code = (enum rid)(ident->rid_code); } diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 5290e2b68c1..e7daff15bab 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -9278,7 +9278,7 @@ "TARGET_POWERPC64 && (gpc_reg_operand (operands[0], TImode) || gpc_reg_operand (operands[1], TImode))" "#" - [(set_attr "type" "*,load,store")]) + [(set_attr "type" "*,store,load")]) (define_split [(set (match_operand:TI 0 "gpc_reg_operand" "") diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h index 69ccb58a1ff..1deb0eb8cfd 100644 --- a/gcc/config/rs6000/sysv4.h +++ b/gcc/config/rs6000/sysv4.h @@ -588,7 +588,7 @@ extern int fixuplabelno; %{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}}" \ SVR4_ASM_SPEC \ "%{mrelocatable} %{mrelocatable-lib} %{fpic|fpie|fPIC|fPIE:-K PIC} \ -%{memb|msdata|msdata=eabi: -memb} \ +%{memb|msdata=eabi: -memb} \ %{mlittle|mlittle-endian:-mlittle; \ mbig|mbig-endian :-mbig; \ mcall-aixdesc | \ diff --git a/gcc/config/rs6000/sysv4.opt b/gcc/config/rs6000/sysv4.opt index 5de03b34a84..01b087dedcf 100644 --- a/gcc/config/rs6000/sysv4.opt +++ b/gcc/config/rs6000/sysv4.opt @@ -94,7 +94,8 @@ mregnames Target Mask(REGNAMES) Use alternate register names -;; FIXME: Does nothing. +;; This option does nothing and only exists because the compiler +;; driver passes all -m* options through. msdata Target no description yet diff --git a/gcc/config/rs6000/t-newas b/gcc/config/rs6000/t-newas deleted file mode 100644 index eed66bf5f09..00000000000 --- a/gcc/config/rs6000/t-newas +++ /dev/null @@ -1,37 +0,0 @@ -# Build the libraries for both hard and soft floating point and all of the -# different processor models - -MULTILIB_OPTIONS = msoft-float \ - mcpu=common/mcpu=power/mcpu=powerpc - -MULTILIB_DIRNAMES = soft-float \ - common power powerpc - -MULTILIB_MATCHES = $(MULTILIB_MATCHES_FLOAT) \ - mcpu?power=mpower \ - mcpu?power=mrios1 \ - mcpu?power=mcpu?rios1 \ - mcpu?power=mcpu?rsc \ - mcpu?power=mcpu?rsc1 \ - mcpu?power=mpower2 \ - mcpu?power=mrios2 \ - mcpu?power=mcpu=rios2 \ - mcpu?powerpc=mcpu?601 \ - mcpu?powerpc=mcpu?602 \ - mcpu?powerpc=mcpu?603 \ - mcpu?powerpc=mcpu?603e \ - mcpu?powerpc=mcpu?604 \ - mcpu?powerpc=mcpu?620 \ - mcpu?powerpc=mcpu?403 \ - mcpu?powerpc=mpowerpc \ - mcpu?powerpc=mpowerpc-gpopt \ - mcpu?powerpc=mpowerpc-gfxopt - -# GCC 128-bit long double support routines. -LIB2FUNCS_EXTRA = $(srcdir)/config/rs6000/darwin-ldouble.c - -# Aix 3.2.x needs milli.exp for -mcpu=common -EXTRA_PARTS = milli.exp -$(T)milli.exp: $(srcdir)/config/rs6000/milli.exp - rm -f $(T)milli.exp - cp $(srcdir)/config/rs6000/milli.exp $(T)milli.exp diff --git a/gcc/config/sh/coff.h b/gcc/config/sh/coff.h deleted file mode 100644 index a3242c54a76..00000000000 --- a/gcc/config/sh/coff.h +++ /dev/null @@ -1,70 +0,0 @@ -/* Definitions of target machine for gcc for Renesas / SuperH SH using ELF. - Copyright (C) 1997, 1998, 2001, 2002, 2007 Free Software Foundation, Inc. - Contributed by Jörn Rennecke <joern.rennecke@superh.com>. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING3. If not see -<http://www.gnu.org/licenses/>. */ - -/* Generate SDB debugging information. */ - -#define SDB_DEBUGGING_INFO 1 - -#define SDB_DELIM ";" - -#ifndef MAX_OFILE_ALIGNMENT -#define MAX_OFILE_ALIGNMENT 128 -#endif - -#define IDENT_ASM_OP "\t.ident\t" - -/* Switch into a generic section. */ -#define TARGET_ASM_NAMED_SECTION default_coff_asm_named_section - -/* The prefix to add to user-visible assembler symbols. */ - -#define USER_LABEL_PREFIX "_" - -/* The prefix to add to an internally generated label. */ - -#define LOCAL_LABEL_PREFIX "" - -/* Make an internal label into a string. */ -#define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \ - sprintf ((STRING), "*%s%s%ld", LOCAL_LABEL_PREFIX, (PREFIX), (long)(NUM)) - -/* This is how to output an assembler line - that says to advance the location counter by SIZE bytes. */ - -#define ASM_OUTPUT_SKIP(FILE,SIZE) \ - fprintf ((FILE), "\t.space %d\n", (int)(SIZE)) - -/* This says how to output an assembler line - to define a global common symbol. */ - -#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ -( fputs ("\t.comm ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%d\n", (int)(SIZE))) - -/* This says how to output an assembler line - to define a local common symbol. */ - -#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ -( fputs ("\t.lcomm ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%d\n", (int)(SIZE))) - -#define DWARF2_UNWIND_INFO 0 diff --git a/gcc/config/t-svr4 b/gcc/config/t-svr4 index 3ea1174580d..6e75eea1f6e 100644 --- a/gcc/config/t-svr4 +++ b/gcc/config/t-svr4 @@ -6,6 +6,3 @@ CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC TARGET_LIBGCC2_CFLAGS = -fPIC - -# See all the declarations. -FIXPROTO_DEFINES = -D_XOPEN_SOURCE diff --git a/gcc/config/t-vxworks b/gcc/config/t-vxworks index c9d69e0edce..ebedb1f5056 100644 --- a/gcc/config/t-vxworks +++ b/gcc/config/t-vxworks @@ -1,6 +1,3 @@ -# Don't run fixproto. -STMP_FIXPROTO = - # Build libgcc using the multilib mechanism LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib diff --git a/gcc/configure b/gcc/configure index 04775acf6e9..e74fdf822ba 100755 --- a/gcc/configure +++ b/gcc/configure @@ -458,7 +458,7 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS BUILD_LDFLAGS STMP_FIXINC STMP_FIXPROTO collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN OBJDUMP ac_ct_OBJDUMP ac_ct_AR STRIP ac_ct_STRIP lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump gcc_cv_readelf libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs fortran_target_objs target_cpu_default GMPLIBS GMPINC PPLLIBS PPLINC CLOOGLIBS CLOOGINC LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS BUILD_LDFLAGS STMP_FIXINC collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN OBJDUMP ac_ct_OBJDUMP ac_ct_AR STRIP ac_ct_STRIP lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump gcc_cv_readelf libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs fortran_target_objs target_cpu_default GMPLIBS GMPINC PPLLIBS PPLINC CLOOGLIBS CLOOGINC LIBOBJS LTLIBOBJS' ac_subst_files='language_hooks' ac_pwd=`pwd` @@ -10413,150 +10413,6 @@ _ACEOF fi -# Try to determine the array type of the second argument of getgroups -# for the target system (int or gid_t). -echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 -if test "${ac_cv_type_uid_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <sys/types.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "uid_t" >/dev/null 2>&1; then - ac_cv_type_uid_t=yes -else - ac_cv_type_uid_t=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6 -if test $ac_cv_type_uid_t = no; then - -cat >>confdefs.h <<\_ACEOF -#define uid_t int -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define gid_t int -_ACEOF - -fi - -echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 -echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6 -if test "${ac_cv_type_getgroups+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_type_getgroups=cross -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Thanks to Mike Rendell for this test. */ -#include <sys/types.h> -#define NGID 256 -#undef MAX -#define MAX(x, y) ((x) > (y) ? (x) : (y)) - -int -main () -{ - gid_t gidset[NGID]; - int i, n; - union { gid_t gval; long lval; } val; - - val.lval = -1; - for (i = 0; i < NGID; i++) - gidset[i] = val.gval; - n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, - gidset); - /* Exit non-zero if getgroups seems to require an array of ints. This - happens when gid_t is short but getgroups modifies an array of ints. */ - exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_getgroups=gid_t -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_type_getgroups=int -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -if test $ac_cv_type_getgroups = cross; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <unistd.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then - ac_cv_type_getgroups=gid_t -else - ac_cv_type_getgroups=int -fi -rm -f conftest* - -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 -echo "${ECHO_T}$ac_cv_type_getgroups" >&6 - -cat >>confdefs.h <<_ACEOF -#define GETGROUPS_T $ac_cv_type_getgroups -_ACEOF - - -if test "${target}" = "${build}"; then - TARGET_GETGROUPS_T=$ac_cv_type_getgroups -else - case "${target}" in - # This condition may need some tweaking. It should include all - # targets where the array type of the second argument of getgroups - # is int and the type of gid_t is not equivalent to int. - *-*-sunos* | *-*-ultrix*) - TARGET_GETGROUPS_T=int - ;; - *) - TARGET_GETGROUPS_T=gid_t - ;; - esac -fi - - echo "$as_me:$LINENO: checking for sys/mman.h" >&5 echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6 @@ -14019,7 +13875,7 @@ fi # When building gcc with a cross-compiler, we need to adjust things so # that the generator programs are still built with the native compiler. -# Also, we cannot run fixincludes or fix-header. +# Also, we cannot run fixincludes. # These are the normal (build=host) settings: CC_FOR_BUILD='$(CC)' @@ -14027,28 +13883,11 @@ BUILD_CFLAGS='$(ALL_CFLAGS)' BUILD_LDFLAGS='$(LDFLAGS)' STMP_FIXINC=stmp-fixinc -# Possibly disable fixproto, on a per-target basis. -case ${use_fixproto} in - no) - STMP_FIXPROTO= - ;; - yes) - STMP_FIXPROTO=stmp-fixproto - ;; -esac - - # And these apply if build != host, or we are generating coverage data if test x$build != x$host || test "x$coverage_flags" != x then BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)' - - if test "x$TARGET_SYSTEM_ROOT" = x; then - if test "x$STMP_FIXPROTO" != x; then - STMP_FIXPROTO=stmp-install-fixproto - fi - fi fi # Expand extra_headers to include complete path. @@ -14509,13 +14348,13 @@ if test "${lt_cv_nm_interface+set}" = set; then else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:14512: $ac_compile\"" >&5) + (eval echo "\"\$as_me:14351: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:14515: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:14354: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:14518: output\"" >&5) + (eval echo "\"\$as_me:14357: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -15672,7 +15511,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 15675 "configure"' > conftest.$ac_ext + echo '#line 15514 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -16971,11 +16810,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16974: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16813: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16978: \$? = $ac_status" >&5 + echo "$as_me:16817: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17310,11 +17149,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17313: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17152: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17317: \$? = $ac_status" >&5 + echo "$as_me:17156: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17415,11 +17254,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17418: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17257: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17422: \$? = $ac_status" >&5 + echo "$as_me:17261: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17470,11 +17309,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17473: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17312: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17477: \$? = $ac_status" >&5 + echo "$as_me:17316: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -20282,7 +20121,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 20285 "configure" +#line 20124 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -20378,7 +20217,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 20381 "configure" +#line 20220 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -25516,7 +25355,6 @@ s,@AR@,$AR,;t t s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t s,@LDEXP_LIB@,$LDEXP_LIB,;t t -s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t s,@LIBICONV@,$LIBICONV,;t t s,@LTLIBICONV@,$LTLIBICONV,;t t s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t @@ -25545,7 +25383,6 @@ s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t s,@STMP_FIXINC@,$STMP_FIXINC,;t t -s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t s,@collect2@,$collect2,;t t s,@LIBTOOL@,$LIBTOOL,;t t s,@SED@,$SED,;t t diff --git a/gcc/configure.ac b/gcc/configure.ac index 04ea19d340d..99605a147dc 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to generate a configuration script. # Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -# 2007, 2008 Free Software Foundation, Inc. +# 2007, 2008, 2009 Free Software Foundation, Inc. #This file is part of GCC. @@ -1022,26 +1022,6 @@ fi AC_CHECK_TYPE(ssize_t, int) AC_CHECK_TYPE(caddr_t, char *) -# Try to determine the array type of the second argument of getgroups -# for the target system (int or gid_t). -AC_TYPE_GETGROUPS -if test "${target}" = "${build}"; then - TARGET_GETGROUPS_T=$ac_cv_type_getgroups -else - case "${target}" in - # This condition may need some tweaking. It should include all - # targets where the array type of the second argument of getgroups - # is int and the type of gid_t is not equivalent to int. - *-*-sunos* | *-*-ultrix*) - TARGET_GETGROUPS_T=int - ;; - *) - TARGET_GETGROUPS_T=gid_t - ;; - esac -fi -AC_SUBST(TARGET_GETGROUPS_T) - gcc_AC_FUNC_MMAP_BLACKLIST case "${host}" in @@ -1742,7 +1722,7 @@ AC_SUBST(inhibit_libc) # When building gcc with a cross-compiler, we need to adjust things so # that the generator programs are still built with the native compiler. -# Also, we cannot run fixincludes or fix-header. +# Also, we cannot run fixincludes. # These are the normal (build=host) settings: CC_FOR_BUILD='$(CC)' AC_SUBST(CC_FOR_BUILD) @@ -1750,28 +1730,11 @@ BUILD_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(BUILD_CFLAGS) BUILD_LDFLAGS='$(LDFLAGS)' AC_SUBST(BUILD_LDFLAGS) STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC) -# Possibly disable fixproto, on a per-target basis. -case ${use_fixproto} in - no) - STMP_FIXPROTO= - ;; - yes) - STMP_FIXPROTO=stmp-fixproto - ;; -esac -AC_SUBST(STMP_FIXPROTO) - # And these apply if build != host, or we are generating coverage data if test x$build != x$host || test "x$coverage_flags" != x then BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)' - - if test "x$TARGET_SYSTEM_ROOT" = x; then - if test "x$STMP_FIXPROTO" != x; then - STMP_FIXPROTO=stmp-install-fixproto - fi - fi fi # Expand extra_headers to include complete path. diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 124a3e95651..449fb93c1be 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2009-03-28 Jakub Jelinek <jakub@redhat.com> + + PR c++/39554 + * parser.c (cp_parser_postfix_expression): Don't call + warning_if_disallowed_function_p. + 2009-03-27 Jan Hubicka <jh@suse.cz> * except.c (choose_personality_routine): Set terminate_node to abort diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 63ac0709ebf..bbd89d19c72 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -4823,9 +4823,6 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p, koenig_p, tf_warning_or_error); - if (warn_disallowed_functions) - warn_if_disallowed_function_p (postfix_expression); - /* The POSTFIX_EXPRESSION is certainly no longer an id. */ idk = CP_ID_KIND_NONE; } diff --git a/gcc/crtstuff.c b/gcc/crtstuff.c index 49e68cdebbb..5e4d1a1d9b3 100644 --- a/gcc/crtstuff.c +++ b/gcc/crtstuff.c @@ -1,7 +1,7 @@ /* Specialized bits of code needed to support construction and destruction of file-scope objects in C++ code. - Copyright (C) 1991, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1991, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + 2002, 2003, 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. Contributed by Ron Guilmette (rfg@monkeys.com). This file is part of GCC. @@ -58,11 +58,9 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA identified the set of defines that need to go into auto-target.h, this will have to do. */ #include "auto-host.h" -#undef gid_t #undef pid_t #undef rlim_t #undef ssize_t -#undef uid_t #undef vfork #include "tconfig.h" #include "tsystem.h" diff --git a/gcc/dbgcnt.def b/gcc/dbgcnt.def index 5330c72680f..5a2f8f0c505 100644 --- a/gcc/dbgcnt.def +++ b/gcc/dbgcnt.def @@ -142,6 +142,7 @@ echo ubound: $ub /* Debug counter definitions. */ DEBUG_COUNTER (auto_inc_dec) +DEBUG_COUNTER (ccp) DEBUG_COUNTER (cfg_cleanup) DEBUG_COUNTER (cse2_move2add) DEBUG_COUNTER (cprop1) diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index ad17a378d98..0e9d739ccbc 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -7780,6 +7780,11 @@ The following floating point built-in functions are made available in the @table @code @item __float128 __builtin_infq (void) Similar to @code{__builtin_inf}, except the return type is @code{__float128}. +@findex __builtin_infq + +@item __float128 __builtin_huge_valq (void) +Similar to @code{__builtin_huge_val}, except the return type is @code{__float128}. +@findex __builtin_huge_valq @end table The following built-in functions are made available by @option{-mmmx}. diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 6bdfbece981..616babcb344 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -653,7 +653,7 @@ provide a configure target when configuring a native compiler. @item @var{target} must be specified as @option{--target=@var{target}} when configuring a cross compiler; examples of valid targets would be -m68k-coff, sh-elf, etc. +m68k-elf, sh-elf, etc. @item Specifying just @var{target} instead of @option{--target=@var{target}} @@ -2625,8 +2625,6 @@ information are. @uref{#arc-x-elf,,arc-*-elf} @item @uref{#arm-x-elf,,arm-*-elf} -@uref{#arm-x-coff,,arm-*-coff} -@uref{#arm-x-aout,,arm-*-aout} @item @uref{#avr,,avr} @item @@ -2850,21 +2848,6 @@ and @code{arm-*-rtems}. @html <hr /> @end html -@heading @anchor{arm-x-coff}arm-*-coff -ARM-family processors. Note that there are two different varieties -of PE format subtarget supported: @code{arm-wince-pe} and -@code{arm-pe} as well as a standard COFF target @code{arm-*-coff}. - -@html -<hr /> -@end html -@heading @anchor{arm-x-aout}arm-*-aout -ARM-family processors. These targets support the AOUT file format: -@code{arm-*-aout}, @code{arm-*-netbsd}. - -@html -<hr /> -@end html @heading @anchor{avr}avr ATMEL AVR-family micro controllers. These are used in embedded @@ -3316,6 +3299,7 @@ removed and the system libunwind library will always be used. @end html @heading @anchor{x-ibm-aix}*-ibm-aix* Support for AIX version 3 and older was discontinued in GCC 3.4. +Support for AIX version 4.2 and older was discontinued in GCC 4.5. ``out of memory'' bootstrap failures may indicate a problem with process resource limits (ulimit). Hard limits are configured in the @@ -3436,9 +3420,6 @@ GCC does not produce the same floating-point formats that the assembler expects. If one encounters this problem, set the @env{LANG} environment variable to @samp{C} or @samp{En_US}. -By default, GCC for AIX 4.1 and above produces code that can be used on -both Power or PowerPC processors. - A default can be specified with the @option{-mcpu=@var{cpu_type}} switch and using the configure option @option{--with-cpu-@var{cpu_type}}. @@ -3481,7 +3462,7 @@ applications. There are no standard Unix configurations. <hr /> @end html @heading @anchor{m68k-x-x}m68k-*-* -By default, @samp{m68k-*-aout}, @samp{m68k-*-coff*}, +By default, @samp{m68k-*-elf*}, @samp{m68k-*-rtems}, @samp{m68k-*-uclinux} and @samp{m68k-*-linux} build libraries for both M680x0 and ColdFire processors. If you only diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index ac5b2c84580..4e2d93139b5 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -148,7 +148,6 @@ only one of these two forms, whichever one is not the default. and register usage. * Environment Variables:: Env vars that affect GCC. * Precompiled Headers:: Compiling a header once, and using it many times. -* Running Protoize:: Automatically adding or removing function prototypes. @end menu @c man begin OPTIONS @@ -233,7 +232,6 @@ Objective-C and Objective-C++ Dialects}. -Wchar-subscripts -Wclobbered -Wcomment @gol -Wconversion -Wcoverage-mismatch -Wno-deprecated @gol -Wno-deprecated-declarations -Wdisabled-optimization @gol --Wdisallowed-function-list=@var{sym},@var{sym},@dots{} @gol -Wno-div-by-zero -Wempty-body -Wenum-compare -Wno-endif-labels @gol -Werror -Werror=* @gol -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol @@ -4189,13 +4187,6 @@ minimum maximum, so we do not diagnose overlength strings in C++@. This option is implied by @option{-pedantic}, and can be disabled with @option{-Wno-overlength-strings}. - -@item -Wdisallowed-function-list=@var{sym},@var{sym},@dots{} -@opindex Wdisallowed-function-list - -If any of @var{sym} is called, GCC will issue a warning. This can be useful -in enforcing coding conventions that ban calls to certain functions, for -example, @code{alloca}, @code{malloc}, etc. @end table @node Debugging Options @@ -16487,156 +16478,3 @@ precompiled header, the actual behavior will be a mixture of the behavior for the options. For instance, if you use @option{-g} to generate the precompiled header but not when using it, you may or may not get debugging information for routines in the precompiled header. - -@node Running Protoize -@section Running Protoize - -The program @code{protoize} is an optional part of GCC@. You can use -it to add prototypes to a program, thus converting the program to ISO -C in one respect. The companion program @code{unprotoize} does the -reverse: it removes argument types from any prototypes that are found. - -When you run these programs, you must specify a set of source files as -command line arguments. The conversion programs start out by compiling -these files to see what functions they define. The information gathered -about a file @var{foo} is saved in a file named @file{@var{foo}.X}. - -After scanning comes actual conversion. The specified files are all -eligible to be converted; any files they include (whether sources or -just headers) are eligible as well. - -But not all the eligible files are converted. By default, -@code{protoize} and @code{unprotoize} convert only source and header -files in the current directory. You can specify additional directories -whose files should be converted with the @option{-d @var{directory}} -option. You can also specify particular files to exclude with the -@option{-x @var{file}} option. A file is converted if it is eligible, its -directory name matches one of the specified directory names, and its -name within the directory has not been excluded. - -Basic conversion with @code{protoize} consists of rewriting most -function definitions and function declarations to specify the types of -the arguments. The only ones not rewritten are those for varargs -functions. - -@code{protoize} optionally inserts prototype declarations at the -beginning of the source file, to make them available for any calls that -precede the function's definition. Or it can insert prototype -declarations with block scope in the blocks where undeclared functions -are called. - -Basic conversion with @code{unprotoize} consists of rewriting most -function declarations to remove any argument types, and rewriting -function definitions to the old-style pre-ISO form. - -Both conversion programs print a warning for any function declaration or -definition that they can't convert. You can suppress these warnings -with @option{-q}. - -The output from @code{protoize} or @code{unprotoize} replaces the -original source file. The original file is renamed to a name ending -with @samp{.save} (for DOS, the saved filename ends in @samp{.sav} -without the original @samp{.c} suffix). If the @samp{.save} (@samp{.sav} -for DOS) file already exists, then the source file is simply discarded. - -@code{protoize} and @code{unprotoize} both depend on GCC itself to -scan the program and collect information about the functions it uses. -So neither of these programs will work until GCC is installed. - -Here is a table of the options you can use with @code{protoize} and -@code{unprotoize}. Each option works with both programs unless -otherwise stated. - -@table @code -@item -B @var{directory} -Look for the file @file{SYSCALLS.c.X} in @var{directory}, instead of the -usual directory (normally @file{/usr/local/lib}). This file contains -prototype information about standard system functions. This option -applies only to @code{protoize}. - -@item -c @var{compilation-options} -Use @var{compilation-options} as the options when running @command{gcc} to -produce the @samp{.X} files. The special option @option{-aux-info} is -always passed in addition, to tell @command{gcc} to write a @samp{.X} file. - -Note that the compilation options must be given as a single argument to -@code{protoize} or @code{unprotoize}. If you want to specify several -@command{gcc} options, you must quote the entire set of compilation options -to make them a single word in the shell. - -There are certain @command{gcc} arguments that you cannot use, because they -would produce the wrong kind of output. These include @option{-g}, -@option{-O}, @option{-c}, @option{-S}, and @option{-o} If you include these in -the @var{compilation-options}, they are ignored. - -@item -C -Rename files to end in @samp{.C} (@samp{.cc} for DOS-based file -systems) instead of @samp{.c}. This is convenient if you are converting -a C program to C++. This option applies only to @code{protoize}. - -@item -g -Add explicit global declarations. This means inserting explicit -declarations at the beginning of each source file for each function -that is called in the file and was not declared. These declarations -precede the first function definition that contains a call to an -undeclared function. This option applies only to @code{protoize}. - -@item -i @var{string} -Indent old-style parameter declarations with the string @var{string}. -This option applies only to @code{protoize}. - -@code{unprotoize} converts prototyped function definitions to old-style -function definitions, where the arguments are declared between the -argument list and the initial @samp{@{}. By default, @code{unprotoize} -uses five spaces as the indentation. If you want to indent with just -one space instead, use @option{-i " "}. - -@item -k -Keep the @samp{.X} files. Normally, they are deleted after conversion -is finished. - -@item -l -Add explicit local declarations. @code{protoize} with @option{-l} inserts -a prototype declaration for each function in each block which calls the -function without any declaration. This option applies only to -@code{protoize}. - -@item -n -Make no real changes. This mode just prints information about the conversions -that would have been done without @option{-n}. - -@item -N -Make no @samp{.save} files. The original files are simply deleted. -Use this option with caution. - -@item -p @var{program} -Use the program @var{program} as the compiler. Normally, the name -@file{gcc} is used. - -@item -q -Work quietly. Most warnings are suppressed. - -@item -v -Print the version number, just like @option{-v} for @command{gcc}. -@end table - -If you need special compiler options to compile one of your program's -source files, then you should generate that file's @samp{.X} file -specially, by running @command{gcc} on that source file with the -appropriate options and the option @option{-aux-info}. Then run -@code{protoize} on the entire set of files. @code{protoize} will use -the existing @samp{.X} file because it is newer than the source file. -For example: - -@smallexample -gcc -Dfoo=bar file1.c -aux-info file1.X -protoize *.c -@end smallexample - -@noindent -You need to include the special files along with the rest in the -@code{protoize} command, even though their @samp{.X} files already -exist, because otherwise they won't get converted. - -@xref{Protoize Caveats}, for more information on how to use -@code{protoize} successfully. diff --git a/gcc/doc/trouble.texi b/gcc/doc/trouble.texi index 3f04f00ad4c..a3d8187e649 100644 --- a/gcc/doc/trouble.texi +++ b/gcc/doc/trouble.texi @@ -1,5 +1,5 @@ @c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -@c 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008 +@c 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009 @c Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. @@ -30,7 +30,6 @@ where people's opinions differ as to what is best. compliant with the ISO C standard. * Disappointments:: Regrettable things we can't change, but not quite bugs. * C++ Misunderstandings:: Common misunderstandings with GNU C++. -* Protoize Caveats:: Things to watch out for when using @code{protoize}. * Non-bugs:: Things we think are right, but some others disagree. * Warnings and Errors:: Which problems in your code get warnings, and which get errors. @@ -45,13 +44,6 @@ The @code{fixincludes} script interacts badly with automounters; if the directory of system header files is automounted, it tends to be unmounted while @code{fixincludes} is running. This would seem to be a bug in the automounter. We don't know any good way to work around it. - -@item -The @code{fixproto} script will sometimes add prototypes for the -@code{sigsetjmp} and @code{siglongjmp} functions that reference the -@code{jmp_buf} type before that type is defined. To work around this, -edit the offending file and place the typedef in front of the -prototypes. @end itemize @node Cross-Compiler Problems @@ -939,92 +931,6 @@ copy-assignment operator removes any uncertainties. With such an operator, the application can define whether and how the virtual base subobject is assigned. -@node Protoize Caveats -@section Caveats of using @command{protoize} - -The conversion programs @command{protoize} and @command{unprotoize} can -sometimes change a source file in a way that won't work unless you -rearrange it. - -@itemize @bullet -@item -@command{protoize} can insert references to a type name or type tag before -the definition, or in a file where they are not defined. - -If this happens, compiler error messages should show you where the new -references are, so fixing the file by hand is straightforward. - -@item -There are some C constructs which @command{protoize} cannot figure out. -For example, it can't determine argument types for declaring a -pointer-to-function variable; this you must do by hand. @command{protoize} -inserts a comment containing @samp{???} each time it finds such a -variable; so you can find all such variables by searching for this -string. ISO C does not require declaring the argument types of -pointer-to-function types. - -@item -Using @command{unprotoize} can easily introduce bugs. If the program -relied on prototypes to bring about conversion of arguments, these -conversions will not take place in the program without prototypes. -One case in which you can be sure @command{unprotoize} is safe is when -you are removing prototypes that were made with @command{protoize}; if -the program worked before without any prototypes, it will work again -without them. - -@opindex Wtraditional-conversion -You can find all the places where this problem might occur by compiling -the program with the @option{-Wtraditional-conversion} option. It -prints a warning whenever an argument is converted. - -@item -Both conversion programs can be confused if there are macro calls in and -around the text to be converted. In other words, the standard syntax -for a declaration or definition must not result from expanding a macro. -This problem is inherent in the design of C and cannot be fixed. If -only a few functions have confusing macro calls, you can easily convert -them manually. - -@item -@command{protoize} cannot get the argument types for a function whose -definition was not actually compiled due to preprocessing conditionals. -When this happens, @command{protoize} changes nothing in regard to such -a function. @command{protoize} tries to detect such instances and warn -about them. - -You can generally work around this problem by using @command{protoize} step -by step, each time specifying a different set of @option{-D} options for -compilation, until all of the functions have been converted. There is -no automatic way to verify that you have got them all, however. - -@item -Confusion may result if there is an occasion to convert a function -declaration or definition in a region of source code where there is more -than one formal parameter list present. Thus, attempts to convert code -containing multiple (conditionally compiled) versions of a single -function header (in the same vicinity) may not produce the desired (or -expected) results. - -If you plan on converting source files which contain such code, it is -recommended that you first make sure that each conditionally compiled -region of source code which contains an alternative function header also -contains at least one additional follower token (past the final right -parenthesis of the function header). This should circumvent the -problem. - -@item -@command{unprotoize} can become confused when trying to convert a function -definition or declaration which contains a declaration for a -pointer-to-function formal argument which has the same name as the -function being defined or declared. We recommend you avoid such choices -of formal parameter names. - -@item -You might also want to correct some of the indentation by hand and break -long lines. (The conversion programs don't write lines longer than -eighty characters in any case.) -@end itemize - @node Non-bugs @section Certain Changes We Don't Want to Make diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 1c82f9c09ff..1bc17306c09 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -3231,7 +3231,7 @@ dwarf2out_begin_prologue (unsigned int line ATTRIBUTE_UNUSED, fde->dw_fde_end = NULL; fde->dw_fde_cfi = NULL; fde->funcdef_number = current_function_funcdef_no; - fde->nothrow = TREE_NOTHROW (current_function_decl); + fde->nothrow = crtl->nothrow; fde->uses_eh_lsda = crtl->uses_eh_lsda; fde->all_throwers_are_sibcalls = crtl->all_throwers_are_sibcalls; fde->drap_reg = INVALID_REGNUM; @@ -11319,7 +11319,7 @@ reference_to_unused (tree * tp, int * walk_subtrees, && (!DECL_EXTERNAL (*tp) || DECL_DECLARED_INLINE_P (*tp))) { struct cgraph_node *node = cgraph_node (*tp); - if (!node->output) + if (node->process || TREE_ASM_WRITTEN (*tp)) return *tp; } else if (TREE_CODE (*tp) == STRING_CST && !TREE_ASM_WRITTEN (*tp)) diff --git a/gcc/except.c b/gcc/except.c index 2913fc8f31f..41f799af07e 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -227,8 +227,6 @@ static hashval_t t2r_hash (const void *); static void add_type_for_runtime (tree); static tree lookup_type_for_runtime (tree); -static void remove_unreachable_regions (rtx); - static int ttypes_filter_eq (const void *, const void *); static hashval_t ttypes_filter_hash (const void *); static int ehspec_filter_eq (const void *, const void *); @@ -271,7 +269,7 @@ enum reachable_code struct reachable_info; static enum reachable_code reachable_next_level (struct eh_region *, tree, - struct reachable_info *); + struct reachable_info *, bool); static int action_record_eq (const void *, const void *); static hashval_t action_record_hash (const void *); @@ -622,69 +620,145 @@ collect_eh_region_array (void) } } -/* Remove all regions whose labels are not reachable from insns. */ +/* R is MUST_NOT_THROW region that is not reachable via local + RESX instructions. It still must be kept in the tree in case runtime + can unwind through it, or we will eliminate out terminate call + runtime would do otherwise. Return TRUE if R contains throwing statements + or some of the exceptions in inner regions can be unwound up to R. + + CONTAINS_STMT is bitmap of all regions that contains some throwing + statements. + + Function looks O(^3) at first sight. In fact the function is called at most + once for every MUST_NOT_THROW in EH tree from remove_unreachable_regions + Because the outer loop walking subregions does not dive in MUST_NOT_THROW, + the outer loop examines every region at most once. The inner loop + is doing unwinding from the throwing statement same way as we do during + CFG construction, so it is O(^2) in size of EH tree, but O(n) in size + of CFG. In practice Eh trees are wide, not deep, so this is not + a problem. */ -static void -remove_unreachable_regions (rtx insns) +static bool +can_be_reached_by_runtime (sbitmap contains_stmt, struct eh_region *r) { - int i, *uid_region_num; - bool *reachable; - struct eh_region *r; - rtx insn; - - uid_region_num = XCNEWVEC (int, get_max_uid ()); - reachable = XCNEWVEC (bool, cfun->eh->last_region_number + 1); - - for (i = cfun->eh->last_region_number; i > 0; --i) + struct eh_region *i = r->inner; + unsigned n; + bitmap_iterator bi; + + if (TEST_BIT (contains_stmt, r->region_number)) + return true; + if (r->aka) + EXECUTE_IF_SET_IN_BITMAP (r->aka, 0, n, bi) + if (TEST_BIT (contains_stmt, n)) + return true; + if (!i) + return false; + while (1) { - r = VEC_index (eh_region, cfun->eh->region_array, i); - if (!r || r->region_number != i) - continue; - - if (r->resume) + /* It is pointless to look into MUST_NOT_THROW + or dive into subregions. They never unwind up. */ + if (i->type != ERT_MUST_NOT_THROW) { - gcc_assert (!uid_region_num[INSN_UID (r->resume)]); - uid_region_num[INSN_UID (r->resume)] = i; + bool found = TEST_BIT (contains_stmt, i->region_number); + if (!found) + EXECUTE_IF_SET_IN_BITMAP (i->aka, 0, n, bi) + if (TEST_BIT (contains_stmt, n)) + { + found = true; + break; + } + /* We have nested region that contains throwing statement. + See if resuming might lead up to the resx or we get locally + caught sooner. If we get locally caught sooner, we either + know region R is not reachable or it would have direct edge + from the EH resx and thus consider region reachable at + firest place. */ + if (found) + { + struct eh_region *i1 = i; + tree type_thrown = NULL_TREE; + + if (i1->type == ERT_THROW) + { + type_thrown = i1->u.eh_throw.type; + i1 = i1->outer; + } + for (; i1 != r; i1 = i1->outer) + if (reachable_next_level (i1, type_thrown, NULL, + false) >= RNL_CAUGHT) + break; + if (i1 == r) + return true; + } } - if (r->label) + /* If there are sub-regions, process them. */ + if (i->type != ERT_MUST_NOT_THROW && i->inner) + i = i->inner; + /* If there are peers, process them. */ + else if (i->next_peer) + i = i->next_peer; + /* Otherwise, step back up the tree to the next peer. */ + else { - gcc_assert (!uid_region_num[INSN_UID (r->label)]); - uid_region_num[INSN_UID (r->label)] = i; + do + { + i = i->outer; + if (i == r) + return false; + } + while (i->next_peer == NULL); + i = i->next_peer; } } +} - for (insn = insns; insn; insn = NEXT_INSN (insn)) - reachable[uid_region_num[INSN_UID (insn)]] = true; +/* Remove all regions whose labels are not reachable. + REACHABLE is bitmap of all regions that are used by the function + CONTAINS_STMT is bitmap of all regions that contains stmt (or NULL). */ +void +remove_unreachable_regions (sbitmap reachable, sbitmap contains_stmt) +{ + int i; + struct eh_region *r; for (i = cfun->eh->last_region_number; i > 0; --i) { r = VEC_index (eh_region, cfun->eh->region_array, i); - if (r && r->region_number == i && !reachable[i]) + if (!r) + continue; + if (r->region_number == i && !TEST_BIT (reachable, i) && !r->resume) { bool kill_it = true; + + r->tree_label = NULL; switch (r->type) { case ERT_THROW: /* Don't remove ERT_THROW regions if their outer region - is reachable. */ - if (r->outer && reachable[r->outer->region_number]) + is reachable. */ + if (r->outer && TEST_BIT (reachable, r->outer->region_number)) kill_it = false; break; - case ERT_MUST_NOT_THROW: /* MUST_NOT_THROW regions are implementable solely in the - runtime, but their existence continues to affect calls - within that region. Never delete them here. */ - kill_it = false; + runtime, but we need them when inlining function. + + Keep them if outer region is not MUST_NOT_THROW a well + and if they contain some statement that might unwind through + them. */ + if ((!r->outer || r->outer->type != ERT_MUST_NOT_THROW) + && (!contains_stmt + || can_be_reached_by_runtime (contains_stmt, r))) + kill_it = false; break; - case ERT_TRY: { /* TRY regions are reachable if any of its CATCH regions are reachable. */ struct eh_region *c; - for (c = r->u.eh_try.eh_catch; c ; c = c->u.eh_catch.next_catch) - if (reachable[c->region_number]) + for (c = r->u.eh_try.eh_catch; c; + c = c->u.eh_catch.next_catch) + if (TEST_BIT (reachable, c->region_number)) { kill_it = false; break; @@ -697,11 +771,91 @@ remove_unreachable_regions (rtx insns) } if (kill_it) - remove_eh_handler (r); + { + if (dump_file) + fprintf (dump_file, "Removing unreachable eh region %i\n", + r->region_number); + remove_eh_handler (r); + } } } +#ifdef ENABLE_CHECKING + verify_eh_tree (cfun); +#endif +} + +/* Return array mapping LABEL_DECL_UID to region such that region's tree_label + is identical to label. */ + +VEC(int,heap) * +label_to_region_map (void) +{ + VEC(int,heap) * label_to_region = NULL; + int i; + + VEC_safe_grow_cleared (int, heap, label_to_region, + cfun->cfg->last_label_uid + 1); + for (i = cfun->eh->last_region_number; i > 0; --i) + { + struct eh_region *r = VEC_index (eh_region, cfun->eh->region_array, i); + if (r && r->tree_label && LABEL_DECL_UID (r->tree_label) >= 0) + { + if ((unsigned) LABEL_DECL_UID (r->tree_label) > + VEC_length (int, label_to_region)) + VEC_safe_grow_cleared (int, heap, label_to_region, + LABEL_DECL_UID (r->tree_label)); + VEC_replace (int, label_to_region, LABEL_DECL_UID (r->tree_label), + i); + } + } + return label_to_region; +} + +/* Return number of EH regions. */ +int +num_eh_regions (void) +{ + return cfun->eh->last_region_number + 1; +} + +/* Remove all regions whose labels are not reachable from insns. */ + +static void +rtl_remove_unreachable_regions (rtx insns) +{ + int i, *uid_region_num; + sbitmap reachable; + struct eh_region *r; + rtx insn; + + uid_region_num = XCNEWVEC (int, get_max_uid ()); + reachable = sbitmap_alloc (cfun->eh->last_region_number + 1); + sbitmap_zero (reachable); - free (reachable); + for (i = cfun->eh->last_region_number; i > 0; --i) + { + r = VEC_index (eh_region, cfun->eh->region_array, i); + if (!r || r->region_number != i) + continue; + + if (r->resume) + { + gcc_assert (!uid_region_num[INSN_UID (r->resume)]); + uid_region_num[INSN_UID (r->resume)] = i; + } + if (r->label) + { + gcc_assert (!uid_region_num[INSN_UID (r->label)]); + uid_region_num[INSN_UID (r->label)] = i; + } + } + + for (insn = insns; insn; insn = NEXT_INSN (insn)) + SET_BIT (reachable, uid_region_num[INSN_UID (insn)]); + + remove_unreachable_regions (reachable, NULL); + + sbitmap_free (reachable); free (uid_region_num); } @@ -726,7 +880,7 @@ convert_from_eh_region_ranges (void) region->label = DECL_RTL_IF_SET (region->tree_label); } - remove_unreachable_regions (insns); + rtl_remove_unreachable_regions (insns); } static void @@ -821,6 +975,17 @@ current_function_has_exception_handlers (void) static void duplicate_eh_regions_0 (eh_region o, int *min, int *max) { + int i; + + if (o->aka) + { + i = bitmap_first_set_bit (o->aka); + if (i < *min) + *min = i; + i = bitmap_last_set_bit (o->aka); + if (i > *max) + *max = i; + } if (o->region_number < *min) *min = o->region_number; if (o->region_number > *max) @@ -852,7 +1017,18 @@ duplicate_eh_regions_1 (eh_region old, eh_region outer, int eh_offset) *n = *old; n->outer = outer; n->next_peer = NULL; - gcc_assert (!old->aka); + if (old->aka) + { + unsigned i; + bitmap_iterator bi; + n->aka = BITMAP_GGC_ALLOC (); + + EXECUTE_IF_SET_IN_BITMAP (old->aka, 0, i, bi) + { + bitmap_set_bit (n->aka, i + eh_offset); + VEC_replace (eh_region, cfun->eh->region_array, i + eh_offset, n); + } + } n->region_number += eh_offset; VEC_replace (eh_region, cfun->eh->region_array, n->region_number, n); @@ -883,8 +1059,11 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map, int i, min_region, max_region, eh_offset, cfun_last_region_number; int num_regions; - if (!ifun->eh->region_tree) + if (!ifun->eh) return 0; +#ifdef ENABLE_CHECKING + verify_eh_tree (ifun); +#endif /* Find the range of region numbers to be copied. The interface we provide here mandates a single offset to find new number from old, @@ -905,23 +1084,18 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map, eh_offset = cfun_last_region_number + 1 - min_region; /* If we've not yet created a region array, do so now. */ - VEC_safe_grow (eh_region, gc, cfun->eh->region_array, - cfun_last_region_number + 1 + num_regions); - cfun->eh->last_region_number = max_region + eh_offset; - - /* We may have just allocated the array for the first time. - Make sure that element zero is null. */ - VEC_replace (eh_region, cfun->eh->region_array, 0, 0); - - /* Zero all entries in the range allocated. */ - memset (VEC_address (eh_region, cfun->eh->region_array) - + cfun_last_region_number + 1, 0, num_regions * sizeof (eh_region)); + cfun->eh->last_region_number = cfun_last_region_number + num_regions; + VEC_safe_grow_cleared (eh_region, gc, cfun->eh->region_array, + cfun->eh->last_region_number + 1); /* Locate the spot at which to insert the new tree. */ if (outer_region > 0) { outer = VEC_index (eh_region, cfun->eh->region_array, outer_region); - splice = &outer->inner; + if (outer) + splice = &outer->inner; + else + splice = &cfun->eh->region_tree; } else { @@ -931,6 +1105,20 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map, while (*splice) splice = &(*splice)->next_peer; + if (!ifun->eh->region_tree) + { + if (outer) + for (i = cfun_last_region_number + 1; + i <= cfun->eh->last_region_number; i++) + { + VEC_replace (eh_region, cfun->eh->region_array, i, outer); + if (outer->aka == NULL) + outer->aka = BITMAP_GGC_ALLOC (); + bitmap_set_bit (outer->aka, i); + } + return eh_offset; + } + /* Copy all the regions in the subtree. */ if (copy_region > 0) { @@ -960,9 +1148,9 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map, the prev_try short-cuts for ERT_CLEANUP regions. */ prev_try = NULL; if (outer_region > 0) - for (prev_try = VEC_index (eh_region, cfun->eh->region_array, outer_region); - prev_try && prev_try->type != ERT_TRY; - prev_try = prev_try->outer) + for (prev_try = + VEC_index (eh_region, cfun->eh->region_array, outer_region); + prev_try && prev_try->type != ERT_TRY; prev_try = prev_try->outer) if (prev_try->type == ERT_MUST_NOT_THROW || (prev_try->type == ERT_ALLOWED_EXCEPTIONS && !prev_try->u.allowed.type_list)) @@ -978,7 +1166,23 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map, for (i = cfun_last_region_number + 1; VEC_iterate (eh_region, cfun->eh->region_array, i, cur); ++i) { + /* All removed EH that is toplevel in input function is now + in outer EH of output function. */ if (cur == NULL) + { + gcc_assert (VEC_index + (eh_region, ifun->eh->region_array, + i - eh_offset) == NULL); + if (outer) + { + VEC_replace (eh_region, cfun->eh->region_array, i, outer); + if (outer->aka == NULL) + outer->aka = BITMAP_GGC_ALLOC (); + bitmap_set_bit (outer->aka, i); + } + continue; + } + if (i != cur->region_number) continue; #define REMAP(REG) \ @@ -1014,6 +1218,9 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map, #undef REMAP } +#ifdef ENABLE_CHECKING + verify_eh_tree (cfun); +#endif return eh_offset; } @@ -1660,7 +1867,7 @@ sjlj_find_directly_reachable_regions (struct sjlj_lp_info *lp_info) rc = RNL_NOT_CAUGHT; for (; region; region = region->outer) { - rc = reachable_next_level (region, type_thrown, NULL); + rc = reachable_next_level (region, type_thrown, NULL, false); if (rc != RNL_NOT_CAUGHT) break; } @@ -2271,6 +2478,17 @@ maybe_remove_eh_handler (rtx label) remove_eh_handler (region); } +/* Remove Eh region R that has turned out to have no code in its handler. */ + +void +remove_eh_region (int r) +{ + struct eh_region *region; + + region = VEC_index (eh_region, cfun->eh->region_array, r); + remove_eh_handler (region); +} + /* Invokes CALLBACK for every exception handler label. Only used by old loop hackery; should not be used by new code. */ @@ -2316,7 +2534,6 @@ struct reachable_info tree types_allowed; void (*callback) (struct eh_region *, void *); void *callback_data; - bool saw_any_handlers; }; /* A subroutine of reachable_next_level. Return true if TYPE, or a @@ -2359,8 +2576,6 @@ add_reachable_handler (struct reachable_info *info, if (! info) return; - info->saw_any_handlers = true; - if (crtl->eh.built_landing_pads) info->callback (lp_region, info->callback_data); else @@ -2374,7 +2589,8 @@ add_reachable_handler (struct reachable_info *info, static enum reachable_code reachable_next_level (struct eh_region *region, tree type_thrown, - struct reachable_info *info) + struct reachable_info *info, + bool maybe_resx) { switch (region->type) { @@ -2510,15 +2726,16 @@ reachable_next_level (struct eh_region *region, tree type_thrown, case ERT_MUST_NOT_THROW: /* Here we end our search, since no exceptions may propagate. - If we've touched down at some landing pad previous, then the - explicit function call we generated may be used. Otherwise - the call is made by the runtime. + + Local landing pads of ERT_MUST_NOT_THROW instructions are reachable + only via locally handled RESX instructions. - Before inlining, do not perform this optimization. We may - inline a subroutine that contains handlers, and that will - change the value of saw_any_handlers. */ + When we inline a function call, we can bring in new handlers. In order + to avoid ERT_MUST_NOT_THROW landing pads from being deleted as unreachable + assume that such handlers exists prior for any inlinable call prior + inlining decisions are fixed. */ - if ((info && info->saw_any_handlers) || !cfun->after_inlining) + if (maybe_resx) { add_reachable_handler (info, region, region); return RNL_CAUGHT; @@ -2539,7 +2756,7 @@ reachable_next_level (struct eh_region *region, tree type_thrown, /* Invoke CALLBACK on each region reachable from REGION_NUMBER. */ void -foreach_reachable_handler (int region_number, bool is_resx, +foreach_reachable_handler (int region_number, bool is_resx, bool inlinable_call, void (*callback) (struct eh_region *, void *), void *callback_data) { @@ -2552,6 +2769,8 @@ foreach_reachable_handler (int region_number, bool is_resx, info.callback_data = callback_data; region = VEC_index (eh_region, cfun->eh->region_array, region_number); + if (!region) + return; type_thrown = NULL_TREE; if (is_resx) @@ -2570,7 +2789,8 @@ foreach_reachable_handler (int region_number, bool is_resx, while (region) { - if (reachable_next_level (region, type_thrown, &info) >= RNL_CAUGHT) + if (reachable_next_level (region, type_thrown, &info, + inlinable_call || is_resx) >= RNL_CAUGHT) break; /* If we have processed one cleanup, there is no point in processing any more of them. Each cleanup will have an edge @@ -2622,7 +2842,7 @@ reachable_handlers (rtx insn) region_number = INTVAL (XEXP (note, 0)); } - foreach_reachable_handler (region_number, is_resx, + foreach_reachable_handler (region_number, is_resx, false, (crtl->eh.built_landing_pads ? arh_to_landing_pad : arh_to_label), @@ -2635,12 +2855,14 @@ reachable_handlers (rtx insn) within the function. */ bool -can_throw_internal_1 (int region_number, bool is_resx) +can_throw_internal_1 (int region_number, bool is_resx, bool inlinable_call) { struct eh_region *region; tree type_thrown; region = VEC_index (eh_region, cfun->eh->region_array, region_number); + if (!region) + return false; type_thrown = NULL_TREE; if (is_resx) @@ -2656,7 +2878,8 @@ can_throw_internal_1 (int region_number, bool is_resx) regions, which also do not require processing internally. */ for (; region; region = region->outer) { - enum reachable_code how = reachable_next_level (region, type_thrown, 0); + enum reachable_code how = reachable_next_level (region, type_thrown, 0, + inlinable_call || is_resx); if (how == RNL_BLOCKED) return false; if (how != RNL_NOT_CAUGHT) @@ -2677,7 +2900,7 @@ can_throw_internal (const_rtx insn) if (JUMP_P (insn) && GET_CODE (PATTERN (insn)) == RESX && XINT (PATTERN (insn), 0) > 0) - return can_throw_internal_1 (XINT (PATTERN (insn), 0), true); + return can_throw_internal_1 (XINT (PATTERN (insn), 0), true, false); if (NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == SEQUENCE) @@ -2688,19 +2911,21 @@ can_throw_internal (const_rtx insn) if (!note || INTVAL (XEXP (note, 0)) <= 0) return false; - return can_throw_internal_1 (INTVAL (XEXP (note, 0)), false); + return can_throw_internal_1 (INTVAL (XEXP (note, 0)), false, false); } /* Determine if the given INSN can throw an exception that is visible outside the function. */ bool -can_throw_external_1 (int region_number, bool is_resx) +can_throw_external_1 (int region_number, bool is_resx, bool inlinable_call) { struct eh_region *region; tree type_thrown; region = VEC_index (eh_region, cfun->eh->region_array, region_number); + if (!region) + return true; type_thrown = NULL_TREE; if (is_resx) @@ -2714,7 +2939,8 @@ can_throw_external_1 (int region_number, bool is_resx) /* If the exception is caught or blocked by any containing region, then it is not seen by any calling function. */ for (; region ; region = region->outer) - if (reachable_next_level (region, type_thrown, NULL) >= RNL_CAUGHT) + if (reachable_next_level (region, type_thrown, NULL, + inlinable_call || is_resx) >= RNL_CAUGHT) return false; return true; @@ -2731,7 +2957,7 @@ can_throw_external (const_rtx insn) if (JUMP_P (insn) && GET_CODE (PATTERN (insn)) == RESX && XINT (PATTERN (insn), 0) > 0) - return can_throw_external_1 (XINT (PATTERN (insn), 0), true); + return can_throw_external_1 (XINT (PATTERN (insn), 0), true, false); if (NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == SEQUENCE) @@ -2752,7 +2978,7 @@ can_throw_external (const_rtx insn) if (INTVAL (XEXP (note, 0)) <= 0) return false; - return can_throw_external_1 (INTVAL (XEXP (note, 0)), false); + return can_throw_external_1 (INTVAL (XEXP (note, 0)), false, false); } /* Set TREE_NOTHROW and crtl->all_throwers_are_sibcalls. */ @@ -2762,13 +2988,7 @@ set_nothrow_function_flags (void) { rtx insn; - /* If we don't know that this implementation of the function will - actually be used, then we must not set TREE_NOTHROW, since - callers must not assume that this function does not throw. */ - if (DECL_REPLACEABLE_P (current_function_decl)) - return 0; - - TREE_NOTHROW (current_function_decl) = 1; + crtl->nothrow = 1; /* Assume crtl->all_throwers_are_sibcalls until we encounter something that can throw an exception. We specifically exempt @@ -2778,13 +2998,19 @@ set_nothrow_function_flags (void) crtl->all_throwers_are_sibcalls = 1; + /* If we don't know that this implementation of the function will + actually be used, then we must not set TREE_NOTHROW, since + callers must not assume that this function does not throw. */ + if (TREE_NOTHROW (current_function_decl)) + return 0; + if (! flag_exceptions) return 0; for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) if (can_throw_external (insn)) { - TREE_NOTHROW (current_function_decl) = 0; + crtl->nothrow = 0; if (!CALL_P (insn) || !SIBLING_CALL_P (insn)) { @@ -2797,7 +3023,7 @@ set_nothrow_function_flags (void) insn = XEXP (insn, 1)) if (can_throw_external (insn)) { - TREE_NOTHROW (current_function_decl) = 0; + crtl->nothrow = 0; if (!CALL_P (insn) || !SIBLING_CALL_P (insn)) { @@ -2805,6 +3031,10 @@ set_nothrow_function_flags (void) return 0; } } + if (crtl->nothrow + && (cgraph_function_body_availability (cgraph_node (current_function_decl)) + >= AVAIL_AVAILABLE)) + TREE_NOTHROW (current_function_decl) = 1; return 0; } @@ -3795,30 +4025,80 @@ get_eh_throw_stmt_table (struct function *fun) } /* Dump EH information to OUT. */ + void -dump_eh_tree (FILE *out, struct function *fun) +dump_eh_tree (FILE * out, struct function *fun) { struct eh_region *i; int depth = 0; - static const char * const type_name[] = {"unknown", "cleanup", "try", "catch", - "allowed_exceptions", "must_not_throw", - "throw"}; + static const char *const type_name[] = { "unknown", "cleanup", "try", "catch", + "allowed_exceptions", "must_not_throw", + "throw" + }; i = fun->eh->region_tree; - if (! i) + if (!i) return; fprintf (out, "Eh tree:\n"); while (1) { fprintf (out, " %*s %i %s", depth * 2, "", - i->region_number, type_name [(int)i->type]); + i->region_number, type_name[(int) i->type]); if (i->tree_label) { - fprintf (out, " tree_label:"); + fprintf (out, " tree_label:"); print_generic_expr (out, i->tree_label, 0); } - fprintf (out, "\n"); + switch (i->type) + { + case ERT_CLEANUP: + if (i->u.cleanup.prev_try) + fprintf (out, " prev try:%i", + i->u.cleanup.prev_try->region_number); + break; + + case ERT_TRY: + { + struct eh_region *c; + fprintf (out, " catch regions:"); + for (c = i->u.eh_try.eh_catch; c; c = c->u.eh_catch.next_catch) + fprintf (out, " %i", c->region_number); + } + break; + + case ERT_CATCH: + if (i->u.eh_catch.prev_catch) + fprintf (out, " prev: %i", + i->u.eh_catch.prev_catch->region_number); + if (i->u.eh_catch.next_catch) + fprintf (out, " next %i", + i->u.eh_catch.next_catch->region_number); + break; + + case ERT_ALLOWED_EXCEPTIONS: + fprintf (out, "filter :%i types:", i->u.allowed.filter); + print_generic_expr (out, i->u.allowed.type_list, 0); + break; + + case ERT_THROW: + fprintf (out, "type:"); + print_generic_expr (out, i->u.eh_throw.type, 0); + break; + + case ERT_MUST_NOT_THROW: + break; + + case ERT_UNKNOWN: + break; + } + if (i->aka) + { + fprintf (out, " also known as:"); + dump_bitmap (out, i->aka); + } + else + fprintf (out, "\n"); /* If there are sub-regions, process them. */ if (i->inner) i = i->inner, depth++; @@ -3828,12 +4108,14 @@ dump_eh_tree (FILE *out, struct function *fun) /* Otherwise, step back up the tree to the next peer. */ else { - do { - i = i->outer; - depth--; - if (i == NULL) - return; - } while (i->next_peer == NULL); + do + { + i = i->outer; + depth--; + if (i == NULL) + return; + } + while (i->next_peer == NULL); i = i->next_peer; } } @@ -3851,23 +4133,25 @@ verify_eh_tree (struct function *fun) int j; int depth = 0; - i = fun->eh->region_tree; - if (! i) + if (!fun->eh->region_tree) return; for (j = fun->eh->last_region_number; j > 0; --j) - if ((i = VEC_index (eh_region, cfun->eh->region_array, j))) + if ((i = VEC_index (eh_region, fun->eh->region_array, j))) { - count++; - if (i->region_number != j) + if (i->region_number == j) + count++; + if (i->region_number != j && (!i->aka || !bitmap_bit_p (i->aka, j))) { - error ("region_array is corrupted for region %i", i->region_number); + error ("region_array is corrupted for region %i", + i->region_number); err = true; } } + i = fun->eh->region_tree; while (1) { - if (VEC_index (eh_region, cfun->eh->region_array, i->region_number) != i) + if (VEC_index (eh_region, fun->eh->region_array, i->region_number) != i) { error ("region_array is corrupted for region %i", i->region_number); err = true; @@ -3879,8 +4163,9 @@ verify_eh_tree (struct function *fun) } if (i->may_contain_throw && outer && !outer->may_contain_throw) { - error ("region %i may contain throw and is contained in region that may not", - i->region_number); + error + ("region %i may contain throw and is contained in region that may not", + i->region_number); err = true; } if (depth < 0) @@ -3888,7 +4173,7 @@ verify_eh_tree (struct function *fun) error ("negative nesting depth of region %i", i->region_number); err = true; } - nvisited ++; + nvisited++; /* If there are sub-regions, process them. */ if (i->inner) outer = i, i = i->inner, depth++; @@ -3898,30 +4183,32 @@ verify_eh_tree (struct function *fun) /* Otherwise, step back up the tree to the next peer. */ else { - do { - i = i->outer; - depth--; - if (i == NULL) - { - if (depth != -1) - { - error ("tree list ends on depth %i", depth + 1); - err = true; - } - if (count != nvisited) - { - error ("array does not match the region tree"); - err = true; - } - if (err) - { - dump_eh_tree (stderr, fun); - internal_error ("verify_eh_tree failed"); - } - return; - } - outer = i->outer; - } while (i->next_peer == NULL); + do + { + i = i->outer; + depth--; + if (i == NULL) + { + if (depth != -1) + { + error ("tree list ends on depth %i", depth + 1); + err = true; + } + if (count != nvisited) + { + error ("array does not match the region tree"); + err = true; + } + if (err) + { + dump_eh_tree (stderr, fun); + internal_error ("verify_eh_tree failed"); + } + return; + } + outer = i->outer; + } + while (i->next_peer == NULL); i = i->next_peer; } } diff --git a/gcc/except.h b/gcc/except.h index 9f83a9948f8..e407ec2c7f8 100644 --- a/gcc/except.h +++ b/gcc/except.h @@ -19,6 +19,8 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#include "sbitmap.h" +#include "vecprim.h" struct function; @@ -44,9 +46,9 @@ extern void for_each_eh_label (void (*) (rtx)); extern void for_each_eh_region (void (*) (struct eh_region *)); /* Determine if the given INSN can throw an exception. */ -extern bool can_throw_internal_1 (int, bool); +extern bool can_throw_internal_1 (int, bool, bool); extern bool can_throw_internal (const_rtx); -extern bool can_throw_external_1 (int, bool); +extern bool can_throw_external_1 (int, bool, bool); extern bool can_throw_external (const_rtx); /* Set TREE_NOTHROW and cfun->all_throwers_are_sibcalls. */ @@ -61,6 +63,7 @@ extern void init_eh_for_function (void); extern rtx reachable_handlers (rtx); extern void maybe_remove_eh_handler (rtx); +void remove_eh_region (int); extern void convert_from_eh_region_ranges (void); extern unsigned int convert_to_eh_region_ranges (void); @@ -97,7 +100,7 @@ extern bool get_eh_region_may_contain_throw (struct eh_region *); extern tree get_eh_region_tree_label (struct eh_region *); extern void set_eh_region_tree_label (struct eh_region *, tree); -extern void foreach_reachable_handler (int, bool, +extern void foreach_reachable_handler (int, bool, bool, void (*) (struct eh_region *, void *), void *); @@ -174,3 +177,6 @@ struct throw_stmt_node GTY(()) extern struct htab *get_eh_throw_stmt_table (struct function *); extern void set_eh_throw_stmt_table (struct function *, struct htab *); +extern void remove_unreachable_regions (sbitmap, sbitmap); +extern VEC(int,heap) * label_to_region_map (void); +extern int num_eh_regions (void); diff --git a/gcc/fix-header.c b/gcc/fix-header.c deleted file mode 100644 index 6a2ebb1e841..00000000000 --- a/gcc/fix-header.c +++ /dev/null @@ -1,1314 +0,0 @@ -/* fix-header.c - Make C header file suitable for C++. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002, 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 3, or (at your option) any - later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING3. If not see - <http://www.gnu.org/licenses/>. */ - -/* This program massages a system include file (such as stdio.h), - into a form that is compatible with GNU C and GNU C++. - - * extern "C" { ... } braces are added (inside #ifndef __cplusplus), - if they seem to be needed. These prevent C++ compilers from name - mangling the functions inside the braces. - - * If an old-style incomplete function declaration is seen (without - an argument list), and it is a "standard" function listed in - the file sys-protos.h (and with a non-empty argument list), then - the declaration is converted to a complete prototype by replacing - the empty parameter list with the argument list from sys-protos.h. - - * The program can be given a list of (names of) required standard - functions (such as fclose for stdio.h). If a required function - is not seen in the input, then a prototype for it will be - written to the output. - - * If all of the non-comment code of the original file is protected - against multiple inclusion: - #ifndef FOO - #define FOO - <body of include file> - #endif - then extra matter added to the include file is placed inside the <body>. - - * If the input file is OK (nothing needs to be done); - the output file is not written (nor removed if it exists). - - There are also some special actions that are done for certain - well-known standard include files: - - * If argv[1] is "sys/stat.h", the Posix.1 macros - S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISREG are added if - they were missing, and the corresponding "traditional" S_IFxxx - macros were defined. - - * If argv[1] is "errno.h", errno is declared if it was missing. - - * TODO: The input file should be read complete into memory, because: - a) it needs to be scanned twice anyway, and - b) it would be nice to allow update in place. - - Usage: - fix-header FOO.H INFILE.H OUTFILE.H [OPTIONS] - where: - * FOO.H is the relative file name of the include file, - as it would be #include'd by a C file. (E.g. stdio.h) - * INFILE.H is a full pathname for the input file (e.g. /usr/include/stdio.h) - * OUTFILE.H is the full pathname for where to write the output file, - if anything needs to be done. (e.g. ./include/stdio.h) - * OPTIONS can be -D or -I switches as you would pass to cpp. - - Written by Per Bothner <bothner@cygnus.com>, July 1993. */ - -#include "bconfig.h" -#include "system.h" -#include "coretypes.h" -#include "tm.h" -#include "obstack.h" -#include "scan.h" -#include "cpplib.h" -#include "incpath.h" -#include "errors.h" - -#ifdef TARGET_EXTRA_INCLUDES -void -TARGET_EXTRA_INCLUDES (const char *sysroot ATTRIBUTE_UNUSED, - const char *iprefix ATTRIBUTE_UNUSED, - int stdinc ATTRIBUTE_UNUSED) -{ -} -#endif - -#ifdef TARGET_EXTRA_PRE_INCLUDES -void -TARGET_EXTRA_PRE_INCLUDES (const char *sysroot ATTRIBUTE_UNUSED, - const char *iprefix ATTRIBUTE_UNUSED, - int stdinc ATTRIBUTE_UNUSED) -{ -} -#endif - -struct line_maps line_table; - -sstring buf; - -int verbose = 0; -int partial_count = 0; -int warnings = 0; - -#if ADD_MISSING_EXTERN_C -int missing_extern_C_count = 0; -#endif - -#include "xsys-protos.h" - -#ifdef FIXPROTO_IGNORE_LIST -/* This is a currently unused feature. */ - -/* List of files and directories to ignore. - A directory name (ending in '/') means ignore anything in that - directory. (It might be more efficient to do directory pruning - earlier in fixproto, but this is simpler and easier to customize.) */ - -static const char *const files_to_ignore[] = { - "X11/", - FIXPROTO_IGNORE_LIST - 0 -}; -#endif - -char *inf_buffer; -char *inf_limit; -char *inf_ptr; -static const char *cur_file; - -/* Certain standard files get extra treatment */ - -enum special_file -{ - no_special, -#ifdef errno_h -#undef errno_h -#endif - errno_h, -#ifdef stdio_h -#undef stdio_h -#endif - stdio_h, -#ifdef stdlib_h -#undef stdlib_h -#endif - stdlib_h, -#ifdef sys_stat_h -#undef sys_stat_h -#endif - sys_stat_h -}; - -/* A NAMELIST is a sequence of names, separated by '\0', and terminated - by an empty name (i.e. by "\0\0"). */ - -typedef const char *namelist; - -/* The following macros provide the bits for symbol_flags. */ -typedef int symbol_flags; - -/* Used to mark names defined in the ANSI/ISO C standard. */ -#define ANSI_SYMBOL 1 - -/* We no longer massage include files for POSIX or XOPEN symbols, - as there are now several versions of the POSIX and XOPEN standards, - and it would be a maintenance nightmare for us to track them all. - Better to be compatible with the system include files. */ -/*#define ADD_MISSING_POSIX 1 */ -/*#define ADD_MISSING_XOPEN 1 */ - -#if ADD_MISSING_POSIX -/* Used to mark names defined in the Posix.1 or Posix.2 standard. */ -#define POSIX1_SYMBOL 2 -#define POSIX2_SYMBOL 4 -#else -#define POSIX1_SYMBOL 0 -#define POSIX2_SYMBOL 0 -#endif - -#if ADD_MISSING_XOPEN -/* Used to mark names defined in X/Open Portability Guide. */ -#define XOPEN_SYMBOL 8 -/* Used to mark names defined in X/Open UNIX Extensions. */ -#define XOPEN_EXTENDED_SYMBOL 16 -#else -#define XOPEN_SYMBOL 0 -#define XOPEN_EXTENDED_SYMBOL 0 -#endif - -/* Used to indicate names that are not functions */ -#define MACRO_SYMBOL 512 - -struct symbol_list { - symbol_flags flags; - namelist names; -}; - -#define SYMBOL_TABLE_SIZE 10 -struct symbol_list symbol_table[SYMBOL_TABLE_SIZE]; -int cur_symbol_table_size; - -static void add_symbols (symbol_flags, namelist); -static struct fn_decl *lookup_std_proto (const char *, int); -static void write_lbrac (void); -static void recognized_macro (const char *); -static void check_macro_names (cpp_reader *, namelist); -static void read_scan_file (char *, int, char **); -static void write_rbrac (void); -static int inf_skip_spaces (int); -static int inf_read_upto (sstring *, int); -static int inf_scan_ident (sstring *, int); -static int check_protection (int *, int *); -static void cb_file_change (cpp_reader *, const struct line_map *); - -static void -add_symbols (symbol_flags flags, namelist names) -{ - symbol_table[cur_symbol_table_size].flags = flags; - symbol_table[cur_symbol_table_size].names = names; - cur_symbol_table_size++; - if (cur_symbol_table_size >= SYMBOL_TABLE_SIZE) - fatal ("too many calls to add_symbols"); - symbol_table[cur_symbol_table_size].names = NULL; /* Termination. */ -} - -struct std_include_entry { - const char *const name; - const symbol_flags flags; - const namelist names; -}; - -const char NONE[] = ""; /* The empty namelist. */ - -/* Special name to indicate a continuation line in std_include_table. */ -const char CONTINUED[] = ""; - -const struct std_include_entry *include_entry; - -const struct std_include_entry std_include_table [] = { - { "ctype.h", ANSI_SYMBOL, - "isalnum\0isalpha\0iscntrl\0isdigit\0isgraph\0islower\0\ -isprint\0ispunct\0isspace\0isupper\0isxdigit\0tolower\0toupper\0" }, - - { "dirent.h", POSIX1_SYMBOL, "closedir\0opendir\0readdir\0rewinddir\0"}, - - { "errno.h", ANSI_SYMBOL|MACRO_SYMBOL, "errno\0" }, - - /* ANSI_SYMBOL is wrong, but ... */ - { "curses.h", ANSI_SYMBOL, "box\0delwin\0endwin\0getcurx\0getcury\0initscr\0\ -mvcur\0mvwprintw\0mvwscanw\0newwin\0overlay\0overwrite\0\ -scroll\0subwin\0touchwin\0waddstr\0wclear\0wclrtobot\0wclrtoeol\0\ -waddch\0wdelch\0wdeleteln\0werase\0wgetch\0wgetstr\0winsch\0winsertln\0\ -wmove\0wprintw\0wrefresh\0wscanw\0wstandend\0wstandout\0" }, - - { "fcntl.h", POSIX1_SYMBOL, "creat\0fcntl\0open\0" }, - - /* Maybe also "getgrent fgetgrent setgrent endgrent" */ - { "grp.h", POSIX1_SYMBOL, "getgrgid\0getgrnam\0" }, - -/*{ "limit.h", ... provided by gcc }, */ - - { "locale.h", ANSI_SYMBOL, "localeconv\0setlocale\0" }, - - { "math.h", ANSI_SYMBOL, - "acos\0asin\0atan\0atan2\0ceil\0cos\0cosh\0exp\0\ -fabs\0floor\0fmod\0frexp\0ldexp\0log10\0log\0modf\0pow\0sin\0sinh\0sqrt\0\ -tan\0tanh\0" }, - - { CONTINUED, ANSI_SYMBOL|MACRO_SYMBOL, "HUGE_VAL\0" }, - - { "pwd.h", POSIX1_SYMBOL, "getpwnam\0getpwuid\0" }, - - /* Left out siglongjmp sigsetjmp - these depend on sigjmp_buf. */ - { "setjmp.h", ANSI_SYMBOL, "longjmp\0setjmp\0" }, - - /* Left out signal() - its prototype is too complex for us! - Also left out "sigaction sigaddset sigdelset sigemptyset - sigfillset sigismember sigpending sigprocmask sigsuspend" - because these need sigset_t or struct sigaction. - Most systems that provide them will also declare them. */ - { "signal.h", ANSI_SYMBOL, "raise\0" }, - { CONTINUED, POSIX1_SYMBOL, "kill\0" }, - - { "stdio.h", ANSI_SYMBOL, - "clearerr\0fclose\0feof\0ferror\0fflush\0fgetc\0fgetpos\0\ -fgets\0fopen\0fprintf\0fputc\0fputs\0fread\0freopen\0fscanf\0fseek\0\ -fsetpos\0ftell\0fwrite\0getc\0getchar\0gets\0perror\0\ -printf\0putc\0putchar\0puts\0remove\0rename\0rewind\0scanf\0setbuf\0\ -setvbuf\0sprintf\0sscanf\0vprintf\0vsprintf\0vfprintf\0tmpfile\0\ -tmpnam\0ungetc\0" }, - { CONTINUED, POSIX1_SYMBOL, "fdopen\0fileno\0" }, - { CONTINUED, POSIX2_SYMBOL, "pclose\0popen\0" }, /* I think ... */ -/* Should perhaps also handle NULL, EOF, ... ? */ - - /* "div ldiv", - ignored because these depend on div_t, ldiv_t - ignore these: "mblen mbstowcs mbstowc wcstombs wctomb" - Left out getgroups, because SunOS4 has incompatible BSD and SVR4 versions. - Should perhaps also add NULL */ - { "stdlib.h", ANSI_SYMBOL, - "abort\0abs\0atexit\0atof\0atoi\0atol\0bsearch\0calloc\0\ -exit\0free\0getenv\0labs\0malloc\0qsort\0rand\0realloc\0\ -srand\0strtod\0strtol\0strtoul\0system\0" }, - { CONTINUED, ANSI_SYMBOL|MACRO_SYMBOL, "EXIT_FAILURE\0EXIT_SUCCESS\0" }, - { CONTINUED, POSIX1_SYMBOL, "putenv\0" }, - - { "string.h", ANSI_SYMBOL, "memchr\0memcmp\0memcpy\0memmove\0memset\0\ -strcat\0strchr\0strcmp\0strcoll\0strcpy\0strcspn\0strerror\0\ -strlen\0strncat\0strncmp\0strncpy\0strpbrk\0strrchr\0strspn\0strstr\0\ -strtok\0strxfrm\0" }, -/* Should perhaps also add NULL and size_t */ - - { "strings.h", XOPEN_EXTENDED_SYMBOL, - "bcmp\0bcopy\0bzero\0ffs\0index\0rindex\0strcasecmp\0strncasecmp\0" }, - - { "strops.h", XOPEN_EXTENDED_SYMBOL, "ioctl\0" }, - - /* Actually, XPG4 does not seem to have <sys/ioctl.h>, but defines - ioctl in <strops.h>. However, many systems have it is sys/ioctl.h, - and many systems do have <sys/ioctl.h> but not <strops.h>. */ - { "sys/ioctl.h", XOPEN_EXTENDED_SYMBOL, "ioctl\0" }, - - { "sys/socket.h", XOPEN_EXTENDED_SYMBOL, "socket\0" }, - - { "sys/stat.h", POSIX1_SYMBOL, - "chmod\0fstat\0mkdir\0mkfifo\0stat\0lstat\0umask\0" }, - { CONTINUED, POSIX1_SYMBOL|MACRO_SYMBOL, - "S_ISDIR\0S_ISBLK\0S_ISCHR\0S_ISFIFO\0S_ISREG\0S_ISLNK\0S_IFDIR\0\ -S_IFBLK\0S_IFCHR\0S_IFIFO\0S_IFREG\0S_IFLNK\0" }, - { CONTINUED, XOPEN_EXTENDED_SYMBOL, "fchmod\0" }, - -#if 0 -/* How do we handle fd_set? */ - { "sys/time.h", XOPEN_EXTENDED_SYMBOL, "select\0" }, - { "sys/select.h", XOPEN_EXTENDED_SYMBOL /* fake */, "select\0" }, -#endif - - { "sys/times.h", POSIX1_SYMBOL, "times\0" }, - /* "sys/types.h" add types (not in old g++-include) */ - - { "sys/utsname.h", POSIX1_SYMBOL, "uname\0" }, - - { "sys/wait.h", POSIX1_SYMBOL, "wait\0waitpid\0" }, - { CONTINUED, POSIX1_SYMBOL|MACRO_SYMBOL, - "WEXITSTATUS\0WIFEXITED\0WIFSIGNALED\0WIFSTOPPED\0WSTOPSIG\0\ -WTERMSIG\0WNOHANG\0WNOTRACED\0" }, - - { "tar.h", POSIX1_SYMBOL, NONE }, - - { "termios.h", POSIX1_SYMBOL, - "cfgetispeed\0cfgetospeed\0cfsetispeed\0cfsetospeed\0tcdrain\0tcflow\0tcflush\0tcgetattr\0tcsendbreak\0tcsetattr\0" }, - - { "time.h", ANSI_SYMBOL, - "asctime\0clock\0ctime\0difftime\0gmtime\0localtime\0mktime\0strftime\0time\0" }, - { CONTINUED, POSIX1_SYMBOL, "tzset\0" }, - - { "unistd.h", POSIX1_SYMBOL, - "_exit\0access\0alarm\0chdir\0chown\0close\0ctermid\0cuserid\0\ -dup\0dup2\0execl\0execle\0execlp\0execv\0execve\0execvp\0fork\0fpathconf\0\ -getcwd\0getegid\0geteuid\0getgid\0getlogin\0getpgrp\0getpid\0\ -getppid\0getuid\0isatty\0link\0lseek\0pathconf\0pause\0pipe\0read\0rmdir\0\ -setgid\0setpgid\0setsid\0setuid\0sleep\0sysconf\0tcgetpgrp\0tcsetpgrp\0\ -ttyname\0unlink\0write\0" }, - { CONTINUED, POSIX2_SYMBOL, "getopt\0" }, - { CONTINUED, XOPEN_EXTENDED_SYMBOL, - "lockf\0gethostid\0gethostname\0readlink\0symlink\0" }, - - { "utime.h", POSIX1_SYMBOL, "utime\0" }, - - { NULL, 0, NONE } -}; - -enum special_file special_file_handling = no_special; - -/* They are set if the corresponding macro has been seen. */ -/* The following are only used when handling sys/stat.h */ -int seen_S_IFBLK = 0, seen_S_ISBLK = 0; -int seen_S_IFCHR = 0, seen_S_ISCHR = 0; -int seen_S_IFDIR = 0, seen_S_ISDIR = 0; -int seen_S_IFIFO = 0, seen_S_ISFIFO = 0; -int seen_S_IFLNK = 0, seen_S_ISLNK = 0; -int seen_S_IFREG = 0, seen_S_ISREG = 0; -/* The following are only used when handling errno.h */ -int seen_errno = 0; -/* The following are only used when handling stdlib.h */ -int seen_EXIT_FAILURE = 0, seen_EXIT_SUCCESS = 0; - -struct obstack scan_file_obstack; - -/* NOTE: If you edit this, also edit gen-protos.c !! */ - -static struct fn_decl * -lookup_std_proto (const char *name, int name_length) -{ - int i = hashstr (name, name_length) % HASH_SIZE; - int i0 = i; - for (;;) - { - struct fn_decl *fn; - if (hash_tab[i] == 0) - return NULL; - fn = &std_protos[hash_tab[i]]; - if ((int) strlen (fn->fname) == name_length - && strncmp (fn->fname, name, name_length) == 0) - return fn; - i = (i+1) % HASH_SIZE; - gcc_assert (i != i0); - } -} - -char *inc_filename; -int inc_filename_length; -FILE *outf; -sstring line; - -int lbrac_line, rbrac_line; - -int required_unseen_count = 0; -int required_other = 0; - -static void -write_lbrac (void) -{ - if (partial_count) - { - fprintf (outf, "#ifndef _PARAMS\n"); - fprintf (outf, "#if defined(__STDC__) || defined(__cplusplus)\n"); - fprintf (outf, "#define _PARAMS(ARGS) ARGS\n"); - fprintf (outf, "#else\n"); - fprintf (outf, "#define _PARAMS(ARGS) ()\n"); - fprintf (outf, "#endif\n#endif /* _PARAMS */\n"); - } -} - -struct partial_proto -{ - struct partial_proto *next; - struct fn_decl *fn; - int line_seen; -}; - -struct partial_proto *partial_proto_list = NULL; - -struct partial_proto required_dummy_proto, seen_dummy_proto; -#define REQUIRED(FN) ((FN)->partial == &required_dummy_proto) -#define SET_REQUIRED(FN) ((FN)->partial = &required_dummy_proto) -#define SET_SEEN(FN) ((FN)->partial = &seen_dummy_proto) -#define SEEN(FN) ((FN)->partial == &seen_dummy_proto) - -static void -recognized_macro (const char *fname) -{ - /* The original include file defines fname as a macro. */ - struct fn_decl *fn = lookup_std_proto (fname, strlen (fname)); - - /* Since fname is a macro, don't require a prototype for it. */ - if (fn) - { - if (REQUIRED (fn)) - required_unseen_count--; - SET_SEEN (fn); - } - - switch (special_file_handling) - { - case errno_h: - if (strcmp (fname, "errno") == 0 && !seen_errno) - seen_errno = 1, required_other--; - break; - case stdlib_h: - if (strcmp (fname, "EXIT_FAILURE") == 0 && !seen_EXIT_FAILURE) - seen_EXIT_FAILURE = 1, required_other--; - if (strcmp (fname, "EXIT_SUCCESS") == 0 && !seen_EXIT_SUCCESS) - seen_EXIT_SUCCESS = 1, required_other--; - break; - case sys_stat_h: - if (fname[0] == 'S' && fname[1] == '_') - { - if (strcmp (fname, "S_IFBLK") == 0) seen_S_IFBLK++; - else if (strcmp (fname, "S_ISBLK") == 0) seen_S_ISBLK++; - else if (strcmp (fname, "S_IFCHR") == 0) seen_S_IFCHR++; - else if (strcmp (fname, "S_ISCHR") == 0) seen_S_ISCHR++; - else if (strcmp (fname, "S_IFDIR") == 0) seen_S_IFDIR++; - else if (strcmp (fname, "S_ISDIR") == 0) seen_S_ISDIR++; - else if (strcmp (fname, "S_IFIFO") == 0) seen_S_IFIFO++; - else if (strcmp (fname, "S_ISFIFO") == 0) seen_S_ISFIFO++; - else if (strcmp (fname, "S_IFLNK") == 0) seen_S_IFLNK++; - else if (strcmp (fname, "S_ISLNK") == 0) seen_S_ISLNK++; - else if (strcmp (fname, "S_IFREG") == 0) seen_S_IFREG++; - else if (strcmp (fname, "S_ISREG") == 0) seen_S_ISREG++; - } - break; - - default: - break; - } -} - -void -recognized_extern (const cpp_token *name) -{ - switch (special_file_handling) - { - case errno_h: - if (cpp_ideq (name, "errno")) - seen_errno = 1, required_other--; - break; - - default: - break; - } -} - -/* Called by scan_decls if it saw a function definition for a function - named FNAME. KIND is 'I' for an inline function; 'F' if a normal - function declaration preceded by 'extern "C"' (or nested inside - 'extern "C"' braces); or 'f' for other function declarations. */ - -void -recognized_function (const cpp_token *fname, unsigned int line, int kind, - int have_arg_list) -{ - struct partial_proto *partial; - int i; - struct fn_decl *fn; - - fn = lookup_std_proto ((const char *) NODE_NAME (fname->val.node), - NODE_LEN (fname->val.node)); - - /* Remove the function from the list of required function. */ - if (fn) - { - if (REQUIRED (fn)) - required_unseen_count--; - SET_SEEN (fn); - } - - /* If we have a full prototype, we're done. */ - if (have_arg_list) - return; - - if (kind == 'I') /* don't edit inline function */ - return; - - /* If the partial prototype was included from some other file, - we don't need to patch it up (in this run). */ - i = strlen (cur_file); - if (i < inc_filename_length - || strcmp (inc_filename, cur_file + (i - inc_filename_length)) != 0) - return; - - if (fn == NULL) - return; - if (fn->params[0] == '\0') - return; - - /* We only have a partial function declaration, - so remember that we have to add a complete prototype. */ - partial_count++; - partial - = (struct partial_proto *) - obstack_alloc (&scan_file_obstack, - sizeof (struct partial_proto)); - partial->line_seen = line; - partial->fn = fn; - fn->partial = partial; - partial->next = partial_proto_list; - partial_proto_list = partial; - if (verbose) - { - fprintf (stderr, "(%s: %s non-prototype function declaration.)\n", - inc_filename, fn->fname); - } -} - -/* For any name in NAMES that is defined as a macro, - call recognized_macro on it. */ - -static void -check_macro_names (cpp_reader *pfile, namelist names) -{ - size_t len; - while (*names) - { - len = strlen (names); - if (cpp_defined (pfile, (const unsigned char *)names, len)) - recognized_macro (names); - names += len + 1; - } -} - -static void -cb_file_change (cpp_reader *pfile ATTRIBUTE_UNUSED, - const struct line_map *map) -{ - /* Just keep track of current file name. */ - cur_file = map == NULL ? NULL : map->to_file; -} - -static void -read_scan_file (char *in_fname, int argc, char **argv) -{ - cpp_reader *scan_in; - cpp_callbacks *cb; - cpp_options *options; - struct fn_decl *fn; - int i, strings_processed; - struct symbol_list *cur_symbols; - - obstack_init (&scan_file_obstack); - - linemap_init (&line_table); - scan_in = cpp_create_reader (CLK_GNUC89, NULL, &line_table); - cb = cpp_get_callbacks (scan_in); - cb->file_change = cb_file_change; - - /* We are going to be scanning a header file out of its proper context, - so ignore warnings and errors. */ - options = cpp_get_options (scan_in); - options->inhibit_warnings = 1; - options->inhibit_errors = 1; - cpp_post_options (scan_in); - - if (!cpp_read_main_file (scan_in, in_fname)) - exit (FATAL_EXIT_CODE); - - cpp_change_file (scan_in, LC_RENAME, "<built-in>"); - cpp_init_builtins (scan_in, true); - cpp_change_file (scan_in, LC_RENAME, in_fname); - - /* Process switches after builtins so -D can override them. */ - for (i = 0; i < argc; i += strings_processed) - { - strings_processed = 0; - if (argv[i][0] == '-') - { - if (argv[i][1] == 'I') - { - if (argv[i][2] != '\0') - { - strings_processed = 1; - add_path (xstrdup (argv[i] + 2), BRACKET, false, false); - } - else if (i + 1 != argc) - { - strings_processed = 2; - add_path (xstrdup (argv[i + 1]), BRACKET, false, false); - } - } - else if (argv[i][1] == 'D') - { - if (argv[i][2] != '\0') - strings_processed = 1, cpp_define (scan_in, argv[i] + 2); - else if (i + 1 != argc) - strings_processed = 2, cpp_define (scan_in, argv[i + 1]); - } - } - - if (strings_processed == 0) - break; - } - - if (i < argc) - cpp_error (scan_in, CPP_DL_ERROR, "invalid option `%s'", argv[i]); - if (cpp_errors (scan_in)) - exit (FATAL_EXIT_CODE); - - register_include_chains (scan_in, NULL /* sysroot */, NULL /* iprefix */, - NULL /* imultilib */, true /* stdinc */, - false /* cxx_stdinc */, false /* verbose */); - - /* We are scanning a system header, so mark it as such. */ - cpp_make_system_header (scan_in, 1, 0); - - scan_decls (scan_in, argc, argv); - for (cur_symbols = &symbol_table[0]; cur_symbols->names; cur_symbols++) - check_macro_names (scan_in, cur_symbols->names); - - /* Traditionally, getc and putc are defined in terms of _filbuf and _flsbuf. - If so, those functions are also required. */ - if (special_file_handling == stdio_h - && (fn = lookup_std_proto ("_filbuf", 7)) != NULL) - { - unsigned char getchar_call[] = "getchar();\n"; - int seen_filbuf = 0; - - /* Scan the macro expansion of "getchar();". */ - cpp_push_buffer (scan_in, getchar_call, sizeof(getchar_call) - 1, - /* from_stage3 */ true); - for (;;) - { - const cpp_token *t = cpp_get_token (scan_in); - - if (t->type == CPP_EOF) - break; - else if (cpp_ideq (t, "_filbuf")) - seen_filbuf++; - } - - if (seen_filbuf) - { - int need_filbuf = !SEEN (fn) && !REQUIRED (fn); - struct fn_decl *flsbuf_fn = lookup_std_proto ("_flsbuf", 7); - int need_flsbuf - = flsbuf_fn && !SEEN (flsbuf_fn) && !REQUIRED (flsbuf_fn); - - /* Append "_filbuf" and/or "_flsbuf" to the required functions. */ - if (need_filbuf + need_flsbuf) - { - const char *new_list; - if (need_filbuf) - SET_REQUIRED (fn); - if (need_flsbuf) - SET_REQUIRED (flsbuf_fn); - if (need_flsbuf && need_filbuf) - new_list = "_filbuf\0_flsbuf\0"; - else if (need_flsbuf) - new_list = "_flsbuf\0"; - else /* if (need_flsbuf) */ - new_list = "_filbuf\0"; - add_symbols (ANSI_SYMBOL, new_list); - required_unseen_count += need_filbuf + need_flsbuf; - } - } - } - - if (required_unseen_count + partial_count + required_other == 0) - { - if (verbose) - fprintf (stderr, "%s: OK, nothing needs to be done.\n", inc_filename); - exit (SUCCESS_EXIT_CODE); - } - if (!verbose) - fprintf (stderr, "%s: fixing %s\n", progname, inc_filename); - else - { - if (required_unseen_count) - fprintf (stderr, "%s: %d missing function declarations.\n", - inc_filename, required_unseen_count); - if (partial_count) - fprintf (stderr, "%s: %d non-prototype function declarations.\n", - inc_filename, partial_count); - } -} - -static void -write_rbrac (void) -{ - struct fn_decl *fn; - const char *cptr; - struct symbol_list *cur_symbols; - - if (required_unseen_count) - { -#ifdef NO_IMPLICIT_EXTERN_C - fprintf (outf, "#ifdef __cplusplus\nextern \"C\" {\n#endif\n"); -#endif - } - - /* Now we print out prototypes for those functions that we haven't seen. */ - for (cur_symbols = &symbol_table[0]; cur_symbols->names; cur_symbols++) - { - int if_was_emitted = 0; - int name_len; - cptr = cur_symbols->names; - for ( ; (name_len = strlen (cptr)) != 0; cptr+= name_len + 1) - { - int macro_protect = 0; - - if (cur_symbols->flags & MACRO_SYMBOL) - continue; - - fn = lookup_std_proto (cptr, name_len); - if (fn == NULL || !REQUIRED (fn)) - continue; - - if (!if_was_emitted) - { -/* what about curses. ??? or _flsbuf/_filbuf ??? */ - if (cur_symbols->flags & ANSI_SYMBOL) - fprintf (outf, - "#if defined(__USE_FIXED_PROTOTYPES__) || defined(__cplusplus) || defined (__STRICT_ANSI__)\n"); - else if (cur_symbols->flags & (POSIX1_SYMBOL|POSIX2_SYMBOL)) - fprintf (outf, - "#if defined(__USE_FIXED_PROTOTYPES__) || (defined(__cplusplus) \\\n\ - ? (!defined(__STRICT_ANSI__) || defined(_POSIX_SOURCE)) \\\n\ - : (defined(__STRICT_ANSI__) && defined(_POSIX_SOURCE)))\n"); - else if (cur_symbols->flags & XOPEN_SYMBOL) - { - fprintf (outf, - "#if defined(__USE_FIXED_PROTOTYPES__) \\\n\ - || (defined(__STRICT_ANSI__) && defined(_XOPEN_SOURCE))\n"); - } - else if (cur_symbols->flags & XOPEN_EXTENDED_SYMBOL) - { - fprintf (outf, - "#if defined(__USE_FIXED_PROTOTYPES__) \\\n\ - || (defined(__STRICT_ANSI__) && defined(_XOPEN_EXTENDED_SOURCE))\n"); - } - else - { - fatal ("internal error for function %s", fn->fname); - } - if_was_emitted = 1; - } - - /* In the case of memmove, protect in case the application - defines it as a macro before including the header. */ - if (!strcmp (fn->fname, "memmove") - || !strcmp (fn->fname, "putc") - || !strcmp (fn->fname, "getc") - || !strcmp (fn->fname, "vprintf") - || !strcmp (fn->fname, "vfprintf") - || !strcmp (fn->fname, "vsprintf") - || !strcmp (fn->fname, "rewinddir") - || !strcmp (fn->fname, "abort")) - macro_protect = 1; - - if (macro_protect) - fprintf (outf, "#ifndef %s\n", fn->fname); - fprintf (outf, "extern %s %s (%s);\n", - fn->rtype, fn->fname, fn->params); - if (macro_protect) - fprintf (outf, "#endif\n"); - } - if (if_was_emitted) - fprintf (outf, - "#endif /* defined(__USE_FIXED_PROTOTYPES__) || ... */\n"); - } - if (required_unseen_count) - { -#ifdef NO_IMPLICIT_EXTERN_C - fprintf (outf, "#ifdef __cplusplus\n}\n#endif\n"); -#endif - } - - switch (special_file_handling) - { - case errno_h: - if (!seen_errno) - fprintf (outf, "extern int errno;\n"); - break; - case stdlib_h: - if (!seen_EXIT_FAILURE) - fprintf (outf, "#define EXIT_FAILURE 1\n"); - if (!seen_EXIT_SUCCESS) - fprintf (outf, "#define EXIT_SUCCESS 0\n"); - break; - case sys_stat_h: - if (!seen_S_ISBLK && seen_S_IFBLK) - fprintf (outf, - "#define S_ISBLK(mode) (((mode) & S_IFMT) == S_IFBLK)\n"); - if (!seen_S_ISCHR && seen_S_IFCHR) - fprintf (outf, - "#define S_ISCHR(mode) (((mode) & S_IFMT) == S_IFCHR)\n"); - if (!seen_S_ISDIR && seen_S_IFDIR) - fprintf (outf, - "#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)\n"); - if (!seen_S_ISFIFO && seen_S_IFIFO) - fprintf (outf, - "#define S_ISFIFO(mode) (((mode) & S_IFMT) == S_IFIFO)\n"); - if (!seen_S_ISLNK && seen_S_IFLNK) - fprintf (outf, - "#define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK)\n"); - if (!seen_S_ISREG && seen_S_IFREG) - fprintf (outf, - "#define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)\n"); - break; - - default: - break; - } - -} - -/* Returns 1 iff the file is properly protected from multiple inclusion: - #ifndef PROTECT_NAME - #define PROTECT_NAME - #endif - - */ - -#define INF_GET() (inf_ptr < inf_limit ? *(unsigned char *) inf_ptr++ : EOF) -#define INF_UNGET(c) ((c)!=EOF && inf_ptr--) - -static int -inf_skip_spaces (int c) -{ - for (;;) - { - if (c == ' ' || c == '\t') - c = INF_GET (); - else if (c == '/') - { - c = INF_GET (); - if (c != '*') - { - (void) INF_UNGET (c); - return '/'; - } - c = INF_GET (); - for (;;) - { - if (c == EOF) - return EOF; - else if (c != '*') - { - if (c == '\n') - source_lineno++, lineno++; - c = INF_GET (); - } - else if ((c = INF_GET ()) == '/') - return INF_GET (); - } - } - else - break; - } - return c; -} - -/* Read into STR from inf_buffer upto DELIM. */ - -static int -inf_read_upto (sstring *str, int delim) -{ - int ch; - for (;;) - { - ch = INF_GET (); - if (ch == EOF || ch == delim) - break; - SSTRING_PUT (str, ch); - } - MAKE_SSTRING_SPACE (str, 1); - *str->ptr = 0; - return ch; -} - -static int -inf_scan_ident (sstring *s, int c) -{ - s->ptr = s->base; - if (ISIDST (c)) - { - for (;;) - { - SSTRING_PUT (s, c); - c = INF_GET (); - if (c == EOF || !(ISIDNUM (c))) - break; - } - } - MAKE_SSTRING_SPACE (s, 1); - *s->ptr = 0; - return c; -} - -/* Returns 1 if the file is correctly protected against multiple - inclusion, setting *ifndef_line to the line number of the initial #ifndef - and setting *endif_line to the final #endif. - Otherwise return 0. */ - -static int -check_protection (int *ifndef_line, int *endif_line) -{ - int c; - int if_nesting = 1; /* Level of nesting of #if's */ - char *protect_name = NULL; /* Identifier following initial #ifndef */ - int define_seen = 0; - - /* Skip initial white space (including comments). */ - for (;; lineno++) - { - c = inf_skip_spaces (' '); - if (c == EOF) - return 0; - if (c != '\n') - break; - } - if (c != '#') - return 0; - c = inf_scan_ident (&buf, inf_skip_spaces (' ')); - if (SSTRING_LENGTH (&buf) == 0 || strcmp (buf.base, "ifndef") != 0) - return 0; - - /* So far so good: We've seen an initial #ifndef. */ - *ifndef_line = lineno; - c = inf_scan_ident (&buf, inf_skip_spaces (c)); - if (SSTRING_LENGTH (&buf) == 0 || c == EOF) - return 0; - protect_name = xstrdup (buf.base); - - (void) INF_UNGET (c); - c = inf_read_upto (&buf, '\n'); - if (c == EOF) - return 0; - lineno++; - - for (;;) - { - c = inf_skip_spaces (' '); - if (c == EOF) - return 0; - if (c == '\n') - { - lineno++; - continue; - } - if (c != '#') - goto skip_to_eol; - c = inf_scan_ident (&buf, inf_skip_spaces (' ')); - if (SSTRING_LENGTH (&buf) == 0) - ; - else if (!strcmp (buf.base, "ifndef") - || !strcmp (buf.base, "ifdef") || !strcmp (buf.base, "if")) - { - if_nesting++; - } - else if (!strcmp (buf.base, "endif")) - { - if_nesting--; - if (if_nesting == 0) - break; - } - else if (!strcmp (buf.base, "else")) - { - if (if_nesting == 1) - return 0; - } - else if (!strcmp (buf.base, "define")) - { - c = inf_skip_spaces (c); - c = inf_scan_ident (&buf, c); - if (buf.base[0] > 0 && strcmp (buf.base, protect_name) == 0) - define_seen = 1; - } - skip_to_eol: - for (;;) - { - if (c == '\n' || c == EOF) - break; - c = INF_GET (); - } - if (c == EOF) - return 0; - lineno++; - } - - if (!define_seen) - return 0; - *endif_line = lineno; - /* Skip final white space (including comments). */ - for (;;) - { - c = inf_skip_spaces (' '); - if (c == EOF) - break; - if (c != '\n') - return 0; - } - - return 1; -} - -extern int main (int, char **); - -int -main (int argc, char **argv) -{ - int inf_fd; - struct stat sbuf; - int c; -#ifdef FIXPROTO_IGNORE_LIST - int i; -#endif - const char *cptr; - int ifndef_line; - int endif_line; - long to_read; - long int inf_size; - struct symbol_list *cur_symbols; - - progname = "fix-header"; - if (argv[0] && argv[0][0]) - { - char *p; - - progname = 0; - for (p = argv[0]; *p; p++) - if (*p == '/') - progname = p; - progname = progname ? progname+1 : argv[0]; - } - - if (argc < 4) - { - fprintf (stderr, "%s: Usage: foo.h infile.h outfile.h options\n", - progname); - exit (FATAL_EXIT_CODE); - } - - inc_filename = argv[1]; - inc_filename_length = strlen (inc_filename); - -#ifdef FIXPROTO_IGNORE_LIST - for (i = 0; files_to_ignore[i] != NULL; i++) - { - const char *const ignore_name = files_to_ignore[i]; - int ignore_len = strlen (ignore_name); - if (strncmp (inc_filename, ignore_name, ignore_len) == 0) - { - if (ignore_name[ignore_len-1] == '/' - || inc_filename[ignore_len] == '\0') - { - if (verbose) - fprintf (stderr, "%s: ignoring %s\n", progname, inc_filename); - exit (SUCCESS_EXIT_CODE); - } - } - - } -#endif - - if (strcmp (inc_filename, "sys/stat.h") == 0) - special_file_handling = sys_stat_h; - else if (strcmp (inc_filename, "errno.h") == 0) - special_file_handling = errno_h, required_other++; - else if (strcmp (inc_filename, "stdlib.h") == 0) - special_file_handling = stdlib_h, required_other+=2; - else if (strcmp (inc_filename, "stdio.h") == 0) - special_file_handling = stdio_h; - include_entry = std_include_table; - while (include_entry->name != NULL - && ((strcmp (include_entry->name, CONTINUED) == 0) - || strcmp (inc_filename, include_entry->name) != 0)) - include_entry++; - - if (include_entry->name != NULL) - { - const struct std_include_entry *entry; - cur_symbol_table_size = 0; - for (entry = include_entry; ;) - { - if (entry->flags) - add_symbols (entry->flags, entry->names); - entry++; - if (!entry->name || strcmp (entry->name, CONTINUED) != 0) - break; - } - } - else - symbol_table[0].names = NULL; - - /* Count and mark the prototypes required for this include file. */ - for (cur_symbols = &symbol_table[0]; cur_symbols->names; cur_symbols++) - { - int name_len; - if (cur_symbols->flags & MACRO_SYMBOL) - continue; - cptr = cur_symbols->names; - for ( ; (name_len = strlen (cptr)) != 0; cptr+= name_len + 1) - { - struct fn_decl *fn = lookup_std_proto (cptr, name_len); - required_unseen_count++; - if (fn == NULL) - fprintf (stderr, "Internal error: No prototype for %s\n", cptr); - else - SET_REQUIRED (fn); - } - } - - read_scan_file (argv[2], argc - 4, argv + 4); - - inf_fd = open (argv[2], O_RDONLY, 0666); - if (inf_fd < 0) - { - fprintf (stderr, "%s: Cannot open '%s' for reading -", - progname, argv[2]); - perror (NULL); - exit (FATAL_EXIT_CODE); - } - if (fstat (inf_fd, &sbuf) < 0) - { - fprintf (stderr, "%s: Cannot get size of '%s' -", progname, argv[2]); - perror (NULL); - exit (FATAL_EXIT_CODE); - } - inf_size = sbuf.st_size; - inf_buffer = XNEWVEC (char, inf_size + 2); - inf_ptr = inf_buffer; - - to_read = inf_size; - while (to_read > 0) - { - long i = read (inf_fd, inf_buffer + inf_size - to_read, to_read); - if (i < 0) - { - fprintf (stderr, "%s: Failed to read '%s' -", progname, argv[2]); - perror (NULL); - exit (FATAL_EXIT_CODE); - } - if (i == 0) - { - inf_size -= to_read; - break; - } - to_read -= i; - } - - close (inf_fd); - - /* Inf_size may have changed if read was short (as on VMS) */ - inf_buffer[inf_size] = '\n'; - inf_buffer[inf_size + 1] = '\0'; - inf_limit = inf_buffer + inf_size; - - /* If file doesn't end with '\n', add one. */ - if (inf_limit > inf_buffer && inf_limit[-1] != '\n') - inf_limit++; - - unlink (argv[3]); - outf = fopen (argv[3], "w"); - if (outf == NULL) - { - fprintf (stderr, "%s: Cannot open '%s' for writing -", - progname, argv[3]); - perror (NULL); - exit (FATAL_EXIT_CODE); - } - - lineno = 1; - - if (check_protection (&ifndef_line, &endif_line)) - { - lbrac_line = ifndef_line+1; - rbrac_line = endif_line; - } - else - { - lbrac_line = 1; - rbrac_line = -1; - } - - /* Reset input file. */ - inf_ptr = inf_buffer; - lineno = 1; - - for (;;) - { - if (lineno == lbrac_line) - write_lbrac (); - if (lineno == rbrac_line) - write_rbrac (); - for (;;) - { - struct fn_decl *fn; - c = INF_GET (); - if (c == EOF) - break; - if (ISIDST (c)) - { - c = inf_scan_ident (&buf, c); - (void) INF_UNGET (c); - fputs (buf.base, outf); - fn = lookup_std_proto (buf.base, strlen (buf.base)); - /* We only want to edit the declaration matching the one - seen by scan-decls, as there can be multiple - declarations, selected by #ifdef __STDC__ or whatever. */ - if (fn && fn->partial && fn->partial->line_seen == lineno) - { - c = inf_skip_spaces (' '); - if (c == EOF) - break; - if (c == '(') - { - c = inf_skip_spaces (' '); - if (c == ')') - { - fprintf (outf, " _PARAMS((%s))", fn->params); - } - else - { - putc ('(', outf); - (void) INF_UNGET (c); - } - } - else - fprintf (outf, " %c", c); - } - } - else - { - putc (c, outf); - if (c == '\n') - break; - } - } - if (c == EOF) - break; - lineno++; - } - if (rbrac_line < 0) - write_rbrac (); - - fclose (outf); - - return 0; -} diff --git a/gcc/fixproto b/gcc/fixproto deleted file mode 100755 index 7c42d9c77ed..00000000000 --- a/gcc/fixproto +++ /dev/null @@ -1,340 +0,0 @@ -#!/bin/sh -# -# SYNOPSIS -# fixproto TARGET-DIR SOURCE-DIR-ALL SOURCE-DIR-STD -# -# COPYRIGHT -# Copyright (C) 1993, 1994, 1997, 1998, 2002, 2003, 2007, 2008 -# Free Software Foundation, Inc. -# This file is part of GCC. -# -# GCC is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GCC is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GCC; see the file COPYING3. If not see -# <http://www.gnu.org/licenses/>. -# -# DESCRIPTION -# Adjunct script for GCC to populate a directory with ANSI, -# Posix.1, and C++ compatible header files. -# -# Each file found under SOURCE-DIR-ALL is analyzed and "fixed." -# Only standard ANSI/POSIX files found under SOURCE-DIR-STD -# are analyzed and "fixed." -# The SOURCE-DIRs are searched in order; a file found -# under multiple SOURCE-DIRs is only handled for the first one. -# -# STRATEGY -# Each include file is fed through cpp, and the scan-decls program -# parses it, and emits any found function declarations. -# The fix-header program analyzes the scan-decls output, -# together with the original include file, and writes a "fixed" -# include file, if needed. -# -# The comment at the beginning of fix-header.c lists specifically -# what kind of changes are made. -# -# NOTE -# Some file space will be wasted, because the original header -# files are copied. An earlier version just included the original -# by "reference", using GNU cpp's #include_next mechanism. -# This is currently not done, partly because #include_next is -# fragile (susceptible to version incompatibilities, and depends -# and GCC-specific features), and partly for performance reasons. -# -# AUTHORS -# Ron Guilmette (rfg@netcom.com) (original idea and code) -# Per Bothner (bothner@cygnus.com) (major re-write) - -dirname=`echo "$0" | sed 's,^[^/]*$,.,;s,//*[^/]*$,,'` -progname=`echo "$0" | sed 's,.*/,,'` -original_dir=`${PWDCMD-pwd}` -FIX_HEADER=${FIX_HEADER-$original_dir/fix-header} -DEFINES="-D__STDC__=0 -D__cplusplus ${FIXPROTO_DEFINES}" - -if mkdir -p . 2> /dev/null; then - # Great, mkdir accepts -p - mkinstalldirs="mkdir -p" -else - # We expect mkinstalldirs to be passed in the environment. - # If it is not, assume it is in the directory that contains this script. - mkinstalldirs=${mkinstalldirs-"/bin/sh $dirname/mkinstalldirs"} - if $mkinstalldirs . 2> /dev/null; then - : - else - # But, in case of failure, fallback to plain mkdir, and hope it works - mkinstalldirs=mkdir - fi -fi - -if [ `echo $1 | wc -w` = 0 ] ; then - echo $progname\: usage\: $progname target-dir \[ source-dir \.\.\. \] - exit 1 -fi - -std_files="ctype.h dirent.h errno.h curses.h fcntl.h grp.h locale.h math.h pwd.h setjmp.h signal.h stdio.h stdlib.h string.h sys/socket.h sys/stat.h sys/times.h sys/resource.h sys/utsname.h sys/wait.h tar.h termios.h time.h unistd.h utime.h" - -rel_target_dir=$1 -# All files in $src_dir_all (normally same as $rel_target_dir) are -# processed. -src_dir_all=$2 -# In $src_dir_std (normally same as /usr/include), only the -# "standard" ANSI/POSIX files listed in $std_files are processed. -src_dir_std=$3 - -case $rel_target_dir in - /* | [A-Za-z]:[\\/]*) - abs_target_dir=$rel_target_dir - ;; - *) - abs_target_dir=$original_dir/$rel_target_dir - ;; -esac - -# Determine whether this system has symbolic links. -if ln -s X $rel_target_dir/ShouldNotExist 2>/dev/null; then - rm -f $rel_target_dir/ShouldNotExist - LINKS=true -elif ln -s X /tmp/ShouldNotExist 2>/dev/null; then - rm -f /tmp/ShouldNotExist - LINKS=true -else - LINKS=false -fi - -if [ \! -d $abs_target_dir ] ; then - echo $progname\: creating directory $rel_target_dir - $mkinstalldirs $abs_target_dir -fi - -echo $progname\: populating \`$rel_target_dir\' - -include_path="" - -if [ `echo $* | wc -w` != 0 ] ; then - for rel_source_dir in $src_dir_all $src_dir_std; do - case $rel_source_dir in - /* | [A-Za-z]:[\\/]*) - abs_source_dir=$rel_source_dir - ;; - *) - abs_source_dir=$original_dir/$rel_source_dir - ;; - esac - include_path="$include_path -I$abs_source_dir" - done -fi - -done_dirs="" -subdirs_made="" -echo "" >fixproto.list - -for code in ALL STD ; do - - subdirs="." - - case $code in - ALL) - rel_source_dir=$src_dir_all - - dirs="." - levels=2 - while $LINKS && test -n "$dirs" -a $levels -gt 0 - do - levels=`expr $levels - 1` - newdirs= - for d in $dirs ; do - # Find all directories under $d, relative to $d, excluding $d itself. - # Assume directory names ending in CC or containing ++ are - # for C++, so skip those. - subdirs="$subdirs "`cd $rel_source_dir/$d; find . -type d -print | \ - sed -e '/^\.$/d' -e "s|^\./|${d}/|" -e 's|^\./||' \ - -e '/CC$/d' -e '/[+][+]/d'` - links= - links=`cd $rel_source_dir; find $d/. -type l -print | \ - sed -e "s|$d/./|$d/|" -e 's|^\./||'` - for link in $links --dummy-- ; do - test -d $rel_source_dir/$link/. && newdirs="$newdirs $link" - done - done - dirs="$newdirs" - subdirs="$subdirs $newdirs" - done - ;; - STD) - rel_source_dir=$src_dir_std - ;; - esac - - case $rel_source_dir in - /* | [A-Za-z]:[\\/]*) - abs_source_dir=$rel_source_dir - ;; - *) - abs_source_dir=$original_dir/$rel_source_dir - ;; - esac - - if [ \! -d $abs_source_dir ] ; then - echo $progname\: warning\: no such directory\: \`$rel_source_dir\' - continue - fi - - for rel_source_subdir in $subdirs; do - - abs_target_subdir=${abs_target_dir}/${rel_source_subdir} - if [ \! -d $abs_target_subdir ] ; then - if $mkinstalldirs $abs_target_subdir ; then - subdirs_made="$abs_target_subdir $subdirs_made" - fi - fi - # Append "/"; remove initial "./". Hence "." -> "" and "sys" -> "sys/". - rel_source_prefix=`echo $rel_source_subdir | sed -e 's|$|/|' -e 's|^\./||'` - - case $code in - ALL) - # The 'sed' is in case the *.h matches nothing, which yields "*.h" - # which would then get re-globbed in the current directory. Sigh. - rel_source_files=`cd ${abs_source_dir}/${rel_source_subdir}; echo *.h | sed -e 's|[*].h|NONE|'` - ;; - - STD) - files_to_check="$std_files" - rel_source_files="" - - # Also process files #included by the $std_files. - while [ -n "${files_to_check}" ] - do - new_files_to_check="" - for file in $files_to_check ; do - xxfile=`echo $file | sed -e 's|/\([^/\.][^/\.]*\)/\.\./|/|'` - # Create the dir where this file will go when fixed. - xxdir=`echo ./$file | sed -e 's|/[^/]*$||'` - if [ \! -d $abs_target_subdir/$xxdir ] ; then - if $mkinstalldirs $abs_target_subdir/$xxdir ; then - subdirs_made="$abs_target_subdir/$xxdir $subdirs_made" - fi - fi - # Just in case we have edited out a symbolic link - if [ -f $src_dir_std/$file -a -f $src_dir_std/$xxfile ] ; then - file=$xxfile - fi - case " $rel_source_files " in - *" ${file} "*) - # Already seen $file; nothing to do - ;; - *) - if test -f $src_dir_std/$file ; then - rel_dir=`echo $file | sed -n -e 's|^\(.*/\)[^/]*$|\1|p'` - # For #include "foo.h", that might be either "foo.h" - # or "${rel_dir}foo.h (or something bogus). - new_files_to_check="$new_files_to_check "`sed -n \ - -e 's@ @ @g' \ - -e 's@^ *# *include *<\([^>]*\)>.*$@\1@p' -e \ - 's@^ *# *include *\"\([^\"]*\)\".*$@\1 '$rel_dir'\1@p'\ - <$src_dir_std/$file` - rel_source_files="$rel_source_files $file" - fi - ;; - esac - done - files_to_check="$new_files_to_check" - done - rel_source_files="$rel_source_files" - ;; - esac - - for filename in $rel_source_files ; do - rel_source_file=${rel_source_prefix}${filename} - abs_source_file=$abs_source_dir/$rel_source_file - abs_target_file=$abs_target_dir/$rel_source_file - - if test "$filename" = 'NONE' ; then - echo "(No *.h files in $abs_source_dir/$rel_source_subdir)" - # If target file exists, check if was written while processing one - # of the earlier source directories; if so ignore it. - elif test -f $abs_target_file -a -n "$done_dirs" \ - && grep "$rel_source_file" fixproto.list >/dev/null - then true - else - $FIX_HEADER $rel_source_file $abs_source_file $abs_target_file ${DEFINES} $include_path - if test $? != 0 ; then exit 1 ; fi - echo "${rel_source_file}" >>fixproto.list - fi - done - done - done_dirs="$done_dir $rel_source_dir" -done - -# This might be more cleanly moved into the main loop, by adding -# a <dummy> source directory at the end. FIXME! - -# All the headers we create define size_t and NULL. -for rel_source_file in unistd.h stdlib.h string.h time.h ; do - if grep "$rel_source_file" fixproto.list >/dev/null ; then - : # It exists, we don't need to make it - else - echo Adding missing $rel_source_file - rel_source_ident=`echo $rel_source_file | tr ./ __` - cat >tmp.h <<EOF -/* Fake ${rel_source_file}, created by GCC. - The functions declared in this file do not necessarily exist in - your C library. */ -#ifndef __${rel_source_ident} -#define __${rel_source_ident} - -#define __need_NULL -#define __need_size_t -#include <stddef.h> -EOF - # Insert special stuff for particular files here. - case ${rel_source_file} in - time.h) - # If time.h doesn't exist, find out if sys/time.h does. - if test -f $src_dir_std/sys/time.h \ - || grep "sys/time.h" fixproto.list >/dev/null ; then - # It does; include it and hope it has the needed declarations. - # Some versions require sys/types.h. - cat >>tmp.h <<EOF - -#include <sys/types.h> -#include <sys/time.h> -EOF - else - # It doesn't. Make up plausible definitions for time_t, clock_t. - # Forward-declare struct tm. Hope nobody tries to use it. (Odds - # are they won't.) - cat >>tmp.h <<EOF - -typedef long time_t; -typedef long clock_t; -struct tm; -EOF - fi ;; - esac - cat >>tmp.h <<EOF - -#endif /* __${rel_source_ident} */ -EOF - ${FIX_HEADER} $rel_source_file tmp.h $abs_target_dir/$rel_source_file ${DEFINES} $include_path - if test $? != 0 ; then exit 1 ; fi - if test -f $abs_target_dir/$rel_source_file ; then - rm tmp.h - else - mv tmp.h $abs_target_dir/$rel_source_file - fi - fi -done - -# Remove any directories that we made that are still empty. -rmdir $subdirs_made 2>/dev/null - -exit 0 diff --git a/gcc/flags.h b/gcc/flags.h index 6bc5dd7b0cc..e406bf17914 100644 --- a/gcc/flags.h +++ b/gcc/flags.h @@ -1,6 +1,6 @@ /* Compilation switch flag definitions for GCC. Copyright (C) 1987, 1988, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, - 2003, 2004, 2005, 2006, 2007, 2008 + 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of GCC. @@ -310,13 +310,6 @@ extern enum stack_check_type flag_stack_check; instrumentation. */ extern bool flag_instrument_functions_exclude_p (tree fndecl); -/* Emit warning if the function call is disallowed under - -Wdisallowed-function-list=... */ -extern void warn_if_disallowed_function_p (const_tree fncall); - -/* True, if the -Wdisallowed-function-list=... option has been specified. */ -extern bool warn_disallowed_functions; - /* True if the given mode has a NaN representation and the treatment of NaN operands is important. Certain optimizations, such as folding x * 0 into 0, are not correct for NaN operands, and are normally diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 4ca91a22d98..a68b7b8637d 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -103,8 +103,6 @@ static tree associate_trees (tree, tree, enum tree_code, tree); static tree const_binop (enum tree_code, tree, tree, int); static enum comparison_code comparison_to_compcode (enum tree_code); static enum tree_code compcode_to_comparison (enum comparison_code); -static tree combine_comparisons (enum tree_code, enum tree_code, - enum tree_code, tree, tree, tree); static int operand_equal_for_comparison_p (tree, tree, tree); static int twoval_comparison_p (tree, tree *, tree *, int *); static tree eval_subst (tree, tree, tree, tree, tree); @@ -9553,10 +9551,15 @@ fold_mult_zconjz (tree type, tree expr) 0 <= N < M as is common. In general, the precise value of P is unknown. M is chosen as large as possible such that constant N can be determined. - Returns M and sets *RESIDUE to N. */ + Returns M and sets *RESIDUE to N. + + If ALLOW_FUNC_ALIGN is true, do take functions' DECL_ALIGN_UNIT into + account. This is not always possible due to PR 35705. + */ static unsigned HOST_WIDE_INT -get_pointer_modulus_and_residue (tree expr, unsigned HOST_WIDE_INT *residue) +get_pointer_modulus_and_residue (tree expr, unsigned HOST_WIDE_INT *residue, + bool allow_func_align) { enum tree_code code; @@ -9586,7 +9589,8 @@ get_pointer_modulus_and_residue (tree expr, unsigned HOST_WIDE_INT *residue) } } - if (DECL_P (expr) && TREE_CODE (expr) != FUNCTION_DECL) + if (DECL_P (expr) + && (allow_func_align || TREE_CODE (expr) != FUNCTION_DECL)) return DECL_ALIGN_UNIT (expr); } else if (code == POINTER_PLUS_EXPR) @@ -9597,7 +9601,8 @@ get_pointer_modulus_and_residue (tree expr, unsigned HOST_WIDE_INT *residue) op0 = TREE_OPERAND (expr, 0); STRIP_NOPS (op0); - modulus = get_pointer_modulus_and_residue (op0, residue); + modulus = get_pointer_modulus_and_residue (op0, residue, + allow_func_align); op1 = TREE_OPERAND (expr, 1); STRIP_NOPS (op1); @@ -11237,7 +11242,8 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1) unsigned HOST_WIDE_INT modulus, residue; unsigned HOST_WIDE_INT low = TREE_INT_CST_LOW (arg1); - modulus = get_pointer_modulus_and_residue (arg0, &residue); + modulus = get_pointer_modulus_and_residue (arg0, &residue, + integer_onep (arg1)); /* This works because modulus is a power of 2. If this weren't the case, we'd have to replace it by its greatest power-of-2 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 09084fba1c1..d063295a244 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,47 @@ +2009-03-28 Tobias Burnus <burnus@net-b.de> + + PR fortran/34656 + * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do): + Add GFC_RTCHECK_DO support. + * option.c (gfc_handle_runtime_check_option): Enable GFC_RTCHECK_DO. + * invoke.texi (-fcheck): Document "do" option. + +2009-03-28 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/38538 + * trans-array.c (get_elemental_fcn_charlen): Remove. + (get_array_charlen): New function to replace previous. + +2009-03-28 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/38765 + * parse.c (parse_derived): Do not break on finding pointer, + allocatable or private components. + +2009-03-28 Tobias Burnus <burnus@net-b.de> + + PR fortran/32626 + * option.c (gfc_handle_runtime_check_option): Enable recursion check. + * trans-decl.c (gfc_generate_function_code): Add recursion check. + * invoke.texi (-fcheck): Add recursive option. + +2009-03-28 Tobias Burnus <burnus@net-b.de> + + PR fortran/38432 + * resolve.c (gfc_resolve_iterator): Add zero-loop warning. + +2009-03-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> + Paul Thomas <pault@gcc.gnu.org> + Tobias Burnus <burnus@net-b.de> + + * gfortran.h (gfc_option_t): Add rtcheck. + * lang.opt: New option -fcheck. + * libgfortran.h: Add GFC_RTCHECK_* constants. + * invoke.texi: Document -fcheck. + * options.c (gfc_handle_runtime_check_option): New function. + (gfc_init_options,gfc_post_options,gfc_handle_option): + Add -fcheck option. + 2009-03-27 Richard Guenther <rguenther@suse.de> * trans-array.c (gfc_conv_descriptor_data_addr): Use diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index a5b4fc6f0be..25e8e063449 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -2008,7 +2008,6 @@ typedef struct int flag_automatic; int flag_backslash; int flag_backtrace; - int flag_check_array_temporaries; int flag_allow_leading_underscore; int flag_dump_core; int flag_external_blas; @@ -2029,6 +2028,7 @@ typedef struct int flag_align_commons; int fpe; + int rtcheck; int warn_std; int allow_std; diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi index 8138464a4f4..a263a150c82 100644 --- a/gcc/fortran/invoke.texi +++ b/gcc/fortran/invoke.texi @@ -1,11 +1,11 @@ -@c Copyright (C) 2004, 2005, 2006, 2007, 2008 +@c Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 @c Free Software Foundation, Inc. @c This is part of the GNU Fortran manual. @c For copying conditions, see the file gfortran.texi. @ignore @c man begin COPYRIGHT -Copyright @copyright{} 2004, 2005, 2006, 2007, 2008 +Copyright @copyright{} 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document @@ -166,6 +166,7 @@ and warnings}. @gccoptlist{-fno-automatic -ff2c -fno-underscoring @gol -fsecond-underscore @gol -fbounds-check -fcheck-array-temporaries -fmax-array-constructor =@var{n} @gol +-fcheck=@var{<all|bounds|array-temps>} -fmax-stack-var-size=@var{n} @gol -fpack-derived -frepack-arrays -fshort-enums -fexternal-blas @gol -fblas-matmul-limit=@var{n} -frecursive -finit-local-zero @gol @@ -1182,13 +1183,31 @@ is implemented as a reference to the link-time external symbol for compatibility with @command{g77} and @command{f2c}, and is implied by use of the @option{-ff2c} option. -@item -fbounds-check -@opindex @code{fbounds-check} +@item -fcheck=@var{<keyword>} +@opindex @code{fcheck} @cindex array, bounds checking @cindex bounds checking @cindex range checking @cindex subscript checking @cindex checking subscripts +@cindex run-time checking +@cindex checking array temporaries + +Enable the generation of run-time checks; the argument shall be +a comma-delimited list of the following keywords. + +@table @asis +@item @samp{all} +Enable all run-time test of @option{-fcheck}. + +@item @samp{array-temps} +Warns at run time when for passing an actual argument a temporary array +had to be generated. The information generated by this warning is +sometimes useful in optimization, in order to avoid such temporaries. + +Note: The warning is only printed once per location. + +@item @samp{bounds} Enable generation of run-time checks for array subscripts and against the declared minimum and maximum values. It also checks array indices for assumed and deferred @@ -1196,22 +1215,30 @@ shape arrays against the actual allocated bounds and ensures that all string lengths are equal for character array constructors without an explicit typespec. -Some checks require that @option{-fbounds-check} is set for +Some checks require that @option{-fcheck=bounds} is set for the compilation of the main program. Note: In the future this may also include other forms of checking, e.g., checking substring references. +@item @samp{do} +Enable generation of run-time checks for invalid modification of loop +iteration variables. -@item fcheck-array-temporaries -@opindex @code{fcheck-array-temporaries} -@cindex checking array temporaries -Warns at run time when for passing an actual argument a temporary array -had to be generated. The information generated by this warning is -sometimes useful in optimization, in order to avoid such temporaries. +@item @samp{recursion} +Enable generation of run-time checks for recursively called subroutines and +functions which are not marked as recursive. See also @option{-frecursive}. +@end table -Note: The warning is only printed once per location. +@item -fbounds-check +@opindex @code{fbounds-check} +@c Note: This option is also referred in gcc's manpage +Deprecated alias for @option{-fcheck=bounds}. + +@item -fcheck-array-temporaries +@opindex @code{fcheck-array-temporaries} +Deprecated alias for @option{-fcheck=array-temps}. @item -fmax-array-constructor=@var{n} @opindex @code{fmax-array-constructor} diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt index 64fd486e7a2..193604a2fe3 100644 --- a/gcc/fortran/lang.opt +++ b/gcc/fortran/lang.opt @@ -246,7 +246,7 @@ Fortran RejectNegative Joined UInteger ffpe-trap= Fortran RejectNegative JoinedOrMissing --ffpe-trap=[..] Stop on following floating point exceptions +-ffpe-trap=[...] Stop on following floating point exceptions ffree-form Fortran RejectNegative @@ -340,6 +340,10 @@ frepack-arrays Fortran Copy array sections into a contiguous block on procedure entry +fcheck= +Fortran RejectNegative JoinedOrMissing +-fcheck=[...] Specify which runtime checks are to be performed + fsecond-underscore Fortran Append a second underscore if the name already contains an underscore diff --git a/gcc/fortran/libgfortran.h b/gcc/fortran/libgfortran.h index 74bb9a92fcf..d7e254f3635 100644 --- a/gcc/fortran/libgfortran.h +++ b/gcc/fortran/libgfortran.h @@ -1,5 +1,5 @@ /* Header file to the Fortran front-end and runtime library - Copyright (C) 2007, 2008 Free Software Foundation, Inc. + Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of GCC. @@ -40,6 +40,15 @@ along with GCC; see the file COPYING3. If not see #define GFC_FPE_PRECISION (1<<5) +/* Bitmasks for the various runtime checks that can be enabled. */ +#define GFC_RTCHECK_BOUNDS (1<<0) +#define GFC_RTCHECK_ARRAY_TEMPS (1<<1) +#define GFC_RTCHECK_RECURSION (1<<2) +#define GFC_RTCHECK_DO (1<<3) +#define GFC_RTCHECK_ALL (GFC_RTCHECK_BOUNDS | GFC_RTCHECK_ARRAY_TEMPS \ + | GFC_RTCHECK_RECURSION | GFC_RTCHECK_DO) + + /* Possible values for the CONVERT I/O specifier. */ typedef enum { diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index d48bf24cdad..587fb36ce28 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -1,5 +1,5 @@ /* Parse and display command line options. - Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by Andy Vaught @@ -106,7 +106,6 @@ gfc_init_options (unsigned int argc, const char **argv) gfc_option.flag_backslash = 0; gfc_option.flag_module_private = 0; gfc_option.flag_backtrace = 0; - gfc_option.flag_check_array_temporaries = 0; gfc_option.flag_allow_leading_underscore = 0; gfc_option.flag_dump_core = 0; gfc_option.flag_external_blas = 0; @@ -125,6 +124,7 @@ gfc_init_options (unsigned int argc, const char **argv) gfc_option.flag_align_commons = 1; gfc_option.fpe = 0; + gfc_option.rtcheck = 0; /* Argument pointers cannot point to anything but their argument. */ flag_argument_noalias = 3; @@ -232,6 +232,10 @@ gfc_post_options (const char **pfilename) if (flag_whole_program) gfc_fatal_error ("Option -fwhole-program is not supported for Fortran"); + /* -fbounds-check is equivalent to -fcheck=bounds */ + if (flag_bounds_check) + gfc_option.rtcheck |= GFC_RTCHECK_BOUNDS; + /* Verify the input file name. */ if (!filename || strcmp (filename, "-") == 0) { @@ -449,6 +453,43 @@ gfc_handle_fpe_trap_option (const char *arg) } +static void +gfc_handle_runtime_check_option (const char *arg) +{ + int result, pos = 0, n; + static const char * const optname[] = { "all", "bounds", "array-temps", + "recursion", "do", NULL }; + static const int optmask[] = { GFC_RTCHECK_ALL, GFC_RTCHECK_BOUNDS, + GFC_RTCHECK_ARRAY_TEMPS, + GFC_RTCHECK_RECURSION, GFC_RTCHECK_DO, + 0 }; + + while (*arg) + { + while (*arg == ',') + arg++; + + while (arg[pos] && arg[pos] != ',') + pos++; + + result = 0; + for (n = 0; optname[n] != NULL; n++) + { + if (optname[n] && strncmp (optname[n], arg, pos) == 0) + { + gfc_option.rtcheck |= optmask[n]; + arg += pos; + pos = 0; + result = 1; + break; + } + } + if (!result) + gfc_fatal_error ("Argument to -fcheck is not valid: %s", arg); + } +} + + /* Handle command-line options. Returns 0 if unrecognized, 1 if recognized and handled. */ @@ -548,7 +589,7 @@ gfc_handle_option (size_t scode, const char *arg, int value) break; case OPT_fcheck_array_temporaries: - gfc_option.flag_check_array_temporaries = value; + gfc_option.rtcheck |= GFC_RTCHECK_ARRAY_TEMPS; break; case OPT_fdump_core: @@ -845,6 +886,11 @@ gfc_handle_option (size_t scode, const char *arg, int value) case OPT_falign_commons: gfc_option.flag_align_commons = value; break; + + case OPT_fcheck_: + gfc_handle_runtime_check_option (arg); + break; + } return result; diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index 3e86a43d0b1..1bf13e2de8f 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -1,5 +1,6 @@ /* Main parser. - Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, + 2009 Free Software Foundation, Inc. Contributed by Andy Vaught @@ -1978,27 +1979,18 @@ endType: /* Look for allocatable components. */ if (c->attr.allocatable || (c->ts.type == BT_DERIVED && c->ts.derived->attr.alloc_comp)) - { - sym->attr.alloc_comp = 1; - break; - } + sym->attr.alloc_comp = 1; /* Look for pointer components. */ if (c->attr.pointer || (c->ts.type == BT_DERIVED && c->ts.derived->attr.pointer_comp)) - { - sym->attr.pointer_comp = 1; - break; - } + sym->attr.pointer_comp = 1; /* Look for private components. */ if (sym->component_access == ACCESS_PRIVATE || c->attr.access == ACCESS_PRIVATE || (c->ts.type == BT_DERIVED && c->ts.derived->attr.private_comp)) - { - sym->attr.private_comp = 1; - break; - } + sym->attr.private_comp = 1; } if (!seen_component) diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index e887fb13a6f..1d6ee852426 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -4918,6 +4918,26 @@ gfc_resolve_iterator (gfc_iterator *iter, bool real_ok) || iter->step->ts.type != iter->var->ts.type) gfc_convert_type (iter->step, &iter->var->ts, 2); + if (iter->start->expr_type == EXPR_CONSTANT + && iter->end->expr_type == EXPR_CONSTANT + && iter->step->expr_type == EXPR_CONSTANT) + { + int sgn, cmp; + if (iter->start->ts.type == BT_INTEGER) + { + sgn = mpz_cmp_ui (iter->step->value.integer, 0); + cmp = mpz_cmp (iter->end->value.integer, iter->start->value.integer); + } + else + { + sgn = mpfr_sgn (iter->step->value.real); + cmp = mpfr_cmp (iter->end->value.real, iter->start->value.real); + } + if ((sgn > 0 && cmp < 0) || (sgn < 0 && cmp > 0)) + gfc_warning ("DO loop at %L will be executed zero times", + &iter->step->where); + } + return SUCCESS; } diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 6f750e63d84..e7b52325495 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -1,5 +1,5 @@ /* Array translation routines - Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 + Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by Paul Brook <paul@nowt.org> and Steven Bosscher <s.bosscher@student.tudelft.nl> @@ -1058,7 +1058,7 @@ gfc_trans_array_ctor_element (stmtblock_t * pblock, tree desc, gfc_trans_string_copy (&se->pre, esize, tmp, expr->ts.kind, se->string_length, se->expr, expr->ts.kind); } - if (flag_bounds_check && !typespec_chararray_ctor) + if ((gfc_option.rtcheck & GFC_RTCHECK_BOUNDS) && !typespec_chararray_ctor) { if (first_len) { @@ -1761,8 +1761,8 @@ gfc_trans_array_constructor (gfc_loopinfo * loop, gfc_ss * ss, locus * where) typespec_chararray_ctor = (ss->expr->ts.cl && ss->expr->ts.cl->length_from_typespec); - if (flag_bounds_check && ss->expr->ts.type == BT_CHARACTER - && !typespec_chararray_ctor) + if ((gfc_option.rtcheck & GFC_RTCHECK_BOUNDS) + && ss->expr->ts.type == BT_CHARACTER && !typespec_chararray_ctor) { first_len_val = gfc_create_var (gfc_charlen_type_node, "len"); first_len = true; @@ -1880,7 +1880,7 @@ gfc_trans_array_constructor (gfc_loopinfo * loop, gfc_ss * ss, locus * where) gcc_assert (INTEGER_CST_P (offset)); #if 0 /* Disable bound checking for now because it's probably broken. */ - if (flag_bounds_check) + if (gfc_option.rtcheck & GFC_RTCHECK_BOUNDS) { gcc_unreachable (); } @@ -2233,7 +2233,7 @@ gfc_trans_array_bound_check (gfc_se * se, tree descriptor, tree index, int n, char *msg; const char * name = NULL; - if (!flag_bounds_check) + if (!(gfc_option.rtcheck & GFC_RTCHECK_BOUNDS)) return index; index = gfc_evaluate_now (index, &se->pre); @@ -2469,7 +2469,7 @@ gfc_conv_array_ref (gfc_se * se, gfc_array_ref * ar, gfc_symbol * sym, gfc_conv_expr_type (&indexse, ar->start[n], gfc_array_index_type); gfc_add_block_to_block (&se->pre, &indexse.pre); - if (flag_bounds_check) + if (gfc_option.rtcheck & GFC_RTCHECK_BOUNDS) { /* Check array bounds. */ tree cond; @@ -3015,7 +3015,7 @@ gfc_conv_ss_startstride (gfc_loopinfo * loop) } /* The rest is just runtime bound checking. */ - if (flag_bounds_check) + if (gfc_option.rtcheck & GFC_RTCHECK_BOUNDS) { stmtblock_t block; tree lbound, ubound; @@ -4332,7 +4332,8 @@ gfc_trans_dummy_array_bias (gfc_symbol * sym, tree tmpdesc, tree body) && TREE_CODE (sym->ts.cl->backend_decl) == VAR_DECL) gfc_conv_string_length (sym->ts.cl, NULL, &block); - checkparm = (sym->as->type == AS_EXPLICIT && flag_bounds_check); + checkparm = (sym->as->type == AS_EXPLICIT + && (gfc_option.rtcheck & GFC_RTCHECK_BOUNDS)); no_repack = !(GFC_DECL_PACKED_ARRAY (tmpdesc) || GFC_DECL_PARTIAL_PACKED_ARRAY (tmpdesc)); @@ -4702,47 +4703,102 @@ gfc_get_dataptr_offset (stmtblock_t *block, tree parm, tree desc, tree offset, } -/* gfc_conv_expr_descriptor needs the character length of elemental - functions before the function is called so that the size of the - temporary can be obtained. The only way to do this is to convert - the expression, mapping onto the actual arguments. */ +/* gfc_conv_expr_descriptor needs the string length an expression + so that the size of the temporary can be obtained. This is done + by adding up the string lengths of all the elements in the + expression. Function with non-constant expressions have their + string lengths mapped onto the actual arguments using the + interface mapping machinery in trans-expr.c. */ static void -get_elemental_fcn_charlen (gfc_expr *expr, gfc_se *se) +get_array_charlen (gfc_expr *expr, gfc_se *se) { gfc_interface_mapping mapping; gfc_formal_arglist *formal; gfc_actual_arglist *arg; gfc_se tse; - formal = expr->symtree->n.sym->formal; - arg = expr->value.function.actual; - gfc_init_interface_mapping (&mapping); - - /* Set se = NULL in the calls to the interface mapping, to suppress any - backend stuff. */ - for (; arg != NULL; arg = arg->next, formal = formal ? formal->next : NULL) + if (expr->ts.cl->length + && gfc_is_constant_expr (expr->ts.cl->length)) { - if (!arg->expr) - continue; - if (formal->sym) - gfc_add_interface_mapping (&mapping, formal->sym, NULL, arg->expr); + if (!expr->ts.cl->backend_decl) + gfc_conv_string_length (expr->ts.cl, expr, &se->pre); + return; } - gfc_init_se (&tse, NULL); + switch (expr->expr_type) + { + case EXPR_OP: + get_array_charlen (expr->value.op.op1, se); + + /* For parentheses the expression ts.cl is identical. */ + if (expr->value.op.op == INTRINSIC_PARENTHESES) + return; + + expr->ts.cl->backend_decl = + gfc_create_var (gfc_charlen_type_node, "sln"); + + if (expr->value.op.op2) + { + get_array_charlen (expr->value.op.op2, se); + + /* Add the string lengths and assign them to the expression + string length backend declaration. */ + gfc_add_modify (&se->pre, expr->ts.cl->backend_decl, + fold_build2 (PLUS_EXPR, gfc_charlen_type_node, + expr->value.op.op1->ts.cl->backend_decl, + expr->value.op.op2->ts.cl->backend_decl)); + } + else + gfc_add_modify (&se->pre, expr->ts.cl->backend_decl, + expr->value.op.op1->ts.cl->backend_decl); + break; + + case EXPR_FUNCTION: + if (expr->value.function.esym == NULL + || expr->ts.cl->length->expr_type == EXPR_CONSTANT) + { + gfc_conv_string_length (expr->ts.cl, expr, &se->pre); + break; + } + + /* Map expressions involving the dummy arguments onto the actual + argument expressions. */ + gfc_init_interface_mapping (&mapping); + formal = expr->symtree->n.sym->formal; + arg = expr->value.function.actual; + + /* Set se = NULL in the calls to the interface mapping, to suppress any + backend stuff. */ + for (; arg != NULL; arg = arg->next, formal = formal ? formal->next : NULL) + { + if (!arg->expr) + continue; + if (formal->sym) + gfc_add_interface_mapping (&mapping, formal->sym, NULL, arg->expr); + } - /* Build the expression for the character length and convert it. */ - gfc_apply_interface_mapping (&mapping, &tse, expr->ts.cl->length); + gfc_init_se (&tse, NULL); - gfc_add_block_to_block (&se->pre, &tse.pre); - gfc_add_block_to_block (&se->post, &tse.post); - tse.expr = fold_convert (gfc_charlen_type_node, tse.expr); - tse.expr = fold_build2 (MAX_EXPR, gfc_charlen_type_node, tse.expr, - build_int_cst (gfc_charlen_type_node, 0)); - expr->ts.cl->backend_decl = tse.expr; - gfc_free_interface_mapping (&mapping); + /* Build the expression for the character length and convert it. */ + gfc_apply_interface_mapping (&mapping, &tse, expr->ts.cl->length); + + gfc_add_block_to_block (&se->pre, &tse.pre); + gfc_add_block_to_block (&se->post, &tse.post); + tse.expr = fold_convert (gfc_charlen_type_node, tse.expr); + tse.expr = fold_build2 (MAX_EXPR, gfc_charlen_type_node, tse.expr, + build_int_cst (gfc_charlen_type_node, 0)); + expr->ts.cl->backend_decl = tse.expr; + gfc_free_interface_mapping (&mapping); + break; + + default: + gfc_conv_string_length (expr->ts.cl, expr, &se->pre); + break; + } } + /* Convert an array for passing as an actual argument. Expressions and vector subscripts are evaluated and stored in a temporary, which is then passed. For whole arrays the descriptor is passed. For array sections @@ -4878,7 +4934,7 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss) need_tmp = 1; if (expr->ts.type == BT_CHARACTER && expr->ts.cl->length->expr_type != EXPR_CONSTANT) - get_elemental_fcn_charlen (expr, se); + get_array_charlen (expr, se); info = NULL; } @@ -4938,8 +4994,9 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss) loop.temp_ss->type = GFC_SS_TEMP; loop.temp_ss->next = gfc_ss_terminator; - if (expr->ts.type == BT_CHARACTER && !expr->ts.cl->backend_decl) - gfc_conv_string_length (expr->ts.cl, expr, &se->pre); + if (expr->ts.type == BT_CHARACTER + && !expr->ts.cl->backend_decl) + get_array_charlen (expr, se); loop.temp_ss->data.temp.type = gfc_typenode_for_spec (&expr->ts); @@ -5329,7 +5386,7 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * expr, gfc_ss * ss, int g77, se->expr = ptr; - if (gfc_option.flag_check_array_temporaries) + if (gfc_option.rtcheck & GFC_RTCHECK_ARRAY_TEMPS) { char * msg; diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 38381f0631b..6cfc86a4bb7 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -3679,6 +3679,7 @@ gfc_generate_function_code (gfc_namespace * ns) stmtblock_t block; stmtblock_t body; tree result; + tree recurcheckvar = NULL; gfc_symbol *sym; int rank; @@ -3777,7 +3778,8 @@ gfc_generate_function_code (gfc_namespace * ns) array = tree_cons (NULL_TREE, build_int_cst (integer_type_node, - flag_bounds_check), array); + (gfc_option.rtcheck + & GFC_RTCHECK_BOUNDS)), array); array = tree_cons (NULL_TREE, build_int_cst (integer_type_node, @@ -3845,6 +3847,22 @@ gfc_generate_function_code (gfc_namespace * ns) gfc_add_expr_to_block (&body, tmp); } + if ((gfc_option.rtcheck & GFC_RTCHECK_RECURSION) && !sym->attr.recursive) + { + char * msg; + + asprintf (&msg, "Recursive call to nonrecursive procedure '%s'", + sym->name); + recurcheckvar = gfc_create_var (boolean_type_node, "is_recursive"); + TREE_STATIC (recurcheckvar) = 1; + DECL_INITIAL (recurcheckvar) = boolean_false_node; + gfc_add_expr_to_block (&block, recurcheckvar); + gfc_trans_runtime_check (true, false, recurcheckvar, &block, + &sym->declared_at, msg); + gfc_add_modify (&block, recurcheckvar, boolean_true_node); + gfc_free (msg); + } + if (TREE_TYPE (DECL_RESULT (fndecl)) != void_type_node && sym->attr.subroutine) { @@ -3923,6 +3941,9 @@ gfc_generate_function_code (gfc_namespace * ns) else gfc_add_expr_to_block (&block, tmp); + /* Reset recursion-check variable. */ + if ((gfc_option.rtcheck & GFC_RTCHECK_RECURSION) && !sym->attr.recursive) + gfc_add_modify (&block, recurcheckvar, boolean_false_node); /* Add all the decls we created during processing. */ decl = saved_function_decls; diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 89fcadf547c..91485d1d09c 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -398,7 +398,7 @@ gfc_conv_substring (gfc_se * se, gfc_ref * ref, int kind, if (!CONSTANT_CLASS_P (end.expr) && !DECL_P (end.expr)) end.expr = gfc_evaluate_now (end.expr, &se->pre); - if (flag_bounds_check) + if (gfc_option.rtcheck & GFC_RTCHECK_BOUNDS) { tree nonempty = fold_build2 (LE_EXPR, boolean_type_node, start.expr, end.expr); @@ -2988,7 +2988,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym, { if (sym->attr.dimension) { - if (flag_bounds_check) + if (gfc_option.rtcheck & GFC_RTCHECK_BOUNDS) { /* Check the data pointer hasn't been modified. This would happen in a function returning a pointer. */ diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c index beb03d9bb73..c2525bfa68d 100644 --- a/gcc/fortran/trans-intrinsic.c +++ b/gcc/fortran/trans-intrinsic.c @@ -759,7 +759,7 @@ gfc_trans_same_strlen_check (const char* intr_name, locus* where, tree name; /* If bounds-checking is disabled, do nothing. */ - if (!flag_bounds_check) + if (!(gfc_option.rtcheck & GFC_RTCHECK_BOUNDS)) return; /* Compare the two string lengths. */ @@ -885,7 +885,7 @@ gfc_conv_intrinsic_bound (gfc_se * se, gfc_expr * expr, int upper) } else { - if (flag_bounds_check) + if (gfc_option.rtcheck & GFC_RTCHECK_BOUNDS) { bound = gfc_evaluate_now (bound, &se->pre); cond = fold_build2 (LT_EXPR, boolean_type_node, diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index 75eeb333d62..0e51bdacc43 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -761,6 +761,7 @@ gfc_trans_simple_do (gfc_code * code, stmtblock_t *pblock, tree dovar, tree type; tree cond; tree tmp; + tree saved_dovar = NULL; tree cycle_label; tree exit_label; @@ -768,6 +769,13 @@ gfc_trans_simple_do (gfc_code * code, stmtblock_t *pblock, tree dovar, /* Initialize the DO variable: dovar = from. */ gfc_add_modify (pblock, dovar, from); + + /* Save value for do-tinkering checking. */ + if (gfc_option.rtcheck & GFC_RTCHECK_DO) + { + saved_dovar = gfc_create_var (type, ".saved_dovar"); + gfc_add_modify (pblock, saved_dovar, dovar); + } /* Cycle and exit statements are implemented with gotos. */ cycle_label = gfc_build_label_decl (NULL_TREE); @@ -790,6 +798,14 @@ gfc_trans_simple_do (gfc_code * code, stmtblock_t *pblock, tree dovar, gfc_add_expr_to_block (&body, tmp); } + /* Check whether someone has modified the loop variable. */ + if (gfc_option.rtcheck & GFC_RTCHECK_DO) + { + tmp = fold_build2 (NE_EXPR, boolean_type_node, dovar, saved_dovar); + gfc_trans_runtime_check (true, false, tmp, &body, &code->loc, + "Loop variable has been modified"); + } + /* Evaluate the loop condition. */ cond = fold_build2 (EQ_EXPR, boolean_type_node, dovar, to); cond = gfc_evaluate_now (cond, &body); @@ -798,6 +814,9 @@ gfc_trans_simple_do (gfc_code * code, stmtblock_t *pblock, tree dovar, tmp = fold_build2 (PLUS_EXPR, type, dovar, step); gfc_add_modify (&body, dovar, tmp); + if (gfc_option.rtcheck & GFC_RTCHECK_DO) + gfc_add_modify (&body, saved_dovar, dovar); + /* The loop exit. */ tmp = build1_v (GOTO_EXPR, exit_label); TREE_USED (exit_label) = 1; @@ -864,6 +883,7 @@ gfc_trans_do (gfc_code * code) { gfc_se se; tree dovar; + tree saved_dovar = NULL; tree from; tree to; tree step; @@ -902,6 +922,14 @@ gfc_trans_do (gfc_code * code) gfc_add_block_to_block (&block, &se.pre); step = gfc_evaluate_now (se.expr, &block); + if (gfc_option.rtcheck & GFC_RTCHECK_DO) + { + tmp = fold_build2 (EQ_EXPR, boolean_type_node, step, + fold_convert (type, integer_zero_node)); + gfc_trans_runtime_check (true, false, tmp, &block, &code->loc, + "DO step value is zero"); + } + /* Special case simple loops. */ if (TREE_CODE (type) == INTEGER_TYPE && (integer_onep (step) @@ -925,6 +953,13 @@ gfc_trans_do (gfc_code * code) /* Initialize the DO variable: dovar = from. */ gfc_add_modify (&block, dovar, from); + /* Save value for do-tinkering checking. */ + if (gfc_option.rtcheck & GFC_RTCHECK_DO) + { + saved_dovar = gfc_create_var (type, ".saved_dovar"); + gfc_add_modify (&block, saved_dovar, dovar); + } + /* Initialize loop count and jump to exit label if the loop is empty. This code is executed before we enter the loop body. We generate: if (step > 0) @@ -1011,10 +1046,21 @@ gfc_trans_do (gfc_code * code) gfc_add_expr_to_block (&body, tmp); } + /* Check whether someone has modified the loop variable. */ + if (gfc_option.rtcheck & GFC_RTCHECK_DO) + { + tmp = fold_build2 (NE_EXPR, boolean_type_node, dovar, saved_dovar); + gfc_trans_runtime_check (true, false, tmp, &body, &code->loc, + "Loop variable has been modified"); + } + /* Increment the loop variable. */ tmp = fold_build2 (PLUS_EXPR, type, dovar, step); gfc_add_modify (&body, dovar, tmp); + if (gfc_option.rtcheck & GFC_RTCHECK_DO) + gfc_add_modify (&body, saved_dovar, dovar); + /* End with the loop condition. Loop until countm1 == 0. */ cond = fold_build2 (EQ_EXPR, boolean_type_node, countm1, build_int_cst (utype, 0)); @@ -2258,10 +2304,10 @@ compute_inner_temp_size (gfc_expr *expr1, gfc_expr *expr2, loop.array_parameter = 1; /* Calculate the bounds of the scalarization. */ - save_flag = flag_bounds_check; - flag_bounds_check = 0; + save_flag = gfc_option.rtcheck; + gfc_option.rtcheck &= !GFC_RTCHECK_BOUNDS; gfc_conv_ss_startstride (&loop); - flag_bounds_check = save_flag; + gfc_option.rtcheck = save_flag; gfc_conv_loop_setup (&loop, &expr2->where); /* Figure out how many elements we need. */ diff --git a/gcc/function.h b/gcc/function.h index 31d223a3d39..70797974bf0 100644 --- a/gcc/function.h +++ b/gcc/function.h @@ -441,6 +441,11 @@ struct rtl_data GTY(()) /* True if dbr_schedule has already been called for this function. */ bool dbr_scheduled_p; + + /* True if current function can not throw. Unlike + TREE_NOTHROW (current_function_decl) it is set even for overwritable + function where currently compiled version of it is nothrow. */ + bool nothrow; }; #define return_label (crtl->x_return_label) diff --git a/gcc/gen-protos.c b/gcc/gen-protos.c deleted file mode 100644 index 0408d4f164f..00000000000 --- a/gcc/gen-protos.c +++ /dev/null @@ -1,191 +0,0 @@ -/* gen-protos.c - massages a list of prototypes, for use by fixproto. - Copyright (C) 1993, 1994, 1995, 1996, 1998, 1999, 2003, 2004, 2005, 2007 - Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 3, or (at your option) any - later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING3. If not see - <http://www.gnu.org/licenses/>. */ - -#include "bconfig.h" -#include "system.h" -#include "coretypes.h" -#include "tm.h" -#include "scan.h" -#include "errors.h" - -int verbose = 0; - -static void add_hash (const char *); -static int parse_fn_proto (char *, char *, struct fn_decl *); - -#define HASH_SIZE 2503 /* a prime */ -int hash_tab[HASH_SIZE]; -int next_index; -int collisions; - -static void -add_hash (const char *fname) -{ - int i, i0; - - /* NOTE: If you edit this, also edit lookup_std_proto in fix-header.c !! */ - i = hashstr (fname, strlen (fname)) % HASH_SIZE; - i0 = i; - if (hash_tab[i] != 0) - { - collisions++; - for (;;) - { - i = (i+1) % HASH_SIZE; - gcc_assert (i != i0); - if (hash_tab[i] == 0) - break; - } - } - hash_tab[i] = next_index; - - next_index++; -} - -/* Given a function prototype, fill in the fields of FN. - The result is a boolean indicating if a function prototype was found. - - The input string is modified (trailing NULs are inserted). - The fields of FN point to the input string. */ - -static int -parse_fn_proto (char *start, char *end, struct fn_decl *fn) -{ - char *ptr; - int param_nesting = 1; - char *param_start, *param_end, *decl_start, *name_start, *name_end; - - ptr = end - 1; - while (*ptr == ' ' || *ptr == '\t') ptr--; - if (*ptr-- != ';') - { - fprintf (stderr, "Funny input line: %s\n", start); - return 0; - } - while (*ptr == ' ' || *ptr == '\t') ptr--; - if (*ptr != ')') - { - fprintf (stderr, "Funny input line: %s\n", start); - return 0; - } - param_end = ptr; - for (;;) - { - int c = *--ptr; - if (c == '(' && --param_nesting == 0) - break; - else if (c == ')') - param_nesting++; - } - param_start = ptr+1; - - ptr--; - while (*ptr == ' ' || *ptr == '\t') ptr--; - - if (!ISALNUM ((unsigned char)*ptr)) - { - if (verbose) - fprintf (stderr, "%s: Can't handle this complex prototype: %s\n", - progname, start); - return 0; - } - name_end = ptr+1; - - while (ISIDNUM (*ptr)) - --ptr; - name_start = ptr+1; - while (*ptr == ' ' || *ptr == '\t') ptr--; - ptr[1] = 0; - *param_end = 0; - *name_end = 0; - - decl_start = start; - if (strncmp (decl_start, "typedef ", 8) == 0) - return 0; - if (strncmp (decl_start, "extern ", 7) == 0) - decl_start += 7; - - fn->fname = name_start; - fn->rtype = decl_start; - fn->params = param_start; - return 1; -} - -int -main (int argc ATTRIBUTE_UNUSED, char **argv) -{ - FILE *inf = stdin; - FILE *outf = stdout; - int i; - sstring linebuf; - struct fn_decl fn_decl; - - i = strlen (argv[0]); - while (i > 0 && argv[0][i-1] != '/') --i; - progname = &argv[0][i]; - - /* Unlock the stdio streams. */ - unlock_std_streams (); - - INIT_SSTRING (&linebuf); - - fprintf (outf, "struct fn_decl std_protos[] = {\n"); - - /* A hash table entry of 0 means "unused" so reserve it. */ - fprintf (outf, " {\"\", \"\", \"\", 0},\n"); - next_index = 1; - - for (;;) - { - int c = skip_spaces (inf, ' '); - - if (c == EOF) - break; - linebuf.ptr = linebuf.base; - ungetc (c, inf); - c = read_upto (inf, &linebuf, '\n'); - if (linebuf.base[0] == '#') /* skip cpp command */ - continue; - if (linebuf.base[0] == '\0') /* skip empty line */ - continue; - - if (! parse_fn_proto (linebuf.base, linebuf.ptr, &fn_decl)) - continue; - - add_hash (fn_decl.fname); - - fprintf (outf, " {\"%s\", \"%s\", \"%s\", 0},\n", - fn_decl.fname, fn_decl.rtype, fn_decl.params); - - if (c == EOF) - break; - } - fprintf (outf, " {0, 0, 0, 0}\n};\n"); - - - fprintf (outf, "#define HASH_SIZE %d\n", HASH_SIZE); - fprintf (outf, "short hash_tab[HASH_SIZE] = {\n"); - for (i = 0; i < HASH_SIZE; i++) - fprintf (outf, " %d,\n", hash_tab[i]); - fprintf (outf, "};\n"); - - fprintf (stderr, "gen-protos: %d entries %d collisions\n", - next_index, collisions); - - return 0; -} diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index d725f219a5c..5da4b4c700e 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -261,7 +261,7 @@ cgraph_mark_inline_edge (struct cgraph_edge *e, bool update_original, cgraph_redirect_edge_callee (e, cgraph_node (e->callee->inline_decl)); gcc_assert (e->inline_failed); - e->inline_failed = NULL; + e->inline_failed = CIF_OK; if (!e->callee->global.inlined) DECL_POSSIBLY_INLINED (e->callee->decl) = true; @@ -361,7 +361,7 @@ cgraph_estimate_growth (struct cgraph_node *node) static bool cgraph_check_inline_limits (struct cgraph_node *to, struct cgraph_node *what, - const char **reason, bool one_only) + cgraph_inline_failed_t *reason, bool one_only) { int times = 0; struct cgraph_edge *e; @@ -396,7 +396,7 @@ cgraph_check_inline_limits (struct cgraph_node *to, struct cgraph_node *what, && newsize > limit) { if (reason) - *reason = N_("--param large-function-growth limit reached"); + *reason = CIF_LARGE_FUNCTION_GROWTH_LIMIT; return false; } @@ -411,7 +411,7 @@ cgraph_check_inline_limits (struct cgraph_node *to, struct cgraph_node *what, && inlined_stack > PARAM_VALUE (PARAM_LARGE_STACK_FRAME)) { if (reason) - *reason = N_("--param large-stack-frame-growth limit reached"); + *reason = CIF_LARGE_STACK_FRAME_GROWTH_LIMIT; return false; } return true; @@ -419,8 +419,8 @@ cgraph_check_inline_limits (struct cgraph_node *to, struct cgraph_node *what, /* Return true when function N is small enough to be inlined. */ -bool -cgraph_default_inline_p (struct cgraph_node *n, const char **reason) +static bool +cgraph_default_inline_p (struct cgraph_node *n, cgraph_inline_failed_t *reason) { tree decl = n->decl; @@ -429,14 +429,14 @@ cgraph_default_inline_p (struct cgraph_node *n, const char **reason) if (!flag_inline_small_functions && !DECL_DECLARED_INLINE_P (decl)) { if (reason) - *reason = N_("function not inline candidate"); + *reason = CIF_FUNCTION_NOT_INLINE_CANDIDATE; return false; } if (!DECL_STRUCT_FUNCTION (decl)->cfg) { if (reason) - *reason = N_("function body not available"); + *reason = CIF_BODY_NOT_AVAILABLE; return false; } @@ -445,7 +445,7 @@ cgraph_default_inline_p (struct cgraph_node *n, const char **reason) if (n->global.insns >= MAX_INLINE_INSNS_SINGLE) { if (reason) - *reason = N_("--param max-inline-insns-single limit reached"); + *reason = CIF_MAX_INLINE_INSNS_SINGLE_LIMIT; return false; } } @@ -454,7 +454,7 @@ cgraph_default_inline_p (struct cgraph_node *n, const char **reason) if (n->global.insns >= MAX_INLINE_INSNS_AUTO) { if (reason) - *reason = N_("--param max-inline-insns-auto limit reached"); + *reason = CIF_MAX_INLINE_INSNS_AUTO_LIMIT; return false; } } @@ -469,7 +469,7 @@ cgraph_default_inline_p (struct cgraph_node *n, const char **reason) static bool cgraph_recursive_inlining_p (struct cgraph_node *to, struct cgraph_node *what, - const char **reason) + cgraph_inline_failed_t *reason) { bool recursive; if (to->global.inlined_to) @@ -480,7 +480,7 @@ cgraph_recursive_inlining_p (struct cgraph_node *to, not warn on it. */ if (recursive && reason) *reason = (what->local.disregard_inline_limits - ? N_("recursive inlining") : ""); + ? CIF_RECURSIVE_INLINING : CIF_UNSPECIFIED); return recursive; } @@ -566,7 +566,7 @@ update_caller_keys (fibheap_t heap, struct cgraph_node *node, bitmap updated_nodes) { struct cgraph_edge *edge; - const char *failed_reason; + cgraph_inline_failed_t failed_reason; if (!node->local.inlinable || node->local.disregard_inline_limits || node->global.inlined_to) @@ -790,12 +790,14 @@ cgraph_decide_recursive_inlining (struct cgraph_node *node, /* Set inline_failed for all callers of given function to REASON. */ static void -cgraph_set_inline_failed (struct cgraph_node *node, const char *reason) +cgraph_set_inline_failed (struct cgraph_node *node, + cgraph_inline_failed_t reason) { struct cgraph_edge *e; if (dump_file) - fprintf (dump_file, "Inlining failed: %s\n", reason); + fprintf (dump_file, "Inlining failed: %s\n", + cgraph_inline_failed_string (reason)); for (e = node->callers; e; e = e->next_caller) if (e->inline_failed) e->inline_failed = reason; @@ -840,7 +842,7 @@ cgraph_decide_inlining_of_small_functions (void) { struct cgraph_node *node; struct cgraph_edge *edge; - const char *failed_reason; + cgraph_inline_failed_t failed_reason; fibheap_t heap = fibheap_new (); bitmap updated_nodes = BITMAP_ALLOC (NULL); int min_insns, max_insns; @@ -887,7 +889,7 @@ cgraph_decide_inlining_of_small_functions (void) struct cgraph_node *where; int growth = cgraph_estimate_size_after_inlining (1, edge->caller, edge->callee); - const char *not_good = NULL; + cgraph_inline_failed_t not_good = CIF_OK; growth -= edge->caller->global.insns; @@ -939,7 +941,8 @@ cgraph_decide_inlining_of_small_functions (void) if (where->global.inlined_to) { edge->inline_failed - = (edge->callee->local.disregard_inline_limits ? N_("recursive inlining") : ""); + = (edge->callee->local.disregard_inline_limits + ? CIF_RECURSIVE_INLINING : CIF_UNSPECIFIED); if (dump_file) fprintf (dump_file, " inline_failed:Recursive inlining performed only for function itself.\n"); continue; @@ -947,12 +950,12 @@ cgraph_decide_inlining_of_small_functions (void) } if (!cgraph_maybe_hot_edge_p (edge)) - not_good = N_("call is unlikely and code size would grow"); + not_good = CIF_UNLIKELY_CALL; if (!flag_inline_functions && !DECL_DECLARED_INLINE_P (edge->callee->decl)) - not_good = N_("function not declared inline and code size would grow"); + not_good = CIF_NOT_DECLARED_INLINED; if (optimize_function_for_size_p (DECL_STRUCT_FUNCTION(edge->caller->decl))) - not_good = N_("optimizing for size and code size would grow"); + not_good = CIF_OPTIMIZING_FOR_SIZE; if (not_good && growth > 0 && cgraph_estimate_growth (edge->callee) > 0) { if (!cgraph_recursive_inlining_p (edge->caller, edge->callee, @@ -960,7 +963,8 @@ cgraph_decide_inlining_of_small_functions (void) { edge->inline_failed = not_good; if (dump_file) - fprintf (dump_file, " inline_failed:%s.\n", edge->inline_failed); + fprintf (dump_file, " inline_failed:%s.\n", + cgraph_inline_failed_string (edge->inline_failed)); } continue; } @@ -970,16 +974,18 @@ cgraph_decide_inlining_of_small_functions (void) &edge->inline_failed)) { if (dump_file) - fprintf (dump_file, " inline_failed:%s.\n", edge->inline_failed); + fprintf (dump_file, " inline_failed:%s.\n", + cgraph_inline_failed_string (edge->inline_failed)); } continue; } if (!tree_can_inline_p (edge->caller->decl, edge->callee->decl)) { gimple_call_set_cannot_inline (edge->call_stmt, true); - edge->inline_failed = N_("target specific option mismatch"); + edge->inline_failed = CIF_TARGET_OPTION_MISMATCH; if (dump_file) - fprintf (dump_file, " inline_failed:%s.\n", edge->inline_failed); + fprintf (dump_file, " inline_failed:%s.\n", + cgraph_inline_failed_string (edge->inline_failed)); continue; } if (cgraph_recursive_inlining_p (edge->caller, edge->callee, @@ -1005,7 +1011,8 @@ cgraph_decide_inlining_of_small_functions (void) { if (dump_file) fprintf (dump_file, " Not inlining into %s:%s.\n", - cgraph_node_name (edge->caller), edge->inline_failed); + cgraph_node_name (edge->caller), + cgraph_inline_failed_string (edge->inline_failed)); continue; } callee = edge->callee; @@ -1053,7 +1060,7 @@ cgraph_decide_inlining_of_small_functions (void) if (!edge->callee->local.disregard_inline_limits && edge->inline_failed && !cgraph_recursive_inlining_p (edge->caller, edge->callee, &edge->inline_failed)) - edge->inline_failed = N_("--param inline-unit-growth limit reached"); + edge->inline_failed = CIF_INLINE_UNIT_GROWTH_LIMIT; } if (new_indirect_edges) @@ -1163,7 +1170,7 @@ cgraph_decide_inlining (void) reason why inline failed. */ for (e = node->callers; e; e = e->next_caller) if (e->inline_failed) - e->inline_failed = N_("recursive inlining"); + e->inline_failed = CIF_RECURSIVE_INLINING; if (dump_file) fprintf (dump_file, " Inlined for a net change of %+i insns.\n", @@ -1289,7 +1296,7 @@ try_inline (struct cgraph_edge *e, enum inlining_mode mode, int depth) cgraph_node_name (e->caller)); } e->inline_failed = (e->callee->local.disregard_inline_limits - ? N_("recursive inlining") : ""); + ? CIF_RECURSIVE_INLINING : CIF_UNSPECIFIED); return false; } } @@ -1330,7 +1337,7 @@ cgraph_decide_inlining_incrementally (struct cgraph_node *node, { struct cgraph_edge *e; bool inlined = false; - const char *failed_reason; + cgraph_inline_failed_t failed_reason; enum inlining_mode old_mode; #ifdef ENABLE_CHECKING @@ -1475,7 +1482,8 @@ cgraph_decide_inlining_incrementally (struct cgraph_node *node, if (dump_file) { indent_to (dump_file, depth); - fprintf (dump_file, "Not inlining: %s.\n", e->inline_failed); + fprintf (dump_file, "Not inlining: %s.\n", + cgraph_inline_failed_string (e->inline_failed)); } continue; } @@ -1747,6 +1755,8 @@ inline_transform (struct cgraph_node *node) todo = optimize_inline_calls (current_function_decl); timevar_pop (TV_INTEGRATION); } + cfun->always_inline_functions_inlined = true; + cfun->after_inlining = true; return todo | execute_fixup_cfg (); } diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c index f21638f383e..21ecfd52b74 100644 --- a/gcc/ipa-pure-const.c +++ b/gcc/ipa-pure-const.c @@ -71,6 +71,8 @@ struct funct_state_d { /* See above. */ enum pure_const_state_e pure_const_state; + /* What user set here; we can be always sure about this. */ + enum pure_const_state_e state_set_in_source; /* True if the function could possibly infinite loop. There are a lot of ways that this could be determined. We are pretty @@ -80,10 +82,7 @@ struct funct_state_d a behavioral change. */ bool looping; - /* If the state of the function was set in the source, then assume - that it was done properly even if the analysis we do would be - more pessimestic. */ - bool state_set_in_source; + bool can_throw; }; typedef struct funct_state_d * funct_state; @@ -141,21 +140,15 @@ static inline void check_decl (funct_state local, tree t, bool checking_write) { - /* If the variable has the "used" attribute, treat it as if it had a - been touched by the devil. */ - if (lookup_attribute ("used", DECL_ATTRIBUTES (t))) - { - local->pure_const_state = IPA_NEITHER; - local->looping = false; - return; - } - + if (MTAG_P (t)) + return; /* Do not want to do anything with volatile except mark any function that uses one to be not const or pure. */ if (TREE_THIS_VOLATILE (t)) { local->pure_const_state = IPA_NEITHER; - local->looping = false; + if (dump_file) + fprintf (dump_file, " Volatile operand is not const/pure"); return; } @@ -163,212 +156,94 @@ check_decl (funct_state local, if (!TREE_STATIC (t) && !DECL_EXTERNAL (t)) return; + /* If the variable has the "used" attribute, treat it as if it had a + been touched by the devil. */ + if (lookup_attribute ("used", DECL_ATTRIBUTES (t))) + { + local->pure_const_state = IPA_NEITHER; + if (dump_file) + fprintf (dump_file, " Used static/global variable is not const/pure\n"); + return; + } + /* Since we have dealt with the locals and params cases above, if we are CHECKING_WRITE, this cannot be a pure or constant function. */ if (checking_write) { local->pure_const_state = IPA_NEITHER; - local->looping = false; + if (dump_file) + fprintf (dump_file, " static/global memory write is not const/pure\n"); return; } if (DECL_EXTERNAL (t) || TREE_PUBLIC (t)) { - /* If the front end set the variable to be READONLY and - constant, we can allow this variable in pure or const - functions but the scope is too large for our analysis to set - these bits ourselves. */ - - if (TREE_READONLY (t) - && DECL_INITIAL (t) - && is_gimple_min_invariant (DECL_INITIAL (t))) - ; /* Read of a constant, do not change the function state. */ + /* Readonly reads are safe. */ + if (TREE_READONLY (t) && !TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (t))) + return; /* Read of a constant, do not change the function state. */ else { + if (dump_file) + fprintf (dump_file, " global memory read is not const\n"); /* Just a regular read. */ if (local->pure_const_state == IPA_CONST) local->pure_const_state = IPA_PURE; } } - - /* Compilation level statics can be read if they are readonly - variables. */ - if (TREE_READONLY (t)) - return; - - /* Just a regular read. */ - if (local->pure_const_state == IPA_CONST) - local->pure_const_state = IPA_PURE; + else + { + /* Compilation level statics can be read if they are readonly + variables. */ + if (TREE_READONLY (t)) + return; + + if (dump_file) + fprintf (dump_file, " static memory read is not const\n"); + /* Just a regular read. */ + if (local->pure_const_state == IPA_CONST) + local->pure_const_state = IPA_PURE; + } } -/* If T is a VAR_DECL check to see if it is an allowed reference. */ - -static void -check_operand (funct_state local, - tree t, bool checking_write) -{ - if (!t) return; - - if (TREE_CODE (t) == VAR_DECL) - check_decl (local, t, checking_write); -} -/* Examine tree T for references. */ +/* Check to see if the use (or definition when CHECKING_WRITE is true) + variable T is legal in a function that is either pure or const. */ -static void -check_tree (funct_state local, tree t, bool checking_write) +static inline void +check_op (funct_state local, + tree t, bool checking_write) { - if ((TREE_CODE (t) == EXC_PTR_EXPR) || (TREE_CODE (t) == FILTER_EXPR) - || TREE_CODE (t) == SSA_NAME) + while (t && handled_component_p (t)) + t = TREE_OPERAND (t, 0); + if (!t) return; - - /* Any tree which is volatile disqualifies this function from being - const or pure. */ - if (TREE_THIS_VOLATILE (t)) - { - local->pure_const_state = IPA_NEITHER; - local->looping = false; - return; - } - - while (TREE_CODE (t) == REALPART_EXPR - || TREE_CODE (t) == IMAGPART_EXPR - || handled_component_p (t)) - { - if (TREE_CODE (t) == ARRAY_REF) - check_operand (local, TREE_OPERAND (t, 1), false); - t = TREE_OPERAND (t, 0); - } - - /* The bottom of an indirect reference can only be read, not - written. */ - if (INDIRECT_REF_P (t)) + if (INDIRECT_REF_P (t) || TREE_CODE (t) == TARGET_MEM_REF) { - check_tree (local, TREE_OPERAND (t, 0), false); - - /* Any indirect reference that occurs on the lhs - disqualifies the function from being pure or const. Any - indirect reference that occurs on the rhs disqualifies the - function from being const. */ - if (checking_write) - { + if (TREE_THIS_VOLATILE (t)) + { local->pure_const_state = IPA_NEITHER; - local->looping = false; + if (dump_file) + fprintf (dump_file, " Volatile indirect ref is not const/pure\n"); return; } - else if (local->pure_const_state == IPA_CONST) - local->pure_const_state = IPA_PURE; - } - - if (SSA_VAR_P (t)) - check_operand (local, t, checking_write); -} - -/* Scan tree T to see if there are any addresses taken in within T. */ - -static void -look_for_address_of (funct_state local, tree t) -{ - if (TREE_CODE (t) == ADDR_EXPR) - { - tree x = get_base_var (t); - if (TREE_CODE (x) == VAR_DECL) - { - check_decl (local, x, false); - - /* Taking the address of something appears to be reasonable - in PURE code. Not allowed in const. */ - if (local->pure_const_state == IPA_CONST) + else if (checking_write) + { + local->pure_const_state = IPA_NEITHER; + if (dump_file) + fprintf (dump_file, " Indirect ref write is not const/pure\n"); + return; + } + else + { + if (dump_file) + fprintf (dump_file, " Indirect ref read is not const\n"); + if (local->pure_const_state == IPA_CONST) local->pure_const_state = IPA_PURE; } } } -/* Check to see if T is a read or address of operation on a var we are - interested in analyzing. LOCAL is passed in to get access to its - bit vectors. */ - -static void -check_rhs_var (funct_state local, tree t) -{ - look_for_address_of (local, t); - - /* Memcmp and strlen can both trap and they are declared pure. */ - if (tree_could_trap_p (t) - && local->pure_const_state == IPA_CONST) - local->pure_const_state = IPA_PURE; - - check_tree(local, t, false); -} - -/* Check to see if T is an assignment to a var we are interested in - analyzing. LOCAL is passed in to get access to its bit vectors. */ - -static void -check_lhs_var (funct_state local, tree t) -{ - /* Memcmp and strlen can both trap and they are declared pure. - Which seems to imply that we can apply the same rule here. */ - if (tree_could_trap_p (t) - && local->pure_const_state == IPA_CONST) - local->pure_const_state = IPA_PURE; - - check_tree(local, t, true); -} - -/* This is a scaled down version of get_asm_expr_operands from - tree_ssa_operands.c. The version there runs much later and assumes - that aliasing information is already available. Here we are just - trying to find if the set of inputs and outputs contain references - or address of operations to local static variables. STMT is the - actual asm statement. */ - -static void -get_asm_expr_operands (funct_state local, gimple stmt) -{ - size_t noutputs = gimple_asm_noutputs (stmt); - const char **oconstraints - = (const char **) alloca ((noutputs) * sizeof (const char *)); - size_t i; - tree op; - const char *constraint; - bool allows_mem, allows_reg, is_inout; - - for (i = 0; i < noutputs; i++) - { - op = gimple_asm_output_op (stmt, i); - oconstraints[i] = constraint - = TREE_STRING_POINTER (TREE_VALUE (TREE_PURPOSE (op))); - parse_output_constraint (&constraint, i, 0, 0, - &allows_mem, &allows_reg, &is_inout); - - check_lhs_var (local, TREE_VALUE (op)); - } - - for (i = 0; i < gimple_asm_ninputs (stmt); i++) - { - op = gimple_asm_input_op (stmt, i); - constraint - = TREE_STRING_POINTER (TREE_VALUE (TREE_PURPOSE (op))); - parse_input_constraint (&constraint, 0, 0, noutputs, 0, - oconstraints, &allows_mem, &allows_reg); - - check_rhs_var (local, TREE_VALUE (op)); - } - - for (i = 0; i < gimple_asm_nclobbers (stmt); i++) - { - op = gimple_asm_clobber_op (stmt, i); - if (simple_cst_equal(TREE_VALUE (op), memory_identifier_string) == 1) - /* Abandon all hope, ye who enter here. */ - local->pure_const_state = IPA_NEITHER; - } - - if (gimple_asm_volatile_p (stmt)) - local->pure_const_state = IPA_NEITHER; -} - /* Check the parameters of a function call to CALL_EXPR to see if there are any references in the parameters that are not allowed for pure or const functions. Also check to see if this is either an @@ -377,20 +252,37 @@ get_asm_expr_operands (funct_state local, gimple stmt) the entire call expression. */ static void -check_call (funct_state local, gimple call) +check_call (funct_state local, gimple call, bool ipa) { int flags = gimple_call_flags (call); - tree lhs, callee_t = gimple_call_fndecl (call); + tree callee_t = gimple_call_fndecl (call); struct cgraph_node* callee; enum availability avail = AVAIL_NOT_AVAILABLE; - size_t i; - - lhs = gimple_call_lhs (call); - if (lhs) - check_lhs_var (local, lhs); + bool possibly_throws = stmt_could_throw_p (call); + bool possibly_throws_externally = (possibly_throws + && stmt_can_throw_external (call)); - for (i = 0; i < gimple_call_num_args (call); i++) - check_rhs_var (local, gimple_call_arg (call, i)); + if (possibly_throws) + { + unsigned int i; + for (i = 0; i < gimple_num_ops (call); i++) + if (gimple_op (call, i) + && tree_could_throw_p (gimple_op (call, i))) + { + if (possibly_throws && flag_non_call_exceptions) + { + if (dump_file) + fprintf (dump_file, " operand can throw; looping\n"); + local->looping = true; + } + if (possibly_throws_externally) + { + if (dump_file) + fprintf (dump_file, " operand can throw externally\n"); + local->can_throw = true; + } + } + } /* The const and pure flags are set by a variety of places in the compiler (including here). If someone has already set the flags @@ -411,8 +303,10 @@ check_call (funct_state local, gimple call) or pure. */ if (setjmp_call_p (callee_t)) { + if (dump_file) + fprintf (dump_file, " setjmp is not const/pure\n"); + local->looping = true; local->pure_const_state = IPA_NEITHER; - local->looping = false; } if (DECL_BUILT_IN_CLASS (callee_t) == BUILT_IN_NORMAL) @@ -420,267 +314,252 @@ check_call (funct_state local, gimple call) { case BUILT_IN_LONGJMP: case BUILT_IN_NONLOCAL_GOTO: + if (dump_file) + fprintf (dump_file, " longjmp and nonlocal goto is not const/pure\n"); local->pure_const_state = IPA_NEITHER; - local->looping = false; + local->looping = true; break; default: break; } } + /* When not in IPA mode, we can still handle self recursion. */ + if (!ipa && callee_t == current_function_decl) + local->looping = true; /* The callee is either unknown (indirect call) or there is just no scannable code for it (external call) . We look to see if there are any bits available for the callee (such as by declaration or because it is builtin) and process solely on the basis of those bits. */ - if (avail == AVAIL_NOT_AVAILABLE || avail == AVAIL_OVERWRITABLE) + else if (avail <= AVAIL_OVERWRITABLE || !ipa) { - if (flags & ECF_PURE) + if (possibly_throws && flag_non_call_exceptions) + { + if (dump_file) + fprintf (dump_file, " can throw; looping\n"); + local->looping = true; + } + if (possibly_throws_externally) + { + if (dump_file) + { + fprintf (dump_file, " can throw externally in region %i\n", + lookup_stmt_eh_region (call)); + if (callee_t) + fprintf (dump_file, " callee:%s\n", + IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (callee_t))); + } + local->can_throw = true; + } + if (flags & ECF_CONST) { + if (callee_t && DECL_LOOPING_CONST_OR_PURE_P (callee_t)) + local->looping = true; + } + else if (flags & ECF_PURE) + { + if (callee_t && DECL_LOOPING_CONST_OR_PURE_P (callee_t)) + local->looping = true; + if (dump_file) + fprintf (dump_file, " pure function call in not const\n"); if (local->pure_const_state == IPA_CONST) local->pure_const_state = IPA_PURE; } else - local->pure_const_state = IPA_NEITHER; - } - else - { - /* We have the code and we will scan it for the effects. */ - if (flags & ECF_PURE) { - if (local->pure_const_state == IPA_CONST) - local->pure_const_state = IPA_PURE; + if (dump_file) + fprintf (dump_file, " uknown function call is not const/pure\n"); + local->pure_const_state = IPA_NEITHER; + local->looping = true; } } + /* Direct functions calls are handled by IPA propagation. */ } -/* TP is the part of the tree currently under the microscope. - WALK_SUBTREES is part of the walk_tree api but is unused here. - DATA is cgraph_node of the function being walked. */ - -/* FIXME: When this is converted to run over SSA form, this code - should be converted to use the operand scanner. */ - -static tree -scan_function_op (tree *tp, int *walk_subtrees, void *data) +/* Look into pointer pointed to by GSIP and figure out what interesting side effects + it have. */ +static void +check_stmt (gimple_stmt_iterator *gsip, funct_state local, bool ipa) { - struct walk_stmt_info *wi = (struct walk_stmt_info *) data; - struct cgraph_node *fn = (struct cgraph_node *) wi->info; - tree t = *tp; - funct_state local = get_function_state (fn); + gimple stmt = gsi_stmt (*gsip); + unsigned int i = 0; + bitmap_iterator bi; - switch (TREE_CODE (t)) + if (dump_file) { - case VAR_DECL: - if (DECL_INITIAL (t)) - walk_tree (&DECL_INITIAL (t), scan_function_op, data, visited_nodes); - *walk_subtrees = 0; - break; - - case ADDR_EXPR: - /* This case is here to find addresses on rhs of constructors in - decl_initial of static variables. */ - check_rhs_var (local, t); - *walk_subtrees = 0; - break; - - default: - break; + fprintf (dump_file, " scanning: "); + print_gimple_stmt (dump_file, stmt, 0, 0); + } + if (gimple_loaded_syms (stmt)) + EXECUTE_IF_SET_IN_BITMAP (gimple_loaded_syms (stmt), 0, i, bi) + check_decl (local, referenced_var_lookup (i), false); + if (gimple_stored_syms (stmt)) + EXECUTE_IF_SET_IN_BITMAP (gimple_stored_syms (stmt), 0, i, bi) + check_decl (local, referenced_var_lookup (i), true); + + if (gimple_code (stmt) != GIMPLE_CALL + && stmt_could_throw_p (stmt)) + { + if (flag_non_call_exceptions) + { + if (dump_file) + fprintf (dump_file, " can throw; looping"); + local->looping = true; + } + if (stmt_can_throw_external (stmt)) + { + if (dump_file) + fprintf (dump_file, " can throw externally"); + local->can_throw = true; + } } - return NULL; -} - -static tree -scan_function_stmt (gimple_stmt_iterator *gsi_p, - bool *handled_ops_p, - struct walk_stmt_info *wi) -{ - struct cgraph_node *fn = (struct cgraph_node *) wi->info; - gimple stmt = gsi_stmt (*gsi_p); - funct_state local = get_function_state (fn); - switch (gimple_code (stmt)) { case GIMPLE_ASSIGN: - { - /* First look on the lhs and see what variable is stored to */ - tree lhs = gimple_assign_lhs (stmt); - tree rhs1 = gimple_assign_rhs1 (stmt); - tree rhs2 = gimple_assign_rhs2 (stmt); - enum tree_code code = gimple_assign_rhs_code (stmt); - - check_lhs_var (local, lhs); - - /* For the purposes of figuring out what the cast affects */ - - /* Next check the operands on the rhs to see if they are ok. */ - switch (TREE_CODE_CLASS (code)) - { - case tcc_binary: - { - check_rhs_var (local, rhs1); - check_rhs_var (local, rhs2); - } - break; - case tcc_unary: - { - check_rhs_var (local, rhs1); - } - - break; - case tcc_reference: - check_rhs_var (local, rhs1); - break; - case tcc_declaration: - check_rhs_var (local, rhs1); - break; - case tcc_expression: - switch (code) - { - case ADDR_EXPR: - check_rhs_var (local, rhs1); - break; - default: - break; - } - break; - default: - break; - } - *handled_ops_p = true; - } + check_op (local, gimple_assign_lhs (stmt), true); + i = 1; + break; + case GIMPLE_CALL: + check_op (local, gimple_call_lhs (stmt), true); + i = 1; + check_call (local, stmt, ipa); break; - case GIMPLE_LABEL: if (DECL_NONLOCAL (gimple_label_label (stmt))) /* Target of long jump. */ { + if (dump_file) + fprintf (dump_file, " nonlocal label is not const/pure"); local->pure_const_state = IPA_NEITHER; - local->looping = false; } break; - - case GIMPLE_CALL: - check_call (local, stmt); - *handled_ops_p = true; - break; - case GIMPLE_ASM: - get_asm_expr_operands (local, stmt); - *handled_ops_p = true; - break; - + for (i = 0; i < gimple_asm_noutputs (stmt); i++) + check_op (local, TREE_VALUE (gimple_asm_output_op (stmt, i)), true); + for (i = 0; i < gimple_asm_ninputs (stmt); i++) + check_op (local, TREE_VALUE (gimple_asm_input_op (stmt, i)), false); + for (i = 0; i < gimple_asm_nclobbers (stmt); i++) + { + tree op = gimple_asm_clobber_op (stmt, i); + if (simple_cst_equal(TREE_VALUE (op), memory_identifier_string) == 1) + { + if (dump_file) + fprintf (dump_file, " memory asm clobber is not const/pure"); + /* Abandon all hope, ye who enter here. */ + local->pure_const_state = IPA_NEITHER; + } + } + if (gimple_asm_volatile_p (stmt)) + { + if (dump_file) + fprintf (dump_file, " volatile is not const/pure"); + /* Abandon all hope, ye who enter here. */ + local->pure_const_state = IPA_NEITHER; + local->looping = true; + } + return; default: break; } - return NULL; + + for (; i < gimple_num_ops (stmt); i++) + check_op (local, gimple_op (stmt, i), false); } /* This is the main routine for finding the reference patterns for global variables within a function FN. */ -static void -analyze_function (struct cgraph_node *fn) +static funct_state +analyze_function (struct cgraph_node *fn, bool ipa) { tree decl = fn->decl; - funct_state l = XCNEW (struct funct_state_d); - - if (cgraph_function_body_availability (fn) <= AVAIL_OVERWRITABLE) - return; - - set_function_state (fn, l); - - l->pure_const_state = IPA_CONST; - l->state_set_in_source = false; - if (DECL_LOOPING_CONST_OR_PURE_P (decl)) - l->looping = true; - else - l->looping = false; + tree old_decl = current_function_decl; + funct_state l; + basic_block this_block; - /* If this function does not return normally or does not bind local, - do not touch this unless it has been marked as const or pure by the - front end. */ - if (TREE_THIS_VOLATILE (decl) - || !targetm.binds_local_p (decl)) + if (cgraph_function_body_availability (fn) <= AVAIL_OVERWRITABLE) { - l->pure_const_state = IPA_NEITHER; - return; + if (dump_file) + fprintf (dump_file, "Function is not available or overwrittable; not analyzing.\n"); + return NULL; } - if (TREE_READONLY (decl)) - { - l->pure_const_state = IPA_CONST; - l->state_set_in_source = true; - } - if (DECL_PURE_P (decl)) - { - l->pure_const_state = IPA_PURE; - l->state_set_in_source = true; - } + l = XCNEW (struct funct_state_d); + l->pure_const_state = IPA_CONST; + l->state_set_in_source = IPA_NEITHER; + l->looping = false; + l->can_throw = false; if (dump_file) { - fprintf (dump_file, "\n local analysis of %s with initial value = %d\n ", - cgraph_node_name (fn), - l->pure_const_state); + fprintf (dump_file, "\n\n local analysis of %s\n ", + cgraph_node_name (fn)); } - if (!l->state_set_in_source) + push_cfun (DECL_STRUCT_FUNCTION (decl)); + current_function_decl = decl; + + FOR_EACH_BB (this_block) { - struct function *this_cfun = DECL_STRUCT_FUNCTION (decl); - basic_block this_block; - - FOR_EACH_BB_FN (this_block, this_cfun) - { - gimple_stmt_iterator gsi; - struct walk_stmt_info wi; - - memset (&wi, 0, sizeof(wi)); - for (gsi = gsi_start_bb (this_block); - !gsi_end_p (gsi); - gsi_next (&gsi)) - { - wi.info = fn; - wi.pset = visited_nodes; - walk_gimple_stmt (&gsi, scan_function_stmt, scan_function_op, - &wi); - if (l->pure_const_state == IPA_NEITHER) - goto end; - } - } + gimple_stmt_iterator gsi; + struct walk_stmt_info wi; - if (l->pure_const_state != IPA_NEITHER) + memset (&wi, 0, sizeof(wi)); + for (gsi = gsi_start_bb (this_block); + !gsi_end_p (gsi); + gsi_next (&gsi)) { - tree old_decl = current_function_decl; - /* Const functions cannot have back edges (an - indication of possible infinite loop side - effect. */ - - current_function_decl = fn->decl; - - /* The C++ front end, has a tendency to some times jerk away - a function after it has created it. This should have - been fixed. */ - gcc_assert (DECL_STRUCT_FUNCTION (fn->decl)); - - push_cfun (DECL_STRUCT_FUNCTION (fn->decl)); - - if (mark_dfs_back_edges ()) - l->pure_const_state = IPA_NEITHER; - - current_function_decl = old_decl; - pop_cfun (); + check_stmt (&gsi, l, ipa); + if (l->pure_const_state == IPA_NEITHER && l->looping && l->can_throw) + goto end; } } end: + if (l->pure_const_state != IPA_NEITHER) + { + /* Const functions cannot have back edges (an + indication of possible infinite loop side + effect. */ + if (mark_dfs_back_edges ()) + l->looping = true; + + } + + if (TREE_READONLY (decl)) + { + l->pure_const_state = IPA_CONST; + l->state_set_in_source = IPA_CONST; + if (!DECL_LOOPING_CONST_OR_PURE_P (decl)) + l->looping = false; + } + if (DECL_PURE_P (decl)) + { + if (l->pure_const_state != IPA_CONST) + l->pure_const_state = IPA_PURE; + l->state_set_in_source = IPA_PURE; + if (!DECL_LOOPING_CONST_OR_PURE_P (decl)) + l->looping = false; + } + if (TREE_NOTHROW (decl)) + l->can_throw = false; + + pop_cfun (); + current_function_decl = old_decl; if (dump_file) { - fprintf (dump_file, "after local analysis of %s with initial value = %d\n ", - cgraph_node_name (fn), - l->pure_const_state); + if (l->looping) + fprintf (dump_file, "Function is locally looping.\n"); + if (l->can_throw) + fprintf (dump_file, "Function is locally throwing.\n"); + if (l->pure_const_state == IPA_CONST) + fprintf (dump_file, "Function is locally const.\n"); + if (l->pure_const_state == IPA_PURE) + fprintf (dump_file, "Function is locally pure.\n"); } + return l; } /* Called when new function is inserted to callgraph late. */ @@ -694,7 +573,7 @@ add_new_function (struct cgraph_node *node, void *data ATTRIBUTE_UNUSED) since all we would be interested in are the addressof operations. */ visited_nodes = pointer_set_create (); - analyze_function (node); + set_function_state (node, analyze_function (node, true)); pointer_set_destroy (visited_nodes); visited_nodes = NULL; } @@ -755,7 +634,7 @@ generate_summary (void) */ for (node = cgraph_nodes; node; node = node->next) if (cgraph_function_body_availability (node) > AVAIL_OVERWRITABLE) - analyze_function (node); + set_function_state (node, analyze_function (node, true)); pointer_set_destroy (visited_nodes); visited_nodes = NULL; @@ -795,6 +674,7 @@ propagate (void) { enum pure_const_state_e pure_const_state = IPA_CONST; bool looping = false; + bool can_throw = false; int count = 0; node = order[i]; @@ -802,38 +682,44 @@ propagate (void) w = node; while (w) { + struct cgraph_edge *e; funct_state w_l = get_function_state (w); if (pure_const_state < w_l->pure_const_state) pure_const_state = w_l->pure_const_state; + if (w_l->can_throw) + can_throw = true; if (w_l->looping) looping = true; - if (pure_const_state == IPA_NEITHER) + if (pure_const_state == IPA_NEITHER + && can_throw) break; - if (!w_l->state_set_in_source) + count++; + + if (count > 1) + looping = true; + + for (e = w->callees; e; e = e->next_callee) { - struct cgraph_edge *e; - count++; + struct cgraph_node *y = e->callee; - if (count > 1) - looping = true; - - for (e = w->callees; e; e = e->next_callee) + if (cgraph_function_body_availability (y) > AVAIL_OVERWRITABLE) { - struct cgraph_node *y = e->callee; - - if (cgraph_function_body_availability (y) > AVAIL_OVERWRITABLE) - { - funct_state y_l = get_function_state (y); - if (pure_const_state < y_l->pure_const_state) - pure_const_state = y_l->pure_const_state; - if (pure_const_state == IPA_NEITHER) - break; - if (y_l->looping) - looping = true; - } + funct_state y_l = get_function_state (y); + if (pure_const_state < y_l->pure_const_state) + pure_const_state = y_l->pure_const_state; + if (pure_const_state == IPA_NEITHER + && can_throw) + break; + if (y_l->looping) + looping = true; + if (y_l->can_throw && !TREE_NOTHROW (w->decl) + /* FIXME: We should check that the throw can get external. + We also should handle only loops formed by can throw external + edges. */) + can_throw = true; } } w_info = (struct ipa_dfs_info *) w->aux; @@ -846,36 +732,52 @@ propagate (void) while (w) { funct_state w_l = get_function_state (w); + enum pure_const_state_e this_state = pure_const_state; + bool this_looping = looping; - /* All nodes within a cycle share the same info. */ - if (!w_l->state_set_in_source) + if (w_l->state_set_in_source != IPA_NEITHER) { - w_l->pure_const_state = pure_const_state; - w_l->looping = looping; + if (this_state > w_l->state_set_in_source) + this_state = w_l->state_set_in_source; + this_looping = false; + } - switch (pure_const_state) - { - case IPA_CONST: - TREE_READONLY (w->decl) = 1; - DECL_LOOPING_CONST_OR_PURE_P (w->decl) = looping; - if (dump_file) - fprintf (dump_file, "Function found to be %sconst: %s\n", - looping ? "looping " : "", - lang_hooks.decl_printable_name(w->decl, 2)); - break; - - case IPA_PURE: - DECL_PURE_P (w->decl) = 1; - DECL_LOOPING_CONST_OR_PURE_P (w->decl) = looping; - if (dump_file) - fprintf (dump_file, "Function found to be %spure: %s\n", - looping ? "looping " : "", - lang_hooks.decl_printable_name(w->decl, 2)); - break; - - default: - break; - } + /* All nodes within a cycle share the same info. */ + w_l->pure_const_state = this_state; + w_l->looping = this_looping; + + switch (this_state) + { + case IPA_CONST: + if (!TREE_READONLY (w->decl) && dump_file) + fprintf (dump_file, "Function found to be %sconst: %s\n", + this_looping ? "looping " : "", + cgraph_node_name (w)); + TREE_READONLY (w->decl) = 1; + DECL_LOOPING_CONST_OR_PURE_P (w->decl) = this_looping; + break; + + case IPA_PURE: + if (!DECL_PURE_P (w->decl) && dump_file) + fprintf (dump_file, "Function found to be %spure: %s\n", + this_looping ? "looping " : "", + cgraph_node_name (w)); + DECL_PURE_P (w->decl) = 1; + DECL_LOOPING_CONST_OR_PURE_P (w->decl) = this_looping; + break; + + default: + break; + } + if (!can_throw && !TREE_NOTHROW (w->decl)) + { + /* FIXME: TREE_NOTHROW is not set because passmanager will execute + verify_ssa and verify_cfg on every function. Before fixup_cfg is done, + those functions are going to have NOTHROW calls in EH regions reulting + in ICE. */ + if (dump_file) + fprintf (dump_file, "Function found to be nothrow: %s\n", + cgraph_node_name (w)); } w_info = (struct ipa_dfs_info *) w->aux; w = w_info->next_cycle; @@ -935,3 +837,120 @@ struct ipa_opt_pass pass_ipa_pure_const = NULL, /* function_transform */ NULL /* variable_transform */ }; + +/* Simple local pass for pure const discovery reusing the analysis from + ipa_pure_const. This pass is effective when executed together with + other optimization passes in early optimization pass queue. */ + +static unsigned int +local_pure_const (void) +{ + bool changed = false; + funct_state l; + + /* Because we do not schedule pass_fixup_cfg over whole program after early optimizations + we must not promote functions that are called by already processed functions. */ + + if (function_called_by_processed_nodes_p ()) + { + if (dump_file) + fprintf (dump_file, "Function called in recursive cycle; ignoring\n"); + return 0; + } + + l = analyze_function (cgraph_node (current_function_decl), false); + if (!l) + { + if (dump_file) + fprintf (dump_file, "Function has wrong visibility; ignoring\n"); + return 0; + } + + switch (l->pure_const_state) + { + case IPA_CONST: + if (!TREE_READONLY (current_function_decl)) + { + TREE_READONLY (current_function_decl) = 1; + DECL_LOOPING_CONST_OR_PURE_P (current_function_decl) = l->looping; + changed = true; + if (dump_file) + fprintf (dump_file, "Function found to be %sconst: %s\n", + l->looping ? "looping " : "", + lang_hooks.decl_printable_name (current_function_decl, + 2)); + } + else if (DECL_LOOPING_CONST_OR_PURE_P (current_function_decl) + && !l->looping) + { + DECL_LOOPING_CONST_OR_PURE_P (current_function_decl) = false; + changed = true; + if (dump_file) + fprintf (dump_file, "Function found to be non-looping: %s\n", + lang_hooks.decl_printable_name (current_function_decl, + 2)); + } + break; + + case IPA_PURE: + if (!TREE_READONLY (current_function_decl)) + { + DECL_PURE_P (current_function_decl) = 1; + DECL_LOOPING_CONST_OR_PURE_P (current_function_decl) = l->looping; + changed = true; + if (dump_file) + fprintf (dump_file, "Function found to be %spure: %s\n", + l->looping ? "looping " : "", + lang_hooks.decl_printable_name (current_function_decl, + 2)); + } + else if (DECL_LOOPING_CONST_OR_PURE_P (current_function_decl) + && !l->looping) + { + DECL_LOOPING_CONST_OR_PURE_P (current_function_decl) = false; + changed = true; + if (dump_file) + fprintf (dump_file, "Function found to be non-looping: %s\n", + lang_hooks.decl_printable_name (current_function_decl, + 2)); + } + break; + + default: + break; + } + if (!l->can_throw && !TREE_NOTHROW (current_function_decl)) + { + TREE_NOTHROW (current_function_decl) = 1; + changed = true; + if (dump_file) + fprintf (dump_file, "Function found to be nothrow: %s\n", + lang_hooks.decl_printable_name (current_function_decl, + 2)); + } + if (l) + free (l); + if (changed) + return execute_fixup_cfg (); + else + return 0; +} + +struct gimple_opt_pass pass_local_pure_const = +{ + { + GIMPLE_PASS, + "local-pure-const", /* name */ + gate_pure_const, /* gate */ + local_pure_const, /* execute */ + NULL, /* sub */ + NULL, /* next */ + 0, /* static_pass_number */ + TV_IPA_PURE_CONST, /* tv_id */ + 0, /* properties_required */ + 0, /* properties_provided */ + 0, /* properties_destroyed */ + 0, /* todo_flags_start */ + 0 /* todo_flags_finish */ + } +}; diff --git a/gcc/ipa-type-escape.c b/gcc/ipa-type-escape.c index 48d95049b4f..7349f6b8478 100644 --- a/gcc/ipa-type-escape.c +++ b/gcc/ipa-type-escape.c @@ -1987,9 +1987,7 @@ type_escape_execute (void) they may cause a type variable to escape. */ for (node = cgraph_nodes; node; node = node->next) - if (node->analyzed - && (cgraph_is_master_clone (node) - || (cgraph_function_body_availability (node) == AVAIL_OVERWRITABLE))) + if (node->analyzed) analyze_function (node); diff --git a/gcc/opts.c b/gcc/opts.c index 2d5184fcb0e..90f34df1dec 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -368,12 +368,6 @@ DEF_VEC_ALLOC_P(const_char_p,heap); static VEC(const_char_p,heap) *ignored_options; -/* Function calls disallowed under -Wdisallowed-function-list=... */ -static VEC(char_p,heap) *warning_disallowed_functions; - -/* If -Wdisallowed-function-list=... */ -bool warn_disallowed_functions = false; - /* Input file names. */ const char **in_fnames; unsigned num_in_fnames; @@ -741,38 +735,6 @@ flag_instrument_functions_exclude_p (tree fndecl) } -/* Return whether this function call is disallowed. */ -void -warn_if_disallowed_function_p (const_tree exp) -{ - if (TREE_CODE (exp) == CALL_EXPR - && VEC_length (char_p, warning_disallowed_functions) > 0) - { - int i; - char *s; - tree fndecl = get_callee_fndecl (exp); - const char *fnname; - - if (fndecl == NULL) - return; - - fnname = get_name (fndecl); - if (fnname == NULL) - return; - - for (i = 0; VEC_iterate (char_p, warning_disallowed_functions, i, s); - ++i) - { - if (strcmp (fnname, s) == 0) - { - warning (OPT_Wdisallowed_function_list_, - "disallowed call to %qs", fnname); - break; - } - } - } -} - /* Decode and handle the vector of command line options. LANG_MASK contains has a single bit set representing the current language. */ @@ -1635,12 +1597,6 @@ common_handle_option (size_t scode, const char *arg, int value, set_Wextra (value); break; - case OPT_Wdisallowed_function_list_: - warn_disallowed_functions = true; - add_comma_separated_to_vector - (&warning_disallowed_functions, arg); - break; - case OPT_Werror_: enable_warning_as_error (arg, value, lang_mask); break; diff --git a/gcc/passes.c b/gcc/passes.c index 4358b8202e6..41904a9ce6b 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -536,6 +536,7 @@ init_optimization_passes (void) NEXT_PASS (pass_early_local_passes); { struct opt_pass **p = &pass_early_local_passes.pass.sub; + NEXT_PASS (pass_fixup_cfg); NEXT_PASS (pass_tree_profile); NEXT_PASS (pass_cleanup_cfg); NEXT_PASS (pass_init_datastructures); @@ -561,7 +562,9 @@ init_optimization_passes (void) NEXT_PASS (pass_simple_dse); NEXT_PASS (pass_tail_recursion); NEXT_PASS (pass_convert_switch); + NEXT_PASS (pass_cleanup_eh); NEXT_PASS (pass_profile); + NEXT_PASS (pass_local_pure_const); } NEXT_PASS (pass_release_ssa_names); NEXT_PASS (pass_rebuild_cgraph_edges); @@ -587,6 +590,7 @@ init_optimization_passes (void) /* Initial scalar cleanups before alias computation. They ensure memory accesses are not indirect wherever possible. */ NEXT_PASS (pass_strip_predict_hints); + NEXT_PASS (pass_cleanup_eh); NEXT_PASS (pass_update_address_taken); NEXT_PASS (pass_rename_ssa_copies); NEXT_PASS (pass_complete_unrolli); @@ -684,6 +688,7 @@ init_optimization_passes (void) NEXT_PASS (pass_phi_only_cprop); NEXT_PASS (pass_cd_dce); NEXT_PASS (pass_tracer); + NEXT_PASS (pass_cleanup_eh); /* FIXME: If DCE is not run before checking for uninitialized uses, we may get false warnings (e.g., testsuite/gcc.dg/uninit-5.c). @@ -701,6 +706,7 @@ init_optimization_passes (void) NEXT_PASS (pass_tail_calls); NEXT_PASS (pass_rename_ssa_copies); NEXT_PASS (pass_uncprop); + NEXT_PASS (pass_local_pure_const); } NEXT_PASS (pass_del_ssa); NEXT_PASS (pass_nrv); @@ -878,11 +884,14 @@ do_per_function_toporder (void (*callback) (void *data), void *data) order = GGC_NEWVEC (struct cgraph_node *, cgraph_n_nodes); nnodes = cgraph_postorder (order); for (i = nnodes - 1; i >= 0; i--) + order[i]->process = 1; + for (i = nnodes - 1; i >= 0; i--) { struct cgraph_node *node = order[i]; /* Allow possibly removed nodes to be garbage collected. */ order[i] = NULL; + node->process = 0; if (node->analyzed && (node->needed || node->reachable)) { push_cfun (DECL_STRUCT_FUNCTION (node->decl)); @@ -1369,4 +1378,30 @@ execute_ipa_pass_list (struct opt_pass *pass) while (pass); } +/* Called by local passes to see if function is called by already processed nodes. + Because we process nodes in topological order, this means that function is + in recursive cycle or we introduced new direct calls. */ +bool +function_called_by_processed_nodes_p (void) +{ + struct cgraph_edge *e; + for (e = cgraph_node (current_function_decl)->callers; e; e = e->next_caller) + { + if (e->caller->decl == current_function_decl) + continue; + if (!e->caller->analyzed || (!e->caller->needed && !e->caller->reachable)) + continue; + if (TREE_ASM_WRITTEN (e->caller->decl)) + continue; + if (!e->caller->process && !e->caller->global.inlined_to) + break; + } + if (dump_file && e) + { + fprintf (dump_file, "Already processed call to:\n"); + dump_cgraph_node (dump_file, e->caller); + } + return e != NULL; +} + #include "gt-passes.h" diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog index 29de0d37a90..01921888d93 100644 --- a/gcc/po/ChangeLog +++ b/gcc/po/ChangeLog @@ -1,3 +1,12 @@ +2009-03-28 Joseph Myers <joseph@codesourcery.com> + + * gcc.pot: Regenerate. + +2009-03-28 Joseph Myers <joseph@codesourcery.com> + + * EXCLUDES (fix-header.c, gen-protos.c, scan-decls.c, scan.c, + scan.h): Remove. + 2009-03-03 Joseph Myers <joseph@codesourcery.com> * es.po: Update. diff --git a/gcc/po/EXCLUDES b/gcc/po/EXCLUDES index e9c5db11015..a0776bd879b 100644 --- a/gcc/po/EXCLUDES +++ b/gcc/po/EXCLUDES @@ -43,8 +43,6 @@ unwind.h # These programs are meant to be executed only by GCC maintainers or # installers. Such files do not need to be translated, as these # people typically need to be able to read English anyway. -fix-header.c -gen-protos.c genattr.c genattrtab.c genautomata.c @@ -66,9 +64,6 @@ genpreds.c genrecog.c gensupport.c gensupport.h -scan-decls.c -scan.c -scan.h # These files are not yet internationalized, because they contain # many strings that require a lot of analysis, and are little-used. diff --git a/gcc/po/gcc.pot b/gcc/po/gcc.pot index 2414e0ba22f..32bbfbd6b9d 100644 --- a/gcc/po/gcc.pot +++ b/gcc/po/gcc.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n" -"POT-Creation-Date: 2008-11-18 20:02+0000\n" +"POT-Creation-Date: 2009-03-28 07:02+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -16,7 +16,7 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: c-decl.c:3815 +#: c-decl.c:3819 msgid "<anonymous>" msgstr "" @@ -277,58 +277,58 @@ msgstr "" msgid "field precision" msgstr "" -#: c-opts.c:1459 fortran/cpp.c:548 +#: c-opts.c:1468 fortran/cpp.c:552 msgid "<built-in>" msgstr "" #. Handle deferred options from command-line. -#: c-opts.c:1477 fortran/cpp.c:553 +#: c-opts.c:1486 fortran/cpp.c:557 msgid "<command-line>" msgstr "" -#: c-typeck.c:2473 c-typeck.c:4943 c-typeck.c:4946 c-typeck.c:4954 -#: c-typeck.c:4984 c-typeck.c:6354 +#: c-typeck.c:2491 c-typeck.c:4961 c-typeck.c:4964 c-typeck.c:4972 +#: c-typeck.c:5002 c-typeck.c:6388 msgid "initializer element is not constant" msgstr "" -#: c-typeck.c:4733 +#: c-typeck.c:4751 msgid "array initialized from parenthesized string constant" msgstr "" -#: c-typeck.c:4795 cp/typeck2.c:757 +#: c-typeck.c:4813 cp/typeck2.c:757 #, gcc-internal-format msgid "char-array initialized from wide string" msgstr "" -#: c-typeck.c:4803 +#: c-typeck.c:4821 msgid "wide character array initialized from non-wide string" msgstr "" -#: c-typeck.c:4809 +#: c-typeck.c:4827 msgid "wide character array initialized from incompatible wide string" msgstr "" -#: c-typeck.c:4827 cp/typeck2.c:785 +#: c-typeck.c:4845 cp/typeck2.c:785 #, gcc-internal-format msgid "initializer-string for array of chars is too long" msgstr "" -#: c-typeck.c:4833 +#: c-typeck.c:4851 msgid "array of inappropriate type initialized from string constant" msgstr "" #. ??? This should not be an error when inlining calls to #. unprototyped functions. -#: c-typeck.c:4900 c-typeck.c:4403 cp/typeck.c:1631 +#: c-typeck.c:4918 c-typeck.c:4421 cp/typeck.c:1645 #, gcc-internal-format msgid "invalid use of non-lvalue array" msgstr "" -#: c-typeck.c:4926 +#: c-typeck.c:4944 msgid "array initialized from non-constant array expression" msgstr "" -#: c-typeck.c:4991 c-typeck.c:6359 +#: c-typeck.c:5009 c-typeck.c:6393 #, gcc-internal-format msgid "initializer element is not computable at load time" msgstr "" @@ -337,108 +337,108 @@ msgstr "" #. of VLAs themselves count as VLAs, it does not make #. sense to permit them to be initialized given that #. ordinary VLAs may not be initialized. -#: c-typeck.c:5002 c-decl.c:3220 c-decl.c:3235 +#: c-typeck.c:5020 c-decl.c:3224 c-decl.c:3239 #, gcc-internal-format msgid "variable-sized object may not be initialized" msgstr "" -#: c-typeck.c:5006 +#: c-typeck.c:5024 msgid "invalid initializer" msgstr "" -#: c-typeck.c:5480 +#: c-typeck.c:5498 msgid "extra brace group at end of initializer" msgstr "" -#: c-typeck.c:5500 +#: c-typeck.c:5518 msgid "missing braces around initializer" msgstr "" -#: c-typeck.c:5561 +#: c-typeck.c:5579 msgid "braces around scalar initializer" msgstr "" -#: c-typeck.c:5618 +#: c-typeck.c:5636 msgid "initialization of flexible array member in a nested context" msgstr "" -#: c-typeck.c:5621 +#: c-typeck.c:5639 msgid "initialization of a flexible array member" msgstr "" -#: c-typeck.c:5649 +#: c-typeck.c:5667 msgid "missing initializer" msgstr "" -#: c-typeck.c:5671 +#: c-typeck.c:5689 msgid "empty scalar initializer" msgstr "" -#: c-typeck.c:5676 +#: c-typeck.c:5694 msgid "extra elements in scalar initializer" msgstr "" -#: c-typeck.c:5773 c-typeck.c:5833 +#: c-typeck.c:5791 c-typeck.c:5851 msgid "array index in non-array initializer" msgstr "" -#: c-typeck.c:5778 c-typeck.c:5886 +#: c-typeck.c:5796 c-typeck.c:5904 msgid "field name not in record or union initializer" msgstr "" -#: c-typeck.c:5824 +#: c-typeck.c:5842 msgid "array index in initializer not of integer type" msgstr "" -#: c-typeck.c:5829 c-typeck.c:5831 +#: c-typeck.c:5847 c-typeck.c:5849 msgid "nonconstant array index in initializer" msgstr "" -#: c-typeck.c:5835 c-typeck.c:5838 +#: c-typeck.c:5853 c-typeck.c:5856 msgid "array index in initializer exceeds array bounds" msgstr "" -#: c-typeck.c:5849 +#: c-typeck.c:5867 msgid "empty index range in initializer" msgstr "" -#: c-typeck.c:5858 +#: c-typeck.c:5876 msgid "array index range in initializer exceeds array bounds" msgstr "" -#: c-typeck.c:5933 c-typeck.c:5956 c-typeck.c:6423 +#: c-typeck.c:5958 c-typeck.c:5984 c-typeck.c:6460 msgid "initialized field with side-effects overwritten" msgstr "" -#: c-typeck.c:5935 c-typeck.c:5958 c-typeck.c:6425 +#: c-typeck.c:5960 c-typeck.c:5986 c-typeck.c:6462 msgid "initialized field overwritten" msgstr "" -#: c-typeck.c:6633 +#: c-typeck.c:6676 msgid "excess elements in char array initializer" msgstr "" -#: c-typeck.c:6640 c-typeck.c:6687 +#: c-typeck.c:6683 c-typeck.c:6730 msgid "excess elements in struct initializer" msgstr "" -#: c-typeck.c:6702 +#: c-typeck.c:6745 msgid "non-static initialization of a flexible array member" msgstr "" -#: c-typeck.c:6771 +#: c-typeck.c:6814 msgid "excess elements in union initializer" msgstr "" -#: c-typeck.c:6859 +#: c-typeck.c:6902 msgid "excess elements in array initializer" msgstr "" -#: c-typeck.c:6890 +#: c-typeck.c:6933 msgid "excess elements in vector initializer" msgstr "" -#: c-typeck.c:6915 +#: c-typeck.c:6958 msgid "excess elements in scalar initializer" msgstr "" @@ -478,146 +478,146 @@ msgstr "" msgid "mismatched arguments" msgstr "" -#: collect2.c:395 gcc.c:6987 +#: collect2.c:396 gcc.c:7008 #, c-format msgid "internal gcc abort in %s, at %s:%d" msgstr "" -#: collect2.c:909 +#: collect2.c:910 #, c-format msgid "no arguments" msgstr "" -#: collect2.c:1283 collect2.c:1431 collect2.c:1466 +#: collect2.c:1284 collect2.c:1432 collect2.c:1467 #, c-format msgid "fopen %s" msgstr "" -#: collect2.c:1286 collect2.c:1436 collect2.c:1469 +#: collect2.c:1287 collect2.c:1437 collect2.c:1470 #, c-format msgid "fclose %s" msgstr "" -#: collect2.c:1295 +#: collect2.c:1296 #, c-format msgid "collect2 version %s" msgstr "" -#: collect2.c:1385 +#: collect2.c:1386 #, c-format msgid "%d constructor(s) found\n" msgstr "" -#: collect2.c:1386 +#: collect2.c:1387 #, c-format msgid "%d destructor(s) found\n" msgstr "" -#: collect2.c:1387 +#: collect2.c:1388 #, c-format msgid "%d frame table(s) found\n" msgstr "" -#: collect2.c:1524 +#: collect2.c:1525 #, c-format msgid "can't get program status" msgstr "" -#: collect2.c:1593 +#: collect2.c:1594 #, c-format msgid "could not open response file %s" msgstr "" -#: collect2.c:1598 +#: collect2.c:1599 #, c-format msgid "could not write to response file %s" msgstr "" -#: collect2.c:1603 +#: collect2.c:1604 #, c-format msgid "could not close response file %s" msgstr "" -#: collect2.c:1621 +#: collect2.c:1622 #, c-format msgid "[cannot find %s]" msgstr "" -#: collect2.c:1636 +#: collect2.c:1637 #, c-format msgid "cannot find '%s'" msgstr "" -#: collect2.c:1640 collect2.c:2131 collect2.c:2286 gcc.c:2994 +#: collect2.c:1641 collect2.c:2132 collect2.c:2287 gcc.c:2994 #, c-format msgid "pex_init failed" msgstr "" -#: collect2.c:1678 +#: collect2.c:1679 #, c-format msgid "[Leaving %s]\n" msgstr "" -#: collect2.c:1899 +#: collect2.c:1900 #, c-format msgid "" "\n" "write_c_file - output name is %s, prefix is %s\n" msgstr "" -#: collect2.c:2105 +#: collect2.c:2106 #, c-format msgid "cannot find 'nm'" msgstr "" -#: collect2.c:2152 +#: collect2.c:2153 #, c-format msgid "can't open nm output" msgstr "" -#: collect2.c:2196 +#: collect2.c:2197 #, c-format msgid "init function found in object %s" msgstr "" -#: collect2.c:2204 +#: collect2.c:2205 #, c-format msgid "fini function found in object %s" msgstr "" -#: collect2.c:2307 +#: collect2.c:2308 #, c-format msgid "can't open ldd output" msgstr "" -#: collect2.c:2310 +#: collect2.c:2311 #, c-format msgid "" "\n" "ldd output with constructors/destructors.\n" msgstr "" -#: collect2.c:2325 +#: collect2.c:2326 #, c-format msgid "dynamic dependency %s not found" msgstr "" -#: collect2.c:2337 +#: collect2.c:2338 #, c-format msgid "unable to open dynamic dependency '%s'" msgstr "" -#: collect2.c:2493 +#: collect2.c:2494 #, c-format msgid "%s: not a COFF file" msgstr "" -#: collect2.c:2613 +#: collect2.c:2614 #, c-format msgid "%s: cannot open as COFF file" msgstr "" -#: collect2.c:2671 +#: collect2.c:2672 #, c-format msgid "library lib%s not found" msgstr "" @@ -708,14 +708,14 @@ msgstr "" #. handle them. #. We can't handle floating point constants; #. PRINT_OPERAND must handle them. -#: final.c:3481 vmsdbgout.c:487 config/i386/i386.c:9865 -#: config/pdp11/pdp11.c:1710 +#: final.c:3493 vmsdbgout.c:487 config/i386/i386.c:10157 +#: config/pdp11/pdp11.c:1677 #, c-format msgid "floating constant misused" msgstr "" -#: final.c:3543 vmsdbgout.c:544 config/i386/i386.c:9952 -#: config/pdp11/pdp11.c:1757 +#: final.c:3555 vmsdbgout.c:544 config/i386/i386.c:10244 +#: config/pdp11/pdp11.c:1724 #, c-format msgid "invalid expression as operand" msgstr "" @@ -789,7 +789,7 @@ msgstr "" msgid "spec file has no spec for linking" msgstr "" -#: gcc.c:2615 gcc.c:4824 +#: gcc.c:2615 gcc.c:4842 #, c-format msgid "%s\n" msgstr "" @@ -856,8 +856,8 @@ msgstr "" #: gcc.c:3231 msgid "" -" --help={target|optimizers|warnings|undocumented|params}[,{[^]joined|[^]" -"separate}]\n" +" --help={target|optimizers|warnings|params|[^]{joined|separate|" +"undocumented}}[,...]\n" msgstr "" #: gcc.c:3232 @@ -870,174 +870,178 @@ msgid " (Use '-v --help' to display command line options of sub-processes)\n" msgstr "" #: gcc.c:3235 -msgid " -dumpspecs Display all of the built in spec strings\n" +msgid " --version Display compiler version information\n" msgstr "" #: gcc.c:3236 -msgid " -dumpversion Display the version of the compiler\n" +msgid " -dumpspecs Display all of the built in spec strings\n" msgstr "" #: gcc.c:3237 -msgid " -dumpmachine Display the compiler's target processor\n" +msgid " -dumpversion Display the version of the compiler\n" msgstr "" #: gcc.c:3238 +msgid " -dumpmachine Display the compiler's target processor\n" +msgstr "" + +#: gcc.c:3239 msgid "" " -print-search-dirs Display the directories in the compiler's search " "path\n" msgstr "" -#: gcc.c:3239 +#: gcc.c:3240 msgid "" " -print-libgcc-file-name Display the name of the compiler's companion " "library\n" msgstr "" -#: gcc.c:3240 +#: gcc.c:3241 msgid " -print-file-name=<lib> Display the full path to library <lib>\n" msgstr "" -#: gcc.c:3241 +#: gcc.c:3242 msgid "" " -print-prog-name=<prog> Display the full path to compiler component " "<prog>\n" msgstr "" -#: gcc.c:3242 +#: gcc.c:3243 msgid "" " -print-multi-directory Display the root directory for versions of " "libgcc\n" msgstr "" -#: gcc.c:3243 +#: gcc.c:3244 msgid "" " -print-multi-lib Display the mapping between command line options " "and\n" " multiple library search directories\n" msgstr "" -#: gcc.c:3246 +#: gcc.c:3247 msgid " -print-multi-os-directory Display the relative path to OS libraries\n" msgstr "" -#: gcc.c:3247 +#: gcc.c:3248 msgid " -print-sysroot Display the target libraries directory\n" msgstr "" -#: gcc.c:3248 +#: gcc.c:3249 msgid "" " -print-sysroot-headers-suffix Display the sysroot suffix used to find " "headers\n" msgstr "" -#: gcc.c:3249 +#: gcc.c:3250 msgid "" " -Wa,<options> Pass comma-separated <options> on to the " "assembler\n" msgstr "" -#: gcc.c:3250 +#: gcc.c:3251 msgid "" " -Wp,<options> Pass comma-separated <options> on to the " "preprocessor\n" msgstr "" -#: gcc.c:3251 +#: gcc.c:3252 msgid "" " -Wl,<options> Pass comma-separated <options> on to the linker\n" msgstr "" -#: gcc.c:3252 +#: gcc.c:3253 msgid " -Xassembler <arg> Pass <arg> on to the assembler\n" msgstr "" -#: gcc.c:3253 +#: gcc.c:3254 msgid " -Xpreprocessor <arg> Pass <arg> on to the preprocessor\n" msgstr "" -#: gcc.c:3254 +#: gcc.c:3255 msgid " -Xlinker <arg> Pass <arg> on to the linker\n" msgstr "" -#: gcc.c:3255 +#: gcc.c:3256 msgid "" " -combine Pass multiple source files to compiler at once\n" msgstr "" -#: gcc.c:3256 +#: gcc.c:3257 msgid " -save-temps Do not delete intermediate files\n" msgstr "" -#: gcc.c:3257 +#: gcc.c:3258 msgid " -pipe Use pipes rather than intermediate files\n" msgstr "" -#: gcc.c:3258 +#: gcc.c:3259 msgid " -time Time the execution of each subprocess\n" msgstr "" -#: gcc.c:3259 +#: gcc.c:3260 msgid "" " -specs=<file> Override built-in specs with the contents of " "<file>\n" msgstr "" -#: gcc.c:3260 +#: gcc.c:3261 msgid "" " -std=<standard> Assume that the input sources are for <standard>\n" msgstr "" -#: gcc.c:3261 +#: gcc.c:3262 msgid "" " --sysroot=<directory> Use <directory> as the root directory for " "headers\n" " and libraries\n" msgstr "" -#: gcc.c:3264 +#: gcc.c:3265 msgid "" " -B <directory> Add <directory> to the compiler's search paths\n" msgstr "" -#: gcc.c:3265 +#: gcc.c:3266 msgid " -b <machine> Run gcc for target <machine>, if installed\n" msgstr "" -#: gcc.c:3266 +#: gcc.c:3267 msgid "" " -V <version> Run gcc version number <version>, if installed\n" msgstr "" -#: gcc.c:3267 +#: gcc.c:3268 msgid "" " -v Display the programs invoked by the compiler\n" msgstr "" -#: gcc.c:3268 +#: gcc.c:3269 msgid "" " -### Like -v but options quoted and commands not " "executed\n" msgstr "" -#: gcc.c:3269 +#: gcc.c:3270 msgid "" " -E Preprocess only; do not compile, assemble or " "link\n" msgstr "" -#: gcc.c:3270 +#: gcc.c:3271 msgid " -S Compile only; do not assemble or link\n" msgstr "" -#: gcc.c:3271 +#: gcc.c:3272 msgid " -c Compile and assemble, but do not link\n" msgstr "" -#: gcc.c:3272 +#: gcc.c:3273 msgid " -o <file> Place the output into <file>\n" msgstr "" -#: gcc.c:3273 +#: gcc.c:3274 msgid "" " -x <language> Specify the language of the following input " "files\n" @@ -1048,7 +1052,7 @@ msgid "" "extension\n" msgstr "" -#: gcc.c:3280 +#: gcc.c:3281 #, c-format msgid "" "\n" @@ -1057,27 +1061,32 @@ msgid "" " other options on to these processes the -W<letter> options must be used.\n" msgstr "" -#: gcc.c:3403 +#: gcc.c:3411 #, c-format msgid "'-%c' option must have argument" msgstr "" -#: gcc.c:3424 +#: gcc.c:3437 #, c-format msgid "couldn't run '%s': %s" msgstr "" +#: gcc.c:3439 +#, c-format +msgid "couldn't run '%s': %s: %s" +msgstr "" + #. translate_options () has turned --version into -fversion. -#: gcc.c:3625 +#: gcc.c:3643 #, c-format msgid "%s %s%s\n" msgstr "" -#: gcc.c:3628 gcov.c:430 fortran/gfortranspec.c:383 java/jcf-dump.c:1170 +#: gcc.c:3646 gcov.c:430 fortran/gfortranspec.c:383 java/jcf-dump.c:1170 msgid "(C)" msgstr "" -#: gcc.c:3629 java/jcf-dump.c:1171 +#: gcc.c:3647 java/jcf-dump.c:1171 #, c-format msgid "" "This is free software; see the source for copying conditions. There is NO\n" @@ -1085,212 +1094,212 @@ msgid "" "\n" msgstr "" -#: gcc.c:3743 +#: gcc.c:3761 #, c-format msgid "argument to '-Xlinker' is missing" msgstr "" -#: gcc.c:3751 +#: gcc.c:3769 #, c-format msgid "argument to '-Xpreprocessor' is missing" msgstr "" -#: gcc.c:3758 +#: gcc.c:3776 #, c-format msgid "argument to '-Xassembler' is missing" msgstr "" -#: gcc.c:3765 +#: gcc.c:3783 #, c-format msgid "argument to '-l' is missing" msgstr "" -#: gcc.c:3786 +#: gcc.c:3804 #, c-format msgid "argument to '-specs' is missing" msgstr "" -#: gcc.c:3800 +#: gcc.c:3818 #, c-format msgid "argument to '-specs=' is missing" msgstr "" -#: gcc.c:3822 +#: gcc.c:3840 #, c-format msgid "argument to '-wrapper' is missing" msgstr "" -#: gcc.c:3850 +#: gcc.c:3868 #, c-format msgid "'-%c' must come at the start of the command line" msgstr "" -#: gcc.c:3859 +#: gcc.c:3877 #, c-format msgid "argument to '-B' is missing" msgstr "" -#: gcc.c:4213 +#: gcc.c:4231 #, c-format msgid "argument to '-x' is missing" msgstr "" -#: gcc.c:4241 +#: gcc.c:4259 #, c-format msgid "argument to '-%s' is missing" msgstr "" -#: gcc.c:4614 +#: gcc.c:4632 #, c-format msgid "switch '%s' does not start with '-'" msgstr "" -#: gcc.c:4758 +#: gcc.c:4776 #, c-format msgid "spec '%s' invalid" msgstr "" -#: gcc.c:4897 +#: gcc.c:4915 #, c-format msgid "spec '%s' has invalid '%%0%c'" msgstr "" -#: gcc.c:5126 +#: gcc.c:5144 #, c-format msgid "could not open temporary response file %s" msgstr "" -#: gcc.c:5132 +#: gcc.c:5150 #, c-format msgid "could not write to temporary response file %s" msgstr "" -#: gcc.c:5138 +#: gcc.c:5156 #, c-format msgid "could not close temporary response file %s" msgstr "" -#: gcc.c:5172 +#: gcc.c:5190 #, c-format msgid "spec '%s' has invalid '%%W%c" msgstr "" -#: gcc.c:5192 +#: gcc.c:5210 #, c-format msgid "spec '%s' has invalid '%%x%c'" msgstr "" -#: gcc.c:5414 +#: gcc.c:5432 #, c-format msgid "Processing spec %c%s%c, which is '%s'\n" msgstr "" -#: gcc.c:5538 +#: gcc.c:5556 #, c-format msgid "unknown spec function '%s'" msgstr "" -#: gcc.c:5557 +#: gcc.c:5575 #, c-format msgid "error in args to spec function '%s'" msgstr "" -#: gcc.c:5605 +#: gcc.c:5623 #, c-format msgid "malformed spec function name" msgstr "" #. ) -#: gcc.c:5608 +#: gcc.c:5626 #, c-format msgid "no arguments for spec function" msgstr "" -#: gcc.c:5627 +#: gcc.c:5645 #, c-format msgid "malformed spec function arguments" msgstr "" -#: gcc.c:5873 +#: gcc.c:5891 #, c-format msgid "braced spec '%s' is invalid at '%c'" msgstr "" -#: gcc.c:5961 +#: gcc.c:5979 #, c-format msgid "braced spec body '%s' is invalid" msgstr "" -#: gcc.c:6499 +#: gcc.c:6517 #, c-format msgid "install: %s%s\n" msgstr "" -#: gcc.c:6502 +#: gcc.c:6520 #, c-format msgid "programs: %s\n" msgstr "" -#: gcc.c:6504 +#: gcc.c:6522 #, c-format msgid "libraries: %s\n" msgstr "" #. The error status indicates that only one set of fixed #. headers should be built. -#: gcc.c:6570 +#: gcc.c:6588 #, c-format msgid "not configured with sysroot headers suffix" msgstr "" -#: gcc.c:6579 +#: gcc.c:6597 #, c-format msgid "" "\n" "For bug reporting instructions, please see:\n" msgstr "" -#: gcc.c:6595 +#: gcc.c:6616 #, c-format msgid "Target: %s\n" msgstr "" -#: gcc.c:6596 +#: gcc.c:6617 #, c-format msgid "Configured with: %s\n" msgstr "" -#: gcc.c:6610 +#: gcc.c:6631 #, c-format msgid "Thread model: %s\n" msgstr "" -#: gcc.c:6621 +#: gcc.c:6642 #, c-format msgid "gcc version %s %s\n" msgstr "" -#: gcc.c:6623 +#: gcc.c:6644 #, c-format msgid "gcc driver version %s %sexecuting gcc version %s\n" msgstr "" -#: gcc.c:6631 +#: gcc.c:6652 #, c-format msgid "no input files" msgstr "" -#: gcc.c:6680 +#: gcc.c:6701 #, c-format msgid "cannot specify -o with -c or -S with multiple files" msgstr "" -#: gcc.c:6714 +#: gcc.c:6735 #, c-format msgid "spec '%s' is invalid" msgstr "" -#: gcc.c:6850 +#: gcc.c:6871 #, c-format msgid "" "\n" @@ -1299,59 +1308,59 @@ msgid "" "\n" msgstr "" -#: gcc.c:6851 +#: gcc.c:6872 #, c-format msgid "" "Use \"-Wl,OPTION\" to pass \"OPTION\" to the linker.\n" "\n" msgstr "" -#: gcc.c:7203 +#: gcc.c:7224 #, c-format msgid "multilib spec '%s' is invalid" msgstr "" -#: gcc.c:7394 +#: gcc.c:7415 #, c-format msgid "multilib exclusions '%s' is invalid" msgstr "" -#: gcc.c:7452 gcc.c:7593 +#: gcc.c:7473 gcc.c:7614 #, c-format msgid "multilib select '%s' is invalid" msgstr "" -#: gcc.c:7631 +#: gcc.c:7652 #, c-format msgid "multilib exclusion '%s' is invalid" msgstr "" -#: gcc.c:7837 +#: gcc.c:7858 #, c-format msgid "environment variable \"%s\" not defined" msgstr "" -#: gcc.c:7928 gcc.c:7933 +#: gcc.c:7949 gcc.c:7954 #, c-format msgid "invalid version number `%s'" msgstr "" -#: gcc.c:7976 +#: gcc.c:7997 #, c-format msgid "too few arguments to %%:version-compare" msgstr "" -#: gcc.c:7982 +#: gcc.c:8003 #, c-format msgid "too many arguments to %%:version-compare" msgstr "" -#: gcc.c:8023 +#: gcc.c:8044 #, c-format msgid "unknown operator '%s' in %%:version-compare" msgstr "" -#: gcc.c:8057 +#: gcc.c:8078 #, c-format msgid "" "Assembler options\n" @@ -1359,7 +1368,7 @@ msgid "" "\n" msgstr "" -#: gcc.c:8058 +#: gcc.c:8079 #, c-format msgid "" "Use \"-Wa,OPTION\" to pass \"OPTION\" to the assembler.\n" @@ -1700,12 +1709,12 @@ msgid "End of search list.\n" msgstr "" #. Opening quotation mark. -#: intl.c:57 +#: intl.c:58 msgid "`" msgstr "" #. Closing quotation mark. -#: intl.c:60 +#: intl.c:61 msgid "'" msgstr "" @@ -1782,19 +1791,19 @@ msgstr "" msgid " inlined from %qs" msgstr "" -#: loop-iv.c:2806 tree-ssa-loop-niter.c:1845 +#: loop-iv.c:2823 tree-ssa-loop-niter.c:1871 msgid "assuming that the loop is not infinite" msgstr "" -#: loop-iv.c:2807 tree-ssa-loop-niter.c:1846 +#: loop-iv.c:2824 tree-ssa-loop-niter.c:1872 msgid "cannot optimize possibly infinite loops" msgstr "" -#: loop-iv.c:2815 tree-ssa-loop-niter.c:1850 +#: loop-iv.c:2832 tree-ssa-loop-niter.c:1876 msgid "assuming that the loop counter does not overflow" msgstr "" -#: loop-iv.c:2816 tree-ssa-loop-niter.c:1851 +#: loop-iv.c:2833 tree-ssa-loop-niter.c:1877 msgid "cannot optimize loop, the loop counter may overflow" msgstr "" @@ -1802,382 +1811,87 @@ msgstr "" msgid "This switch lacks documentation" msgstr "" -#: opts.c:1288 +#: opts.c:1306 msgid "[enabled]" msgstr "" -#: opts.c:1288 +#: opts.c:1306 msgid "[disabled]" msgstr "" -#: opts.c:1303 +#: opts.c:1321 #, c-format msgid " No options with the desired characteristics were found\n" msgstr "" -#: opts.c:1312 +#: opts.c:1330 #, c-format msgid "" " None found. Use --help=%s to show *all* the options supported by the %s " "front-end\n" msgstr "" -#: opts.c:1318 +#: opts.c:1336 #, c-format msgid "" " All options with the desired characteristics have already been displayed\n" msgstr "" -#: opts.c:1372 +#: opts.c:1390 msgid "The following options are target specific" msgstr "" -#: opts.c:1375 +#: opts.c:1393 msgid "The following options control compiler warning messages" msgstr "" -#: opts.c:1378 +#: opts.c:1396 msgid "The following options control optimizations" msgstr "" -#: opts.c:1381 opts.c:1416 +#: opts.c:1399 opts.c:1438 msgid "The following options are language-independent" msgstr "" -#: opts.c:1384 +#: opts.c:1402 msgid "The --param option recognizes the following as parameters" msgstr "" -#: opts.c:1390 +#: opts.c:1408 msgid "The following options are specific to just the language " msgstr "" -#: opts.c:1392 +#: opts.c:1410 msgid "The following options are supported by the language " msgstr "" -#: opts.c:1403 +#: opts.c:1421 msgid "The following options are not documented" msgstr "" -#: opts.c:1414 -msgid "The following options are language-related" -msgstr "" - -#: opts.c:1567 -#, c-format -msgid "warning: --help argument %.*s is ambiguous, please be more specific\n" -msgstr "" - -#: opts.c:1575 -#, c-format -msgid "warning: unrecognized argument to --help= option: %.*s\n" -msgstr "" - -#: protoize.c:583 -#, c-format -msgid "%s: error writing file '%s': %s\n" -msgstr "" - -#: protoize.c:627 -#, c-format -msgid "%s: usage '%s [ -VqfnkN ] [ -i <istring> ] [ filename ... ]'\n" -msgstr "" - -#: protoize.c:630 -#, c-format -msgid "%s: usage '%s [ -VqfnkNlgC ] [ -B <dirname> ] [ filename ... ]'\n" -msgstr "" - -#: protoize.c:731 -#, c-format -msgid "%s: warning: no read access for file '%s'\n" -msgstr "" - -#: protoize.c:739 -#, c-format -msgid "%s: warning: no write access for file '%s'\n" -msgstr "" - -#: protoize.c:747 -#, c-format -msgid "%s: warning: no write access for dir containing '%s'\n" -msgstr "" - -#. Catch cases like /.. where we try to backup to a -#. point above the absolute root of the logical file -#. system. -#: protoize.c:1134 -#, c-format -msgid "%s: invalid file name: %s\n" -msgstr "" - -#: protoize.c:1282 -#, c-format -msgid "%s: %s: can't get status: %s\n" -msgstr "" - -#: protoize.c:1303 -#, c-format -msgid "" -"\n" -"%s: fatal error: aux info file corrupted at line %d\n" -msgstr "" - -#: protoize.c:1632 -#, c-format -msgid "%s:%d: declaration of function '%s' takes different forms\n" -msgstr "" - -#: protoize.c:1887 -#, c-format -msgid "%s: compiling '%s'\n" -msgstr "" - -#: protoize.c:1910 -#, c-format -msgid "%s: wait: %s\n" -msgstr "" - -#: protoize.c:1915 -#, c-format -msgid "%s: subprocess got fatal signal %d\n" -msgstr "" - -#: protoize.c:1923 -#, c-format -msgid "%s: %s exited with status %d\n" -msgstr "" - -#: protoize.c:1972 -#, c-format -msgid "%s: warning: missing SYSCALLS file '%s'\n" -msgstr "" - -#: protoize.c:1981 protoize.c:2010 -#, c-format -msgid "%s: can't read aux info file '%s': %s\n" -msgstr "" - -#: protoize.c:2026 protoize.c:2054 -#, c-format -msgid "%s: can't get status of aux info file '%s': %s\n" -msgstr "" - -#: protoize.c:2082 -#, c-format -msgid "%s: can't open aux info file '%s' for reading: %s\n" -msgstr "" - -#: protoize.c:2100 -#, c-format -msgid "%s: error reading aux info file '%s': %s\n" -msgstr "" - -#: protoize.c:2113 -#, c-format -msgid "%s: error closing aux info file '%s': %s\n" -msgstr "" - -#: protoize.c:2129 -#, c-format -msgid "%s: can't delete aux info file '%s': %s\n" -msgstr "" - -#: protoize.c:2211 protoize.c:4181 -#, c-format -msgid "%s: can't delete file '%s': %s\n" -msgstr "" - -#: protoize.c:2289 -#, c-format -msgid "%s: warning: can't rename file '%s' to '%s': %s\n" -msgstr "" - -#: protoize.c:2411 -#, c-format -msgid "%s: conflicting extern definitions of '%s'\n" -msgstr "" - -#: protoize.c:2415 -#, c-format -msgid "%s: declarations of '%s' will not be converted\n" -msgstr "" - -#: protoize.c:2417 -#, c-format -msgid "%s: conflict list for '%s' follows:\n" -msgstr "" - -#: protoize.c:2450 -#, c-format -msgid "%s: warning: using formals list from %s(%d) for function '%s'\n" -msgstr "" - -#: protoize.c:2490 -#, c-format -msgid "%s: %d: '%s' used but missing from SYSCALLS\n" -msgstr "" - -#: protoize.c:2496 -#, c-format -msgid "%s: %d: warning: no extern definition for '%s'\n" -msgstr "" - -#: protoize.c:2526 -#, c-format -msgid "%s: warning: no static definition for '%s' in file '%s'\n" -msgstr "" - -#: protoize.c:2532 -#, c-format -msgid "%s: multiple static defs of '%s' in file '%s'\n" -msgstr "" - -#: protoize.c:2702 protoize.c:2705 -#, c-format -msgid "%s: %d: warning: source too confusing\n" -msgstr "" - -#: protoize.c:2900 -#, c-format -msgid "%s: %d: warning: varargs function declaration not converted\n" -msgstr "" - -#: protoize.c:2915 -#, c-format -msgid "%s: declaration of function '%s' not converted\n" -msgstr "" - -#: protoize.c:3038 -#, c-format -msgid "%s: warning: too many parameter lists in declaration of '%s'\n" +#: opts.c:1423 +msgid "The following options take separate arguments" msgstr "" -#: protoize.c:3059 -#, c-format -msgid "" -"\n" -"%s: warning: too few parameter lists in declaration of '%s'\n" +#: opts.c:1425 +msgid "The following options take joined arguments" msgstr "" -#: protoize.c:3155 -#, c-format -msgid "%s: %d: warning: found '%s' but expected '%s'\n" -msgstr "" - -#: protoize.c:3330 -#, c-format -msgid "%s: local declaration for function '%s' not inserted\n" -msgstr "" - -#: protoize.c:3357 -#, c-format -msgid "" -"\n" -"%s: %d: warning: can't add declaration of '%s' into macro call\n" -msgstr "" - -#: protoize.c:3429 -#, c-format -msgid "%s: global declarations for file '%s' not inserted\n" -msgstr "" - -#: protoize.c:3519 protoize.c:3549 -#, c-format -msgid "%s: definition of function '%s' not converted\n" -msgstr "" - -#: protoize.c:3538 -#, c-format -msgid "%s: %d: warning: definition of %s not converted\n" -msgstr "" - -#: protoize.c:3864 -#, c-format -msgid "%s: found definition of '%s' at %s(%d)\n" -msgstr "" - -#. If we make it here, then we did not know about this -#. function definition. -#: protoize.c:3880 -#, c-format -msgid "%s: %d: warning: '%s' excluded by preprocessing\n" -msgstr "" - -#: protoize.c:3883 -#, c-format -msgid "%s: function definition not converted\n" -msgstr "" - -#: protoize.c:3941 -#, c-format -msgid "%s: '%s' not converted\n" -msgstr "" - -#: protoize.c:3949 -#, c-format -msgid "%s: would convert file '%s'\n" -msgstr "" - -#: protoize.c:3952 -#, c-format -msgid "%s: converting file '%s'\n" -msgstr "" - -#: protoize.c:3962 -#, c-format -msgid "%s: can't get status for file '%s': %s\n" -msgstr "" - -#: protoize.c:4004 -#, c-format -msgid "%s: can't open file '%s' for reading: %s\n" -msgstr "" - -#: protoize.c:4019 -#, c-format -msgid "" -"\n" -"%s: error reading input file '%s': %s\n" -msgstr "" - -#: protoize.c:4053 -#, c-format -msgid "%s: can't create/open clean file '%s': %s\n" -msgstr "" - -#: protoize.c:4158 -#, c-format -msgid "%s: warning: file '%s' already saved in '%s'\n" -msgstr "" - -#: protoize.c:4166 -#, c-format -msgid "%s: can't link file '%s' to '%s': %s\n" -msgstr "" - -#: protoize.c:4196 -#, c-format -msgid "%s: can't create/open output file '%s': %s\n" -msgstr "" - -#: protoize.c:4229 -#, c-format -msgid "%s: can't change mode of file '%s': %s\n" +#: opts.c:1436 +msgid "The following options are language-related" msgstr "" -#: protoize.c:4405 +#: opts.c:1596 #, c-format -msgid "%s: cannot get working directory: %s\n" +msgid "warning: --help argument %.*s is ambiguous, please be more specific\n" msgstr "" -#: protoize.c:4503 +#: opts.c:1604 #, c-format -msgid "%s: input file names must have .c suffixes: %s\n" +msgid "warning: unrecognized argument to --help= option: %.*s\n" msgstr "" -#: reload.c:3785 +#: reload.c:3781 msgid "unable to generate reloads for:" msgstr "" @@ -2186,16 +1900,16 @@ msgid "this is the insn:" msgstr "" #. It's the compiler's fault. -#: reload1.c:5611 +#: reload1.c:5627 msgid "could not find a spill register" msgstr "" #. It's the compiler's fault. -#: reload1.c:7564 +#: reload1.c:7582 msgid "VOIDmode on an output" msgstr "" -#: reload1.c:8319 +#: reload1.c:8337 msgid "Failure trying to reload:" msgstr "" @@ -2223,104 +1937,104 @@ msgstr "" msgid "time in %s: %ld.%06ld (%ld%%)\n" msgstr "" -#: tlink.c:382 +#: tlink.c:383 #, c-format msgid "collect: reading %s\n" msgstr "" -#: tlink.c:476 +#: tlink.c:477 #, c-format msgid "removing .rpo file" msgstr "" -#: tlink.c:478 +#: tlink.c:479 #, c-format msgid "renaming .rpo file" msgstr "" -#: tlink.c:532 +#: tlink.c:533 #, c-format msgid "collect: recompiling %s\n" msgstr "" -#: tlink.c:739 +#: tlink.c:740 #, c-format msgid "collect: tweaking %s in %s\n" msgstr "" -#: tlink.c:789 +#: tlink.c:790 #, c-format msgid "collect: relinking\n" msgstr "" -#: toplev.c:595 +#: toplev.c:597 #, c-format msgid "unrecoverable error" msgstr "" -#: toplev.c:1108 +#: toplev.c:1110 #, c-format msgid "" "%s%s%s %sversion %s (%s)\n" "%s\tcompiled by GNU C version %s, " msgstr "" -#: toplev.c:1110 +#: toplev.c:1112 #, c-format msgid "%s%s%s %sversion %s (%s) compiled by CC, " msgstr "" -#: toplev.c:1114 +#: toplev.c:1116 #, c-format msgid "GMP version %s, MPFR version %s.\n" msgstr "" -#: toplev.c:1116 +#: toplev.c:1118 #, c-format msgid "%s%swarning: %s header version %s differs from library version %s.\n" msgstr "" -#: toplev.c:1118 +#: toplev.c:1120 #, c-format msgid "" "%s%sGGC heuristics: --param ggc-min-expand=%d --param ggc-min-heapsize=%d\n" msgstr "" -#: toplev.c:1270 +#: toplev.c:1272 msgid "options passed: " msgstr "" -#: toplev.c:1304 +#: toplev.c:1306 msgid "options enabled: " msgstr "" -#: toplev.c:1439 +#: toplev.c:1441 #, c-format msgid "created and used with differing settings of '%s'" msgstr "" -#: toplev.c:1441 +#: toplev.c:1443 msgid "out of memory" msgstr "" -#: toplev.c:1456 +#: toplev.c:1458 msgid "created and used with different settings of -fpic" msgstr "" -#: toplev.c:1458 +#: toplev.c:1460 msgid "created and used with different settings of -fpie" msgstr "" -#: tree-inline.c:3139 +#: tree-inline.c:3221 msgid "originally indirect function call not considered for inlining" msgstr "" -#: tree-vrp.c:6383 +#: tree-vrp.c:6509 msgid "" "assuming signed overflow does not occur when simplifying && or || to & or |" msgstr "" -#: tree-vrp.c:6387 +#: tree-vrp.c:6513 msgid "" "assuming signed overflow does not occur when simplifying ==, != or ! to " "identity or ^" @@ -2894,101 +2608,105 @@ msgstr "" msgid "Maximum size of a SCC before SCCVN stops processing a function" msgstr "" -#: params.def:751 -msgid "Multiplier used for determining the double-queueing threshold" +#: params.def:750 +msgid "max loops number for regional RA" msgstr "" -#: params.def:756 -msgid "max loops number for regional RA" +#: params.def:755 +msgid "max size of conflict table in MB" msgstr "" -#: params.def:764 +#: params.def:763 msgid "" "The maximum ratio between array size and switch branches for a switch " "conversion to take place" msgstr "" -#: config/alpha/alpha.c:5025 +#: params.def:771 +msgid "max basic blocks number in loop for loop invariant motion" +msgstr "" + +#: config/alpha/alpha.c:5039 #, c-format msgid "invalid %%H value" msgstr "" -#: config/alpha/alpha.c:5046 config/bfin/bfin.c:1646 +#: config/alpha/alpha.c:5060 config/bfin/bfin.c:1646 #, c-format msgid "invalid %%J value" msgstr "" -#: config/alpha/alpha.c:5076 config/ia64/ia64.c:4754 +#: config/alpha/alpha.c:5090 config/ia64/ia64.c:4759 #, c-format msgid "invalid %%r value" msgstr "" -#: config/alpha/alpha.c:5086 config/ia64/ia64.c:4708 -#: config/rs6000/rs6000.c:12215 config/xtensa/xtensa.c:2238 +#: config/alpha/alpha.c:5100 config/ia64/ia64.c:4713 +#: config/rs6000/rs6000.c:12236 config/xtensa/xtensa.c:2238 #, c-format msgid "invalid %%R value" msgstr "" -#: config/alpha/alpha.c:5092 config/rs6000/rs6000.c:12134 +#: config/alpha/alpha.c:5106 config/rs6000/rs6000.c:12155 #: config/xtensa/xtensa.c:2205 #, c-format msgid "invalid %%N value" msgstr "" -#: config/alpha/alpha.c:5100 config/rs6000/rs6000.c:12162 +#: config/alpha/alpha.c:5114 config/rs6000/rs6000.c:12183 #, c-format msgid "invalid %%P value" msgstr "" -#: config/alpha/alpha.c:5108 +#: config/alpha/alpha.c:5122 #, c-format msgid "invalid %%h value" msgstr "" -#: config/alpha/alpha.c:5116 config/xtensa/xtensa.c:2231 +#: config/alpha/alpha.c:5130 config/xtensa/xtensa.c:2231 #, c-format msgid "invalid %%L value" msgstr "" -#: config/alpha/alpha.c:5155 config/rs6000/rs6000.c:12116 +#: config/alpha/alpha.c:5169 config/rs6000/rs6000.c:12137 #, c-format msgid "invalid %%m value" msgstr "" -#: config/alpha/alpha.c:5163 config/rs6000/rs6000.c:12124 +#: config/alpha/alpha.c:5177 config/rs6000/rs6000.c:12145 #, c-format msgid "invalid %%M value" msgstr "" -#: config/alpha/alpha.c:5207 +#: config/alpha/alpha.c:5221 #, c-format msgid "invalid %%U value" msgstr "" -#: config/alpha/alpha.c:5219 config/alpha/alpha.c:5233 -#: config/rs6000/rs6000.c:12223 +#: config/alpha/alpha.c:5233 config/alpha/alpha.c:5247 +#: config/rs6000/rs6000.c:12244 #, c-format msgid "invalid %%s value" msgstr "" -#: config/alpha/alpha.c:5256 +#: config/alpha/alpha.c:5270 #, c-format msgid "invalid %%C value" msgstr "" -#: config/alpha/alpha.c:5293 config/rs6000/rs6000.c:11951 -#: config/rs6000/rs6000.c:11970 +#: config/alpha/alpha.c:5307 config/rs6000/rs6000.c:11972 +#: config/rs6000/rs6000.c:11991 #, c-format msgid "invalid %%E value" msgstr "" -#: config/alpha/alpha.c:5318 config/alpha/alpha.c:5366 +#: config/alpha/alpha.c:5332 config/alpha/alpha.c:5380 #, c-format msgid "unknown relocation unspec" msgstr "" -#: config/alpha/alpha.c:5327 config/crx/crx.c:1081 -#: config/rs6000/rs6000.c:12554 config/spu/spu.c:1535 +#: config/alpha/alpha.c:5341 config/crx/crx.c:1081 +#: config/rs6000/rs6000.c:12575 config/spu/spu.c:1539 #, c-format msgid "invalid %%xn code" msgstr "" @@ -3020,26 +2738,26 @@ msgstr "" msgid "invalid operand output code" msgstr "" -#: config/arm/arm.c:12852 config/arm/arm.c:12870 +#: config/arm/arm.c:13300 config/arm/arm.c:13318 #, c-format msgid "predicated Thumb instruction" msgstr "" -#: config/arm/arm.c:12858 +#: config/arm/arm.c:13306 #, c-format msgid "predicated instruction in conditional sequence" msgstr "" -#: config/arm/arm.c:13028 +#: config/arm/arm.c:13476 #, c-format msgid "invalid shift operand" msgstr "" -#: config/arm/arm.c:13075 config/arm/arm.c:13085 config/arm/arm.c:13095 -#: config/arm/arm.c:13105 config/arm/arm.c:13115 config/arm/arm.c:13154 -#: config/arm/arm.c:13172 config/arm/arm.c:13207 config/arm/arm.c:13226 -#: config/arm/arm.c:13241 config/arm/arm.c:13269 config/arm/arm.c:13276 -#: config/arm/arm.c:13284 config/arm/arm.c:13305 config/arm/arm.c:13312 +#: config/arm/arm.c:13523 config/arm/arm.c:13533 config/arm/arm.c:13543 +#: config/arm/arm.c:13553 config/arm/arm.c:13563 config/arm/arm.c:13602 +#: config/arm/arm.c:13620 config/arm/arm.c:13655 config/arm/arm.c:13674 +#: config/arm/arm.c:13689 config/arm/arm.c:13717 config/arm/arm.c:13724 +#: config/arm/arm.c:13732 config/arm/arm.c:13753 config/arm/arm.c:13760 #: config/bfin/bfin.c:1659 config/bfin/bfin.c:1666 config/bfin/bfin.c:1673 #: config/bfin/bfin.c:1680 config/bfin/bfin.c:1689 config/bfin/bfin.c:1696 #: config/bfin/bfin.c:1703 config/bfin/bfin.c:1710 @@ -3047,57 +2765,57 @@ msgstr "" msgid "invalid operand for code '%c'" msgstr "" -#: config/arm/arm.c:13167 +#: config/arm/arm.c:13615 #, c-format msgid "instruction never executed" msgstr "" -#: config/arm/arm.c:13379 +#: config/arm/arm.c:13827 #, c-format msgid "missing operand" msgstr "" -#: config/avr/avr.c:1186 +#: config/avr/avr.c:1196 #, c-format msgid "address operand requires constraint for X, Y, or Z register" msgstr "" -#: config/avr/avr.c:1298 +#: config/avr/avr.c:1308 msgid "bad address, not (reg+disp):" msgstr "" -#: config/avr/avr.c:1305 +#: config/avr/avr.c:1315 msgid "bad address, not post_inc or pre_dec:" msgstr "" -#: config/avr/avr.c:1316 +#: config/avr/avr.c:1326 msgid "internal compiler error. Bad address:" msgstr "" -#: config/avr/avr.c:1329 +#: config/avr/avr.c:1339 msgid "internal compiler error. Unknown mode:" msgstr "" -#: config/avr/avr.c:1924 config/avr/avr.c:2612 +#: config/avr/avr.c:1934 config/avr/avr.c:2622 msgid "invalid insn:" msgstr "" -#: config/avr/avr.c:1963 config/avr/avr.c:2049 config/avr/avr.c:2098 -#: config/avr/avr.c:2126 config/avr/avr.c:2221 config/avr/avr.c:2390 -#: config/avr/avr.c:2651 config/avr/avr.c:2763 +#: config/avr/avr.c:1973 config/avr/avr.c:2059 config/avr/avr.c:2108 +#: config/avr/avr.c:2136 config/avr/avr.c:2231 config/avr/avr.c:2400 +#: config/avr/avr.c:2661 config/avr/avr.c:2773 msgid "incorrect insn:" msgstr "" -#: config/avr/avr.c:2145 config/avr/avr.c:2306 config/avr/avr.c:2461 -#: config/avr/avr.c:2829 +#: config/avr/avr.c:2155 config/avr/avr.c:2316 config/avr/avr.c:2471 +#: config/avr/avr.c:2839 msgid "unknown move insn:" msgstr "" -#: config/avr/avr.c:3059 +#: config/avr/avr.c:3069 msgid "bad shift insn:" msgstr "" -#: config/avr/avr.c:3175 config/avr/avr.c:3595 config/avr/avr.c:3953 +#: config/avr/avr.c:3185 config/avr/avr.c:3605 config/avr/avr.c:3963 msgid "internal compiler error. Incorrect shift:" msgstr "" @@ -3111,9 +2829,9 @@ msgstr "" msgid "invalid const_double operand" msgstr "" -#: config/cris/cris.c:504 c-typeck.c:4682 c-typeck.c:4698 c-typeck.c:4715 -#: final.c:3000 final.c:3002 gcc.c:4810 loop-iv.c:2808 loop-iv.c:2817 -#: rtl-error.c:105 toplev.c:599 tree-ssa-loop-niter.c:1856 cp/typeck.c:4657 +#: config/cris/cris.c:504 c-typeck.c:4700 c-typeck.c:4716 c-typeck.c:4733 +#: final.c:3000 final.c:3002 gcc.c:4828 loop-iv.c:2825 loop-iv.c:2834 +#: rtl-error.c:105 toplev.c:601 tree-ssa-loop-niter.c:1882 cp/typeck.c:4720 #: java/expr.c:411 #, gcc-internal-format msgid "%s" @@ -3348,28 +3066,51 @@ msgstr "" msgid " (frv)" msgstr "" -#: config/i386/i386.c:9946 +#: config/i386/i386.c:10238 #, c-format msgid "invalid UNSPEC as operand" msgstr "" -#: config/i386/i386.c:10747 +#: config/i386/i386.c:10963 config/i386/i386.c:11002 config/i386/i386.c:11176 +#, c-format +msgid "operand is not a condition code, invalid operand code 'D'" +msgstr "" + +#: config/i386/i386.c:11027 +#, c-format +msgid "" +"operand is neither a constant nor a condition code, invalid operand code 'C'" +msgstr "" + +#: config/i386/i386.c:11037 +#, c-format +msgid "" +"operand is neither a constant nor a condition code, invalid operand code 'F'" +msgstr "" + +#: config/i386/i386.c:11055 #, c-format msgid "" "operand is neither a constant nor a condition code, invalid operand code 'c'" msgstr "" -#: config/i386/i386.c:10872 +#: config/i386/i386.c:11065 +#, c-format +msgid "" +"operand is neither a constant nor a condition code, invalid operand code 'f'" +msgstr "" + +#: config/i386/i386.c:11190 #, c-format msgid "invalid operand code '%c'" msgstr "" -#: config/i386/i386.c:10921 +#: config/i386/i386.c:11239 #, c-format msgid "invalid constraints for operand" msgstr "" -#: config/i386/i386.c:18332 +#: config/i386/i386.c:18927 msgid "unknown insn mode" msgstr "" @@ -3390,34 +3131,34 @@ msgstr "" msgid "environment variable DJGPP points to corrupt file '%s'" msgstr "" -#: config/ia64/ia64.c:4806 +#: config/ia64/ia64.c:4811 #, c-format msgid "ia64_print_operand: unknown code" msgstr "" -#: config/ia64/ia64.c:10410 +#: config/ia64/ia64.c:10473 msgid "invalid conversion from %<__fpreg%>" msgstr "" -#: config/ia64/ia64.c:10413 +#: config/ia64/ia64.c:10476 msgid "invalid conversion to %<__fpreg%>" msgstr "" -#: config/ia64/ia64.c:10426 config/ia64/ia64.c:10437 +#: config/ia64/ia64.c:10489 config/ia64/ia64.c:10500 msgid "invalid operation on %<__fpreg%>" msgstr "" -#: config/iq2000/iq2000.c:3121 +#: config/iq2000/iq2000.c:3122 #, c-format msgid "invalid %%P operand" msgstr "" -#: config/iq2000/iq2000.c:3129 config/rs6000/rs6000.c:12152 +#: config/iq2000/iq2000.c:3130 config/rs6000/rs6000.c:12173 #, c-format msgid "invalid %%p value" msgstr "" -#: config/iq2000/iq2000.c:3185 +#: config/iq2000/iq2000.c:3186 #, c-format msgid "invalid use of %%d, %%x, or %%X" msgstr "" @@ -3459,7 +3200,7 @@ msgid "post-increment address is not a register" msgstr "" #: config/m32r/m32r.c:2031 config/m32r/m32r.c:2045 -#: config/rs6000/rs6000.c:20951 +#: config/rs6000/rs6000.c:20952 msgid "bad address" msgstr "" @@ -3505,18 +3246,18 @@ msgstr "" msgid "invalid Z register replacement for insn" msgstr "" -#: config/mips/mips.c:7065 config/mips/mips.c:7086 config/mips/mips.c:7198 +#: config/mips/mips.c:7068 config/mips/mips.c:7089 config/mips/mips.c:7201 #, c-format msgid "'%%%c' is not a valid operand prefix" msgstr "" -#: config/mips/mips.c:7135 config/mips/mips.c:7142 config/mips/mips.c:7149 -#: config/mips/mips.c:7156 config/mips/mips.c:7216 +#: config/mips/mips.c:7138 config/mips/mips.c:7145 config/mips/mips.c:7152 +#: config/mips/mips.c:7159 config/mips/mips.c:7219 #, c-format msgid "invalid use of '%%%c'" msgstr "" -#: config/mips/mips.c:7464 +#: config/mips/mips.c:7467 msgid "mips_debugger_offset called with non stack/frame/arg pointer" msgstr "" @@ -3561,19 +3302,19 @@ msgstr "" msgid "MMIX Internal: This is not a constant:" msgstr "" -#: config/picochip/picochip.c:2398 +#: config/picochip/picochip.c:2406 msgid "picochip_print_memory_address - Operand isn't memory based" msgstr "" -#: config/picochip/picochip.c:2657 +#: config/picochip/picochip.c:2665 msgid "Unknown mode in print_operand (CONST_DOUBLE) :" msgstr "" -#: config/picochip/picochip.c:2703 config/picochip/picochip.c:2735 +#: config/picochip/picochip.c:2711 config/picochip/picochip.c:2743 msgid "Bad address, not (reg+disp):" msgstr "" -#: config/picochip/picochip.c:2749 +#: config/picochip/picochip.c:2757 msgid "Bad address, not register:" msgstr "" @@ -3587,77 +3328,77 @@ msgstr "" msgid "Try running '%s' in the shell to raise its limit.\n" msgstr "" -#: config/rs6000/rs6000.c:11979 +#: config/rs6000/rs6000.c:12000 #, c-format msgid "invalid %%f value" msgstr "" -#: config/rs6000/rs6000.c:11988 +#: config/rs6000/rs6000.c:12009 #, c-format msgid "invalid %%F value" msgstr "" -#: config/rs6000/rs6000.c:11997 +#: config/rs6000/rs6000.c:12018 #, c-format msgid "invalid %%G value" msgstr "" -#: config/rs6000/rs6000.c:12032 +#: config/rs6000/rs6000.c:12053 #, c-format msgid "invalid %%j code" msgstr "" -#: config/rs6000/rs6000.c:12042 +#: config/rs6000/rs6000.c:12063 #, c-format msgid "invalid %%J code" msgstr "" -#: config/rs6000/rs6000.c:12052 +#: config/rs6000/rs6000.c:12073 #, c-format msgid "invalid %%k value" msgstr "" -#: config/rs6000/rs6000.c:12072 config/xtensa/xtensa.c:2224 +#: config/rs6000/rs6000.c:12093 config/xtensa/xtensa.c:2224 #, c-format msgid "invalid %%K value" msgstr "" -#: config/rs6000/rs6000.c:12142 +#: config/rs6000/rs6000.c:12163 #, c-format msgid "invalid %%O value" msgstr "" -#: config/rs6000/rs6000.c:12189 +#: config/rs6000/rs6000.c:12210 #, c-format msgid "invalid %%q value" msgstr "" -#: config/rs6000/rs6000.c:12233 +#: config/rs6000/rs6000.c:12254 #, c-format msgid "invalid %%S value" msgstr "" -#: config/rs6000/rs6000.c:12273 +#: config/rs6000/rs6000.c:12294 #, c-format msgid "invalid %%T value" msgstr "" -#: config/rs6000/rs6000.c:12283 +#: config/rs6000/rs6000.c:12304 #, c-format msgid "invalid %%u value" msgstr "" -#: config/rs6000/rs6000.c:12292 config/xtensa/xtensa.c:2194 +#: config/rs6000/rs6000.c:12313 config/xtensa/xtensa.c:2194 #, c-format msgid "invalid %%v value" msgstr "" -#: config/rs6000/rs6000.c:12513 +#: config/rs6000/rs6000.c:12534 #, c-format msgid "invalid %%y value, try using the 'Z' constraint" msgstr "" -#: config/rs6000/rs6000.c:22816 +#: config/rs6000/rs6000.c:22817 msgid "AltiVec argument passed to unprototyped function" msgstr "" @@ -3686,15 +3427,15 @@ msgstr "" msgid "invalid operand to %%S" msgstr "" -#: config/sh/sh.c:8379 +#: config/sh/sh.c:8381 msgid "created and used with different architectures / ABIs" msgstr "" -#: config/sh/sh.c:8381 +#: config/sh/sh.c:8383 msgid "created and used with different ABIs" msgstr "" -#: config/sh/sh.c:8383 +#: config/sh/sh.c:8385 msgid "created and used with different endianness" msgstr "" @@ -3743,22 +3484,22 @@ msgstr "" msgid "floating point constant not a valid immediate operand" msgstr "" -#: config/stormy16/stormy16.c:1750 config/stormy16/stormy16.c:1821 +#: config/stormy16/stormy16.c:1746 config/stormy16/stormy16.c:1817 #, c-format msgid "'B' operand is not constant" msgstr "" -#: config/stormy16/stormy16.c:1777 +#: config/stormy16/stormy16.c:1773 #, c-format msgid "'B' operand has multiple bits set" msgstr "" -#: config/stormy16/stormy16.c:1803 +#: config/stormy16/stormy16.c:1799 #, c-format msgid "'o' operand is not constant" msgstr "" -#: config/stormy16/stormy16.c:1835 +#: config/stormy16/stormy16.c:1831 #, c-format msgid "xstormy16_print_operand: unknown code" msgstr "" @@ -3812,23 +3553,23 @@ msgstr "" msgid "address offset not a constant" msgstr "" -#: cp/call.c:2602 +#: cp/call.c:2604 msgid "candidates are:" msgstr "" -#: cp/call.c:6779 +#: cp/call.c:6824 msgid "candidate 1:" msgstr "" -#: cp/call.c:6780 +#: cp/call.c:6825 msgid "candidate 2:" msgstr "" -#: cp/decl2.c:671 +#: cp/decl2.c:676 msgid "candidates are: %+#D" msgstr "" -#: cp/decl2.c:673 +#: cp/decl2.c:678 msgid "candidate is: %+#D" msgstr "" @@ -3870,59 +3611,59 @@ msgstr "" msgid "Integer outside symmetric range implied by Standard Fortran at %L" msgstr "" -#: fortran/arith.c:1481 +#: fortran/arith.c:1482 msgid "elemental binary operation" msgstr "" -#: fortran/arith.c:2059 +#: fortran/arith.c:2060 #, no-c-format msgid "Arithmetic OK converting %s to %s at %L" msgstr "" -#: fortran/arith.c:2063 +#: fortran/arith.c:2064 #, no-c-format msgid "" "Arithmetic overflow converting %s to %s at %L. This check can be disabled " "with the option -fno-range-check" msgstr "" -#: fortran/arith.c:2068 +#: fortran/arith.c:2069 #, no-c-format msgid "" "Arithmetic underflow converting %s to %s at %L. This check can be disabled " "with the option -fno-range-check" msgstr "" -#: fortran/arith.c:2073 +#: fortran/arith.c:2074 #, no-c-format msgid "" "Arithmetic NaN converting %s to %s at %L. This check can be disabled with " "the option -fno-range-check" msgstr "" -#: fortran/arith.c:2078 +#: fortran/arith.c:2079 #, no-c-format msgid "Division by zero converting %s to %s at %L" msgstr "" -#: fortran/arith.c:2082 +#: fortran/arith.c:2083 #, no-c-format msgid "Array operands are incommensurate converting %s to %s at %L" msgstr "" -#: fortran/arith.c:2086 +#: fortran/arith.c:2087 #, no-c-format msgid "" "Integer outside symmetric range implied by Standard Fortran converting %s to " "%s at %L" msgstr "" -#: fortran/arith.c:2419 +#: fortran/arith.c:2420 #, no-c-format msgid "The Hollerith constant at %L is too long to convert to %s" msgstr "" -#: fortran/arith.c:2578 +#: fortran/arith.c:2579 #, no-c-format msgid "Enumerator exceeds the C integer type at %C" msgstr "" @@ -4052,7 +3793,7 @@ msgstr "" msgid "'%s' argument of '%s' intrinsic at %L must be a numeric type" msgstr "" -#: fortran/check.c:101 fortran/check.c:825 fortran/check.c:835 +#: fortran/check.c:101 fortran/check.c:830 fortran/check.c:840 #, no-c-format msgid "'%s' argument of '%s' intrinsic at %L must be INTEGER or REAL" msgstr "" @@ -4118,145 +3859,145 @@ msgstr "" msgid "'%s' argument of '%s' intrinsic at %L must be a variable" msgstr "" -#: fortran/check.c:356 +#: fortran/check.c:361 #, no-c-format msgid "'dim' argument of '%s' intrinsic at %L is not a valid dimension index" msgstr "" -#: fortran/check.c:426 +#: fortran/check.c:431 #, no-c-format -msgid "Unequal character lengths (%ld and %ld) in %s intrinsic at %L" +msgid "Unequal character lengths (%ld/%ld) in %s at %L" msgstr "" -#: fortran/check.c:532 fortran/check.c:2025 fortran/check.c:2040 +#: fortran/check.c:537 fortran/check.c:2039 fortran/check.c:2054 #, no-c-format msgid "'%s' argument of '%s' intrinsic at %L must be ALLOCATABLE" msgstr "" -#: fortran/check.c:556 fortran/check.c:3885 +#: fortran/check.c:561 fortran/check.c:3908 #, no-c-format msgid "'%s' and '%s' arguments of '%s' intrinsic at %L must have the same type" msgstr "" -#: fortran/check.c:565 fortran/check.c:1197 fortran/check.c:1340 -#: fortran/check.c:1414 fortran/check.c:1703 +#: fortran/check.c:570 fortran/check.c:1202 fortran/check.c:1345 +#: fortran/check.c:1419 fortran/check.c:1708 #, no-c-format msgid "Extension: Different type kinds at %L" msgstr "" -#: fortran/check.c:605 fortran/check.c:2109 +#: fortran/check.c:610 fortran/check.c:2123 #, no-c-format msgid "'%s' argument of '%s' intrinsic at %L must be a POINTER" msgstr "" -#: fortran/check.c:625 +#: fortran/check.c:630 #, no-c-format msgid "" "'%s' argument of '%s' intrinsic at %L must be a pointer or target VARIABLE " "or FUNCTION" msgstr "" -#: fortran/check.c:633 +#: fortran/check.c:638 #, no-c-format msgid "'%s' argument of '%s' intrinsic at %L must be a POINTER or a TARGET" msgstr "" -#: fortran/check.c:649 +#: fortran/check.c:654 #, no-c-format msgid "" "Array section with a vector subscript at %L shall not be the target of a " "pointer" msgstr "" -#: fortran/check.c:660 +#: fortran/check.c:665 #, no-c-format msgid "" "NULL pointer at %L is not permitted as actual argument of '%s' intrinsic " "function" msgstr "" -#: fortran/check.c:806 fortran/check.c:930 +#: fortran/check.c:811 fortran/check.c:935 #, no-c-format msgid "" "'%s' argument of '%s' intrinsic at %L must not be present if 'x' is COMPLEX" msgstr "" -#: fortran/check.c:856 fortran/check.c:1259 fortran/check.c:1362 -#: fortran/check.c:1521 fortran/check.c:1538 fortran/check.c:2413 -#: fortran/check.c:2555 fortran/check.c:2898 fortran/check.c:2959 +#: fortran/check.c:861 fortran/check.c:1264 fortran/check.c:1367 +#: fortran/check.c:1526 fortran/check.c:1543 fortran/check.c:2427 +#: fortran/check.c:2569 fortran/check.c:2912 fortran/check.c:2973 #, no-c-format msgid "Fortran 2003: '%s' intrinsic with KIND argument at %L" msgstr "" -#: fortran/check.c:881 +#: fortran/check.c:886 #, no-c-format msgid "SHIFT argument at %L of CSHIFT must have rank %d or be a scalar" msgstr "" -#: fortran/check.c:979 fortran/check.c:1799 fortran/check.c:1807 +#: fortran/check.c:984 fortran/check.c:1804 fortran/check.c:1812 #, no-c-format msgid "'%s' argument of '%s' intrinsic at %L must be numeric or LOGICAL" msgstr "" -#: fortran/check.c:993 +#: fortran/check.c:998 #, no-c-format msgid "" "Different shape for arguments '%s' and '%s' at %L for intrinsic 'dot_product'" msgstr "" -#: fortran/check.c:1012 fortran/check.c:1020 +#: fortran/check.c:1017 fortran/check.c:1025 #, no-c-format msgid "'%s' argument of '%s' intrinsic at %L must be default real" msgstr "" -#: fortran/check.c:1047 +#: fortran/check.c:1052 #, no-c-format msgid "SHIFT argument at %L of EOSHIFT must have rank %d or be a scalar" msgstr "" -#: fortran/check.c:1067 +#: fortran/check.c:1072 #, no-c-format msgid "BOUNDARY argument at %L of EOSHIFT must have rank %d or be a scalar" msgstr "" -#: fortran/check.c:1078 +#: fortran/check.c:1083 #, no-c-format msgid "" "Different shape in dimension %d for SHIFT and BOUNDARY arguments of EOSHIFT " "at %L" msgstr "" -#: fortran/check.c:1310 +#: fortran/check.c:1315 #, no-c-format msgid "Argument of %s at %L must be of length one" msgstr "" -#: fortran/check.c:1369 +#: fortran/check.c:1374 #, no-c-format msgid "'%s' argument of '%s' intrinsic at %L must be the same kind as '%s'" msgstr "" -#: fortran/check.c:1494 +#: fortran/check.c:1499 #, no-c-format msgid "'%s' argument of '%s' intrinsic at %L must be a non-derived type" msgstr "" -#: fortran/check.c:1676 +#: fortran/check.c:1681 #, no-c-format msgid "Intrinsic '%s' at %L must have at least two arguments" msgstr "" -#: fortran/check.c:1709 +#: fortran/check.c:1714 #, no-c-format msgid "'a%d' argument of '%s' intrinsic at %L must be %s(%d)" msgstr "" -#: fortran/check.c:1742 +#: fortran/check.c:1747 #, no-c-format msgid "Fortran 2003: '%s' intrinsic with CHARACTER argument at %L" msgstr "" -#: fortran/check.c:1749 +#: fortran/check.c:1754 #, no-c-format msgid "" "'a1' argument of '%s' intrinsic at %L must be INTEGER, REAL or CHARACTER" @@ -4264,149 +4005,154 @@ msgstr "" #: fortran/check.c:1821 #, no-c-format +msgid "Argument types of '%s' intrinsic at %L must match (%s/%s)" +msgstr "" + +#: fortran/check.c:1835 +#, no-c-format msgid "" "Different shape on dimension 1 for arguments '%s' and '%s' at %L for " "intrinsic matmul" msgstr "" -#: fortran/check.c:1840 +#: fortran/check.c:1854 #, no-c-format msgid "" "Different shape on dimension 2 for argument '%s' and dimension 1 for " "argument '%s' at %L for intrinsic matmul" msgstr "" -#: fortran/check.c:1849 +#: fortran/check.c:1863 #, no-c-format msgid "'%s' argument of '%s' intrinsic at %L must be of rank 1 or 2" msgstr "" -#: fortran/check.c:2051 +#: fortran/check.c:2065 #, no-c-format msgid "" "the '%s' and '%s' arguments of '%s' intrinsic at %L must have the same rank %" "d/%d" msgstr "" -#: fortran/check.c:2060 +#: fortran/check.c:2074 #, no-c-format msgid "" "the '%s' and '%s' arguments of '%s' intrinsic at %L must be of the same kind " "%d/%d" msgstr "" -#: fortran/check.c:2156 +#: fortran/check.c:2170 #, no-c-format msgid "'%s' argument of '%s' intrinsic at %L must be of type REAL or COMPLEX" msgstr "" -#: fortran/check.c:2177 +#: fortran/check.c:2191 #, no-c-format msgid "'%s' argument of '%s' intrinsic at %L must be of a dummy variable" msgstr "" -#: fortran/check.c:2185 +#: fortran/check.c:2199 #, no-c-format msgid "" "'%s' argument of '%s' intrinsic at %L must be of an OPTIONAL dummy variable" msgstr "" -#: fortran/check.c:2201 +#: fortran/check.c:2215 #, no-c-format msgid "'%s' argument of '%s' intrinsic at %L must not be a subobject of '%s'" msgstr "" -#: fortran/check.c:2326 +#: fortran/check.c:2340 #, no-c-format msgid "" "'shape' argument of 'reshape' intrinsic at %L must be an array of constant " "size" msgstr "" -#: fortran/check.c:2336 +#: fortran/check.c:2350 #, no-c-format msgid "'shape' argument of 'reshape' intrinsic at %L has more than %d elements" msgstr "" -#: fortran/check.c:2374 +#: fortran/check.c:2388 #, no-c-format msgid "" "Without padding, there are not enough elements in the intrinsic RESHAPE " "source at %L to match the shape" msgstr "" -#: fortran/check.c:2475 +#: fortran/check.c:2489 #, no-c-format msgid "Missing arguments to %s intrinsic at %L" msgstr "" -#: fortran/check.c:2516 +#: fortran/check.c:2530 #, no-c-format msgid "" "'source' argument of 'shape' intrinsic at %L must not be an assumed size " "array" msgstr "" -#: fortran/check.c:2590 +#: fortran/check.c:2604 #, no-c-format msgid "'%s' argument of '%s' intrinsic at %L must be less than rank %d" msgstr "" -#: fortran/check.c:2850 +#: fortran/check.c:2864 #, no-c-format msgid "'MOLD' argument of 'TRANSFER' intrinsic at %L must not be %s" msgstr "" -#: fortran/check.c:2924 +#: fortran/check.c:2938 #, no-c-format msgid "" "FIELD argument at %L of UNPACK must have the same rank as MASK or be a scalar" msgstr "" -#: fortran/check.c:2935 +#: fortran/check.c:2949 #, no-c-format msgid "" "Different shape in dimension %d for MASK and FIELD arguments of UNPACK at %L" msgstr "" -#: fortran/check.c:3175 +#: fortran/check.c:3190 fortran/check.c:3222 #, no-c-format -msgid "Array PUT of intrinsic %s is too small (%i/%i) at %L" +msgid "Size of '%s' argument of '%s' intrinsic at %L too small (%i/%i)" msgstr "" -#: fortran/check.c:3207 +#: fortran/check.c:3230 #, no-c-format msgid "Too many arguments to %s at %L" msgstr "" -#: fortran/check.c:3319 fortran/check.c:3796 fortran/check.c:3820 +#: fortran/check.c:3342 fortran/check.c:3819 fortran/check.c:3843 #, no-c-format msgid "'%s' argument of '%s' intrinsic at %L must be INTEGER or PROCEDURE" msgstr "" -#: fortran/check.c:3502 +#: fortran/check.c:3525 #, no-c-format msgid "" "'%s' argument of '%s' intrinsic at %L must be of a kind not wider than the " "default kind (%d)" msgstr "" -#: fortran/check.c:3869 fortran/check.c:3877 +#: fortran/check.c:3892 fortran/check.c:3900 #, no-c-format msgid "'%s' argument of '%s' intrinsic at %L must be INTEGER or LOGICAL" msgstr "" -#: fortran/cpp.c:374 c-opts.c:891 +#: fortran/cpp.c:378 c-opts.c:891 #, gcc-internal-format msgid "output filename specified twice" msgstr "" -#: fortran/cpp.c:432 +#: fortran/cpp.c:436 #, no-c-format msgid "To enable preprocessing, use -cpp" msgstr "" -#: fortran/cpp.c:521 fortran/cpp.c:531 +#: fortran/cpp.c:525 fortran/cpp.c:535 #, no-c-format msgid "opening output file %s: %s" msgstr "" @@ -4642,7 +4388,7 @@ msgstr "" msgid "NULL() initialization at %C is ambiguous" msgstr "" -#: fortran/decl.c:1646 fortran/decl.c:5534 +#: fortran/decl.c:1646 fortran/decl.c:5523 #, no-c-format msgid "Duplicate array spec for Cray pointee at %C" msgstr "" @@ -4662,17 +4408,17 @@ msgstr "" msgid "Extension: Old-style initialization at %C" msgstr "" -#: fortran/decl.c:1753 fortran/decl.c:4237 +#: fortran/decl.c:1753 fortran/decl.c:4226 #, no-c-format msgid "Initialization at %C isn't for a pointer variable" msgstr "" -#: fortran/decl.c:1761 fortran/decl.c:4245 +#: fortran/decl.c:1761 fortran/decl.c:4234 #, no-c-format msgid "Pointer initialization requires a NULL() at %C" msgstr "" -#: fortran/decl.c:1767 fortran/decl.c:4251 +#: fortran/decl.c:1767 fortran/decl.c:4240 #, no-c-format msgid "Initialization of pointer at %C is not allowed in a PURE procedure" msgstr "" @@ -4682,7 +4428,7 @@ msgstr "" msgid "Pointer initialization at %C requires '=>', not '='" msgstr "" -#: fortran/decl.c:1789 fortran/decl.c:6620 +#: fortran/decl.c:1789 fortran/decl.c:6609 #, no-c-format msgid "Expected an initialization expression at %C" msgstr "" @@ -4707,17 +4453,17 @@ msgstr "" msgid "Nonstandard type declaration %s*%d at %C" msgstr "" -#: fortran/decl.c:1927 fortran/decl.c:1992 +#: fortran/decl.c:1927 fortran/decl.c:2003 #, no-c-format msgid "Missing right parenthesis at %C" msgstr "" -#: fortran/decl.c:1940 fortran/decl.c:2037 +#: fortran/decl.c:1940 fortran/decl.c:2048 #, no-c-format msgid "Expected initialization expression at %C" msgstr "" -#: fortran/decl.c:1948 fortran/decl.c:2043 +#: fortran/decl.c:1948 fortran/decl.c:2054 #, no-c-format msgid "Expected scalar initialization expression at %C" msgstr "" @@ -4727,217 +4473,216 @@ msgstr "" msgid "Kind %d not supported for type %s at %C" msgstr "" -#: fortran/decl.c:1990 +#: fortran/decl.c:1992 +#, no-c-format +msgid "C kind type parameter is for type %s but type at %L is %s" +msgstr "" + +#: fortran/decl.c:2001 #, no-c-format msgid "Missing right parenthesis or comma at %C" msgstr "" -#: fortran/decl.c:2063 +#: fortran/decl.c:2074 #, no-c-format msgid "Kind %d is not supported for CHARACTER at %C" msgstr "" -#: fortran/decl.c:2192 +#: fortran/decl.c:2203 #, no-c-format msgid "Syntax error in CHARACTER declaration at %C" msgstr "" -#: fortran/decl.c:2277 +#: fortran/decl.c:2288 #, no-c-format msgid "Extension: BYTE type at %C" msgstr "" -#: fortran/decl.c:2283 +#: fortran/decl.c:2294 #, no-c-format msgid "BYTE type used at %C is not available on the target machine" msgstr "" -#: fortran/decl.c:2332 +#: fortran/decl.c:2343 #, no-c-format msgid "DOUBLE COMPLEX at %C does not conform to the Fortran 95 standard" msgstr "" -#: fortran/decl.c:2372 fortran/decl.c:2381 fortran/decl.c:2696 -#: fortran/decl.c:2704 +#: fortran/decl.c:2383 fortran/decl.c:2392 fortran/decl.c:2707 +#: fortran/decl.c:2715 #, no-c-format msgid "Type name '%s' at %C is ambiguous" msgstr "" -#: fortran/decl.c:2457 +#: fortran/decl.c:2468 #, no-c-format msgid "Missing character range in IMPLICIT at %C" msgstr "" -#: fortran/decl.c:2503 +#: fortran/decl.c:2514 #, no-c-format msgid "Letters must be in alphabetic order in IMPLICIT statement at %C" msgstr "" -#: fortran/decl.c:2559 +#: fortran/decl.c:2570 #, no-c-format msgid "Empty IMPLICIT statement at %C" msgstr "" -#: fortran/decl.c:2662 +#: fortran/decl.c:2673 #, no-c-format msgid "IMPORT statement at %C only permitted in an INTERFACE body" msgstr "" -#: fortran/decl.c:2667 +#: fortran/decl.c:2678 #, no-c-format msgid "Fortran 2003: IMPORT statement at %C" msgstr "" -#: fortran/decl.c:2682 +#: fortran/decl.c:2693 #, no-c-format msgid "Expecting list of named entities at %C" msgstr "" -#: fortran/decl.c:2710 +#: fortran/decl.c:2721 #, no-c-format msgid "Cannot IMPORT '%s' from host scoping unit at %C - does not exist." msgstr "" -#: fortran/decl.c:2717 +#: fortran/decl.c:2728 #, no-c-format msgid "'%s' is already IMPORTed from host scoping unit at %C." msgstr "" -#: fortran/decl.c:2746 +#: fortran/decl.c:2757 #, no-c-format msgid "Syntax error in IMPORT statement at %C" msgstr "" -#: fortran/decl.c:2995 +#: fortran/decl.c:3006 #, no-c-format msgid "Missing dimension specification at %C" msgstr "" -#: fortran/decl.c:3069 +#: fortran/decl.c:3080 #, no-c-format msgid "Duplicate %s attribute at %L" msgstr "" -#: fortran/decl.c:3088 +#: fortran/decl.c:3099 #, no-c-format msgid "Fortran 2003: ALLOCATABLE attribute at %C in a TYPE definition" msgstr "" -#: fortran/decl.c:3098 +#: fortran/decl.c:3109 #, no-c-format msgid "Attribute at %L is not allowed in a TYPE definition" msgstr "" -#: fortran/decl.c:3116 +#: fortran/decl.c:3127 #, no-c-format msgid "Fortran 2003: Attribute %s at %L in a TYPE definition" msgstr "" -#: fortran/decl.c:3127 +#: fortran/decl.c:3138 #, no-c-format msgid "" "%s attribute at %L is not allowed outside of the specification part of a " "module" msgstr "" -#: fortran/decl.c:3179 fortran/decl.c:5774 +#: fortran/decl.c:3190 fortran/decl.c:5763 #, no-c-format msgid "PROTECTED at %C only allowed in specification part of a module" msgstr "" -#: fortran/decl.c:3185 +#: fortran/decl.c:3196 #, no-c-format msgid "Fortran 2003: PROTECTED attribute at %C" msgstr "" -#: fortran/decl.c:3216 +#: fortran/decl.c:3227 #, no-c-format msgid "Fortran 2003: VALUE attribute at %C" msgstr "" -#: fortran/decl.c:3226 +#: fortran/decl.c:3237 #, no-c-format msgid "Fortran 2003: VOLATILE attribute at %C" msgstr "" -#: fortran/decl.c:3266 +#: fortran/decl.c:3277 #, no-c-format msgid "Multiple identifiers provided with single NAME= specifier at %C" msgstr "" -#. Print an error, but continue parsing line. -#: fortran/decl.c:3315 -#, no-c-format -msgid "C kind parameter is for type %s but symbol '%s' at %L is of type %s" -msgstr "" - -#: fortran/decl.c:3383 +#: fortran/decl.c:3373 #, no-c-format msgid "" "Implicitly declared BIND(C) function '%s' at %L may not be C interoperable" msgstr "" -#: fortran/decl.c:3405 +#: fortran/decl.c:3394 #, no-c-format msgid "" "Variable '%s' in common block '%s' at %L may not be a C interoperable kind " "though common block '%s' is BIND(C)" msgstr "" -#: fortran/decl.c:3414 +#: fortran/decl.c:3403 #, no-c-format msgid "Type declaration '%s' at %L is not C interoperable but it is BIND(C)" msgstr "" -#: fortran/decl.c:3418 +#: fortran/decl.c:3407 #, no-c-format msgid "Variable '%s' at %L may not be a C interoperable kind but it is bind(c)" msgstr "" -#: fortran/decl.c:3430 +#: fortran/decl.c:3419 #, no-c-format msgid "" "Variable '%s' in common block '%s' at %L cannot be declared with BIND(C) " "since it is not a global" msgstr "" -#: fortran/decl.c:3444 +#: fortran/decl.c:3433 #, no-c-format msgid "Variable '%s' at %L cannot have both the POINTER and BIND(C) attributes" msgstr "" -#: fortran/decl.c:3452 +#: fortran/decl.c:3441 #, no-c-format msgid "" "Variable '%s' at %L cannot have both the ALLOCATABLE and BIND(C) attributes" msgstr "" -#: fortran/decl.c:3464 +#: fortran/decl.c:3453 #, no-c-format msgid "Return type of BIND(C) function '%s' at %L cannot be an array" msgstr "" -#: fortran/decl.c:3472 +#: fortran/decl.c:3461 #, no-c-format msgid "Return type of BIND(C) function '%s' at %L cannot be a character string" msgstr "" #. Use gfc_warning_now because we won't say that the symbol fails #. just because of this. -#: fortran/decl.c:3483 +#: fortran/decl.c:3472 #, no-c-format msgid "" "Symbol '%s' at %L is marked PRIVATE but has been given the binding label '%s'" msgstr "" -#: fortran/decl.c:3558 +#: fortran/decl.c:3547 #, no-c-format msgid "" "Need either entity or common block name for attribute specification " "statement at %C" msgstr "" -#: fortran/decl.c:3605 +#: fortran/decl.c:3594 #, no-c-format msgid "" "Missing entity or common block name for attribute specification statement at " @@ -4946,644 +4691,644 @@ msgstr "" #. Now we have an error, which we signal, and then fix up #. because the knock-on is plain and simple confusing. -#: fortran/decl.c:3712 +#: fortran/decl.c:3701 #, no-c-format msgid "" "Derived type at %C has not been previously defined and so cannot appear in a " "derived type definition" msgstr "" -#: fortran/decl.c:3744 +#: fortran/decl.c:3733 #, no-c-format msgid "Syntax error in data declaration at %C" msgstr "" -#: fortran/decl.c:3901 +#: fortran/decl.c:3890 #, no-c-format msgid "Name '%s' at %C is the name of the procedure" msgstr "" -#: fortran/decl.c:3913 +#: fortran/decl.c:3902 #, no-c-format msgid "Unexpected junk in formal argument list at %C" msgstr "" -#: fortran/decl.c:3930 +#: fortran/decl.c:3919 #, no-c-format msgid "Duplicate symbol '%s' in formal argument list at %C" msgstr "" -#: fortran/decl.c:3981 +#: fortran/decl.c:3970 #, no-c-format msgid "RESULT variable at %C must be different than function name" msgstr "" -#: fortran/decl.c:4059 +#: fortran/decl.c:4047 #, no-c-format msgid "Unexpected junk after function declaration at %C" msgstr "" -#: fortran/decl.c:4069 fortran/decl.c:4869 +#: fortran/decl.c:4057 fortran/decl.c:4858 #, no-c-format msgid "" "Fortran 2008: BIND(C) attribute at %L may not be specified for an internal " "procedure" msgstr "" -#: fortran/decl.c:4137 +#: fortran/decl.c:4126 #, no-c-format msgid "Interface '%s' at %C may not be generic" msgstr "" -#: fortran/decl.c:4142 +#: fortran/decl.c:4131 #, no-c-format msgid "Interface '%s' at %C may not be a statement function" msgstr "" -#: fortran/decl.c:4155 +#: fortran/decl.c:4144 #, no-c-format msgid "Intrinsic procedure '%s' not allowed in PROCEDURE statement at %C" msgstr "" -#: fortran/decl.c:4191 +#: fortran/decl.c:4180 #, no-c-format msgid "BIND(C) attribute at %C requires an interface with BIND(C)" msgstr "" -#: fortran/decl.c:4198 +#: fortran/decl.c:4187 #, no-c-format msgid "BIND(C) procedure with NAME may not have POINTER attribute at %C" msgstr "" -#: fortran/decl.c:4204 +#: fortran/decl.c:4193 #, no-c-format msgid "Dummy procedure at %C may not have BIND(C) attribute with NAME" msgstr "" -#: fortran/decl.c:4274 fortran/decl.c:4322 +#: fortran/decl.c:4263 fortran/decl.c:4311 #, no-c-format msgid "Syntax error in PROCEDURE statement at %C" msgstr "" -#: fortran/decl.c:4296 +#: fortran/decl.c:4285 #, no-c-format msgid "PROCEDURE at %C must be in a generic interface" msgstr "" -#: fortran/decl.c:4349 +#: fortran/decl.c:4338 #, no-c-format msgid "" "Fortran 2003: Procedure components at %C are not yet implemented in gfortran" msgstr "" -#: fortran/decl.c:4362 +#: fortran/decl.c:4351 #, no-c-format msgid "Fortran 2003: PROCEDURE statement at %C" msgstr "" -#: fortran/decl.c:4426 +#: fortran/decl.c:4415 #, no-c-format msgid "Expected formal argument list in function definition at %C" msgstr "" -#: fortran/decl.c:4450 fortran/decl.c:4454 fortran/decl.c:4655 -#: fortran/decl.c:4659 fortran/decl.c:4837 fortran/decl.c:4841 -#: fortran/symbol.c:1467 +#: fortran/decl.c:4439 fortran/decl.c:4443 fortran/decl.c:4644 +#: fortran/decl.c:4648 fortran/decl.c:4826 fortran/decl.c:4830 +#: fortran/symbol.c:1472 #, no-c-format msgid "BIND(C) attribute at %L can only be used for variables or common blocks" msgstr "" -#: fortran/decl.c:4486 +#: fortran/decl.c:4475 #, no-c-format msgid "Function '%s' at %C already has a type of %s" msgstr "" -#: fortran/decl.c:4577 +#: fortran/decl.c:4566 #, no-c-format msgid "ENTRY statement at %C cannot appear within a PROGRAM" msgstr "" -#: fortran/decl.c:4580 +#: fortran/decl.c:4569 #, no-c-format msgid "ENTRY statement at %C cannot appear within a MODULE" msgstr "" -#: fortran/decl.c:4583 +#: fortran/decl.c:4572 #, no-c-format msgid "ENTRY statement at %C cannot appear within a BLOCK DATA" msgstr "" -#: fortran/decl.c:4587 +#: fortran/decl.c:4576 #, no-c-format msgid "ENTRY statement at %C cannot appear within an INTERFACE" msgstr "" -#: fortran/decl.c:4591 +#: fortran/decl.c:4580 #, no-c-format msgid "ENTRY statement at %C cannot appear within a DERIVED TYPE block" msgstr "" -#: fortran/decl.c:4595 +#: fortran/decl.c:4584 #, no-c-format msgid "ENTRY statement at %C cannot appear within an IF-THEN block" msgstr "" -#: fortran/decl.c:4599 +#: fortran/decl.c:4588 #, no-c-format msgid "ENTRY statement at %C cannot appear within a DO block" msgstr "" -#: fortran/decl.c:4603 +#: fortran/decl.c:4592 #, no-c-format msgid "ENTRY statement at %C cannot appear within a SELECT block" msgstr "" -#: fortran/decl.c:4607 +#: fortran/decl.c:4596 #, no-c-format msgid "ENTRY statement at %C cannot appear within a FORALL block" msgstr "" -#: fortran/decl.c:4611 +#: fortran/decl.c:4600 #, no-c-format msgid "ENTRY statement at %C cannot appear within a WHERE block" msgstr "" -#: fortran/decl.c:4615 +#: fortran/decl.c:4604 #, no-c-format msgid "ENTRY statement at %C cannot appear within a contained subprogram" msgstr "" -#: fortran/decl.c:4633 +#: fortran/decl.c:4622 #, no-c-format msgid "ENTRY statement at %C cannot appear in a contained procedure" msgstr "" -#: fortran/decl.c:4687 fortran/decl.c:4877 +#: fortran/decl.c:4676 fortran/decl.c:4866 #, no-c-format msgid "Missing required parentheses before BIND(C) at %C" msgstr "" -#: fortran/decl.c:4939 fortran/decl.c:4955 +#: fortran/decl.c:4928 fortran/decl.c:4944 #, no-c-format msgid "Syntax error in NAME= specifier for binding label at %C" msgstr "" -#: fortran/decl.c:4970 +#: fortran/decl.c:4959 #, no-c-format msgid "Missing closing quote '\"' for binding label at %C" msgstr "" -#: fortran/decl.c:4979 +#: fortran/decl.c:4968 #, no-c-format msgid "Missing closing quote ''' for binding label at %C" msgstr "" -#: fortran/decl.c:4989 +#: fortran/decl.c:4978 #, no-c-format msgid "Missing closing paren for binding label at %C" msgstr "" -#: fortran/decl.c:4995 +#: fortran/decl.c:4984 #, no-c-format msgid "No binding name is allowed in BIND(C) at %C" msgstr "" -#: fortran/decl.c:5001 +#: fortran/decl.c:4990 #, no-c-format msgid "For dummy procedure %s, no binding name is allowed in BIND(C) at %C" msgstr "" -#: fortran/decl.c:5032 +#: fortran/decl.c:5021 #, no-c-format msgid "NAME not allowed on BIND(C) for ABSTRACT INTERFACE at %C" msgstr "" -#: fortran/decl.c:5205 +#: fortran/decl.c:5194 #, no-c-format msgid "Unexpected END statement at %C" msgstr "" #. We would have required END [something]. -#: fortran/decl.c:5214 +#: fortran/decl.c:5203 #, no-c-format msgid "%s statement expected at %L" msgstr "" -#: fortran/decl.c:5225 +#: fortran/decl.c:5214 #, no-c-format msgid "Expecting %s statement at %C" msgstr "" -#: fortran/decl.c:5240 +#: fortran/decl.c:5229 #, no-c-format msgid "Expected block name of '%s' in %s statement at %C" msgstr "" -#: fortran/decl.c:5257 +#: fortran/decl.c:5246 #, no-c-format msgid "Expected terminating name at %C" msgstr "" -#: fortran/decl.c:5266 +#: fortran/decl.c:5255 #, no-c-format msgid "Expected label '%s' for %s statement at %C" msgstr "" -#: fortran/decl.c:5320 +#: fortran/decl.c:5309 #, no-c-format msgid "Missing array specification at %L in DIMENSION statement" msgstr "" -#: fortran/decl.c:5328 +#: fortran/decl.c:5317 #, no-c-format msgid "Dimensions specified for %s at %L after its initialisation" msgstr "" -#: fortran/decl.c:5337 +#: fortran/decl.c:5326 #, no-c-format msgid "Array specification must be deferred at %L" msgstr "" -#: fortran/decl.c:5414 +#: fortran/decl.c:5403 #, no-c-format msgid "Unexpected character in variable list at %C" msgstr "" -#: fortran/decl.c:5451 +#: fortran/decl.c:5440 #, no-c-format msgid "Expected '(' at %C" msgstr "" -#: fortran/decl.c:5465 fortran/decl.c:5505 +#: fortran/decl.c:5454 fortran/decl.c:5494 #, no-c-format msgid "Expected variable name at %C" msgstr "" -#: fortran/decl.c:5481 +#: fortran/decl.c:5470 #, no-c-format msgid "Cray pointer at %C must be an integer" msgstr "" -#: fortran/decl.c:5485 +#: fortran/decl.c:5474 #, no-c-format msgid "" "Cray pointer at %C has %d bytes of precision; memory addresses require %d " "bytes" msgstr "" -#: fortran/decl.c:5491 +#: fortran/decl.c:5480 #, no-c-format msgid "Expected \",\" at %C" msgstr "" -#: fortran/decl.c:5554 +#: fortran/decl.c:5543 #, no-c-format msgid "Expected \")\" at %C" msgstr "" -#: fortran/decl.c:5566 +#: fortran/decl.c:5555 #, no-c-format msgid "Expected \",\" or end of statement at %C" msgstr "" -#: fortran/decl.c:5630 +#: fortran/decl.c:5619 #, no-c-format msgid "Cray pointer declaration at %C requires -fcray-pointer flag" msgstr "" -#: fortran/decl.c:5725 +#: fortran/decl.c:5714 #, no-c-format msgid "" "Access specification of the %s operator at %C has already been specified" msgstr "" -#: fortran/decl.c:5742 +#: fortran/decl.c:5731 #, no-c-format msgid "" "Access specification of the .%s. operator at %C has already been specified" msgstr "" -#: fortran/decl.c:5780 +#: fortran/decl.c:5769 #, no-c-format msgid "Fortran 2003: PROTECTED statement at %C" msgstr "" -#: fortran/decl.c:5820 +#: fortran/decl.c:5809 #, no-c-format msgid "Syntax error in PROTECTED statement at %C" msgstr "" -#: fortran/decl.c:5844 +#: fortran/decl.c:5833 #, no-c-format msgid "" "PRIVATE statement at %C is only allowed in the specification part of a module" msgstr "" -#: fortran/decl.c:5881 +#: fortran/decl.c:5870 #, no-c-format msgid "" "PUBLIC statement at %C is only allowed in the specification part of a module" msgstr "" -#: fortran/decl.c:5908 +#: fortran/decl.c:5897 #, no-c-format msgid "Expected variable name at %C in PARAMETER statement" msgstr "" -#: fortran/decl.c:5915 +#: fortran/decl.c:5904 #, no-c-format msgid "Expected = sign in PARAMETER statement at %C" msgstr "" -#: fortran/decl.c:5921 +#: fortran/decl.c:5910 #, no-c-format msgid "Expected expression at %C in PARAMETER statement" msgstr "" -#: fortran/decl.c:5941 +#: fortran/decl.c:5930 #, no-c-format msgid "Initializing already initialized variable at %C" msgstr "" -#: fortran/decl.c:6003 +#: fortran/decl.c:5992 #, no-c-format msgid "Unexpected characters in PARAMETER statement at %C" msgstr "" -#: fortran/decl.c:6027 +#: fortran/decl.c:6016 #, no-c-format msgid "Blanket SAVE statement at %C follows previous SAVE statement" msgstr "" -#: fortran/decl.c:6039 +#: fortran/decl.c:6028 #, no-c-format msgid "SAVE statement at %C follows blanket SAVE statement" msgstr "" -#: fortran/decl.c:6086 +#: fortran/decl.c:6075 #, no-c-format msgid "Syntax error in SAVE statement at %C" msgstr "" -#: fortran/decl.c:6097 +#: fortran/decl.c:6086 #, no-c-format msgid "Fortran 2003: VALUE statement at %C" msgstr "" -#: fortran/decl.c:6137 +#: fortran/decl.c:6126 #, no-c-format msgid "Syntax error in VALUE statement at %C" msgstr "" -#: fortran/decl.c:6148 +#: fortran/decl.c:6137 #, no-c-format msgid "Fortran 2003: VOLATILE statement at %C" msgstr "" -#: fortran/decl.c:6190 +#: fortran/decl.c:6179 #, no-c-format msgid "Syntax error in VOLATILE statement at %C" msgstr "" -#: fortran/decl.c:6213 +#: fortran/decl.c:6202 #, no-c-format msgid "MODULE PROCEDURE at %C must be in a generic module interface" msgstr "" -#: fortran/decl.c:6295 +#: fortran/decl.c:6284 #, no-c-format msgid "Ambiguous symbol in TYPE definition at %C" msgstr "" -#: fortran/decl.c:6301 +#: fortran/decl.c:6290 #, no-c-format msgid "No such symbol in TYPE definition at %C" msgstr "" -#: fortran/decl.c:6307 +#: fortran/decl.c:6296 #, no-c-format msgid "'%s' in EXTENDS expression at %C is not a derived type" msgstr "" -#: fortran/decl.c:6314 +#: fortran/decl.c:6303 #, no-c-format msgid "'%s' cannot be extended at %C because it is BIND(C)" msgstr "" -#: fortran/decl.c:6321 +#: fortran/decl.c:6310 #, no-c-format msgid "'%s' cannot be extended at %C because it is a SEQUENCE type" msgstr "" -#: fortran/decl.c:6344 +#: fortran/decl.c:6333 #, no-c-format msgid "" "Derived type at %C can only be PRIVATE in the specification part of a module" msgstr "" -#: fortran/decl.c:6356 +#: fortran/decl.c:6345 #, no-c-format msgid "" "Derived type at %C can only be PUBLIC in the specification part of a module" msgstr "" -#: fortran/decl.c:6377 +#: fortran/decl.c:6366 #, no-c-format msgid "Fortran 2003: ABSTRACT type at %C" msgstr "" -#: fortran/decl.c:6441 +#: fortran/decl.c:6430 #, no-c-format msgid "Expected :: in TYPE definition at %C" msgstr "" -#: fortran/decl.c:6452 +#: fortran/decl.c:6441 #, no-c-format msgid "Type name '%s' at %C cannot be the same as an intrinsic type" msgstr "" -#: fortran/decl.c:6462 +#: fortran/decl.c:6451 #, no-c-format msgid "Derived type name '%s' at %C already has a basic type of %s" msgstr "" -#: fortran/decl.c:6478 +#: fortran/decl.c:6467 #, no-c-format msgid "Derived type definition of '%s' at %C has already been defined" msgstr "" -#: fortran/decl.c:6545 +#: fortran/decl.c:6534 #, no-c-format msgid "Cray Pointee at %C cannot be assumed shape array" msgstr "" -#: fortran/decl.c:6565 +#: fortran/decl.c:6554 #, no-c-format msgid "Fortran 2003: ENUM and ENUMERATOR at %C" msgstr "" -#: fortran/decl.c:6637 +#: fortran/decl.c:6626 #, no-c-format msgid "ENUMERATOR %L not initialized with integer expression" msgstr "" -#: fortran/decl.c:6686 +#: fortran/decl.c:6675 #, no-c-format msgid "ENUM definition statement expected before %C" msgstr "" -#: fortran/decl.c:6719 +#: fortran/decl.c:6708 #, no-c-format msgid "Syntax error in ENUMERATOR definition at %C" msgstr "" -#: fortran/decl.c:6765 fortran/decl.c:6780 +#: fortran/decl.c:6754 fortran/decl.c:6769 #, no-c-format msgid "Duplicate access-specifier at %C" msgstr "" -#: fortran/decl.c:6800 +#: fortran/decl.c:6789 #, no-c-format msgid "Binding attributes already specify passing, illegal NOPASS at %C" msgstr "" -#: fortran/decl.c:6818 +#: fortran/decl.c:6807 #, no-c-format msgid "Duplicate NON_OVERRIDABLE at %C" msgstr "" -#: fortran/decl.c:6833 +#: fortran/decl.c:6822 #, no-c-format msgid "DEFERRED not yet implemented at %C" msgstr "" -#: fortran/decl.c:6847 +#: fortran/decl.c:6836 #, no-c-format msgid "Binding attributes already specify passing, illegal PASS at %C" msgstr "" -#: fortran/decl.c:6868 +#: fortran/decl.c:6857 #, no-c-format msgid "Expected access-specifier at %C" msgstr "" -#: fortran/decl.c:6870 +#: fortran/decl.c:6859 #, no-c-format msgid "Expected binding attribute at %C" msgstr "" -#: fortran/decl.c:6910 +#: fortran/decl.c:6899 #, no-c-format msgid "PROCEDURE(interface) at %C is not yet implemented" msgstr "" -#: fortran/decl.c:6932 +#: fortran/decl.c:6921 #, no-c-format msgid "Expected '::' after binding-attributes at %C" msgstr "" -#: fortran/decl.c:6942 +#: fortran/decl.c:6931 #, no-c-format msgid "Expected binding name at %C" msgstr "" -#: fortran/decl.c:6955 +#: fortran/decl.c:6944 #, no-c-format msgid "'::' needed in PROCEDURE binding with explicit target at %C" msgstr "" -#: fortran/decl.c:6965 +#: fortran/decl.c:6954 #, no-c-format msgid "Expected binding target after '=>' at %C" msgstr "" -#: fortran/decl.c:6977 +#: fortran/decl.c:6966 #, no-c-format msgid "Junk after PROCEDURE declaration at %C" msgstr "" -#: fortran/decl.c:6995 +#: fortran/decl.c:6984 #, no-c-format msgid "" "There's already a procedure with binding name '%s' for the derived type '%s' " "at %C" msgstr "" -#: fortran/decl.c:7028 +#: fortran/decl.c:7017 #, no-c-format msgid "GENERIC at %C must be inside a derived-type CONTAINS" msgstr "" -#: fortran/decl.c:7045 +#: fortran/decl.c:7034 #, no-c-format msgid "Expected '::' at %C" msgstr "" -#: fortran/decl.c:7055 +#: fortran/decl.c:7044 #, no-c-format msgid "Expected generic name at %C" msgstr "" -#: fortran/decl.c:7066 +#: fortran/decl.c:7055 #, no-c-format msgid "" "There's already a non-generic procedure with binding name '%s' for the " "derived type '%s' at %C" msgstr "" -#: fortran/decl.c:7075 +#: fortran/decl.c:7064 #, no-c-format msgid "Binding at %C must have the same access as already defined binding '%s'" msgstr "" -#: fortran/decl.c:7103 +#: fortran/decl.c:7092 #, no-c-format msgid "Expected specific binding name at %C" msgstr "" -#: fortran/decl.c:7114 +#: fortran/decl.c:7103 #, no-c-format msgid "'%s' already defined as specific binding for the generic '%s' at %C" msgstr "" -#: fortran/decl.c:7132 +#: fortran/decl.c:7121 #, no-c-format msgid "Junk after GENERIC binding at %C" msgstr "" -#: fortran/decl.c:7157 +#: fortran/decl.c:7146 #, no-c-format msgid "FINAL declaration at %C must be inside a derived type CONTAINS section" msgstr "" -#: fortran/decl.c:7168 +#: fortran/decl.c:7157 #, no-c-format msgid "" "Derived type declaration with FINAL at %C must be in the specification part " "of a MODULE" msgstr "" -#: fortran/decl.c:7190 +#: fortran/decl.c:7179 #, no-c-format msgid "Empty FINAL at %C" msgstr "" -#: fortran/decl.c:7197 +#: fortran/decl.c:7186 #, no-c-format msgid "Expected module procedure name at %C" msgstr "" -#: fortran/decl.c:7207 +#: fortran/decl.c:7196 #, no-c-format msgid "Expected ',' at %C" msgstr "" -#: fortran/decl.c:7213 +#: fortran/decl.c:7202 #, no-c-format msgid "Unknown procedure name \"%s\" at %C" msgstr "" -#: fortran/decl.c:7227 +#: fortran/decl.c:7216 #, no-c-format msgid "'%s' at %C is already defined as FINAL procedure!" msgstr "" @@ -5593,7 +5338,7 @@ msgstr "" #. If a dependency is found in the case #. elemental == ELEM_CHECK_VARIABLE, we will generate #. a temporary, so we don't need to bother the user. -#: fortran/dependency.c:461 +#: fortran/dependency.c:486 #, no-c-format msgid "" "INTENT(%s) actual argument at %L might interfere with actual argument at %L." @@ -5604,29 +5349,29 @@ msgstr "" msgid " Included at %s:%d:" msgstr "" -#: fortran/error.c:390 +#: fortran/error.c:382 #, no-c-format msgid "<During initialization>\n" msgstr "" -#: fortran/error.c:723 +#: fortran/error.c:715 #, no-c-format msgid "Error count reached limit of %d." msgstr "" -#: fortran/error.c:742 fortran/error.c:796 fortran/error.c:833 +#: fortran/error.c:734 fortran/error.c:788 fortran/error.c:825 msgid "Warning:" msgstr "" -#: fortran/error.c:798 fortran/error.c:881 fortran/error.c:907 +#: fortran/error.c:790 fortran/error.c:873 fortran/error.c:899 msgid "Error:" msgstr "" -#: fortran/error.c:931 +#: fortran/error.c:923 msgid "Fatal Error:" msgstr "" -#: fortran/error.c:950 +#: fortran/error.c:942 #, no-c-format msgid "Internal Error at (1):" msgstr "" @@ -5646,360 +5391,366 @@ msgstr "" msgid "Integer value too large in expression at %C" msgstr "" -#: fortran/expr.c:1047 +#: fortran/expr.c:1056 #, no-c-format msgid "Index in dimension %d is out of bounds at %L" msgstr "" -#: fortran/expr.c:1218 fortran/expr.c:1269 +#: fortran/expr.c:1227 fortran/expr.c:1278 #, no-c-format msgid "index in dimension %d is out of bounds at %L" msgstr "" -#: fortran/expr.c:1871 +#: fortran/expr.c:1880 #, no-c-format msgid "elemental function arguments at %C are not compliant" msgstr "" -#: fortran/expr.c:1915 +#: fortran/expr.c:1924 #, no-c-format msgid "Numeric or CHARACTER operands are required in expression at %L" msgstr "" -#: fortran/expr.c:1935 +#: fortran/expr.c:1944 #, no-c-format msgid "Fortran 2003: Noninteger exponent in an initialization expression at %L" msgstr "" -#: fortran/expr.c:1950 +#: fortran/expr.c:1959 #, no-c-format msgid "" "Concatenation operator in expression at %L must have two CHARACTER operands" msgstr "" -#: fortran/expr.c:1957 +#: fortran/expr.c:1966 #, no-c-format msgid "Concat operator at %L must concatenate strings of the same kind" msgstr "" -#: fortran/expr.c:1967 +#: fortran/expr.c:1976 #, no-c-format msgid ".NOT. operator in expression at %L must have a LOGICAL operand" msgstr "" -#: fortran/expr.c:1983 +#: fortran/expr.c:1992 #, no-c-format msgid "LOGICAL operands are required in expression at %L" msgstr "" -#: fortran/expr.c:1994 +#: fortran/expr.c:2003 #, no-c-format msgid "Only intrinsic operators can be used in expression at %L" msgstr "" -#: fortran/expr.c:2002 +#: fortran/expr.c:2011 #, no-c-format msgid "Numeric operands are required in expression at %L" msgstr "" -#: fortran/expr.c:2095 +#: fortran/expr.c:2104 #, no-c-format msgid "Assumed character length variable '%s' in constant expression at %L" msgstr "" -#: fortran/expr.c:2146 fortran/expr.c:2152 +#: fortran/expr.c:2155 fortran/expr.c:2161 #, no-c-format msgid "" "transformational intrinsic '%s' at %L is not permitted in an initialization " "expression" msgstr "" -#: fortran/expr.c:2184 +#: fortran/expr.c:2193 #, no-c-format msgid "Extension: Evaluation of nonstandard initialization expression at %L" msgstr "" -#: fortran/expr.c:2241 +#: fortran/expr.c:2250 #, no-c-format msgid "" "Function '%s' in initialization expression at %L must be an intrinsic or a " "specification function" msgstr "" -#: fortran/expr.c:2253 +#: fortran/expr.c:2262 #, no-c-format msgid "" "Intrinsic function '%s' at %L is not permitted in an initialization " "expression" msgstr "" -#: fortran/expr.c:2285 +#: fortran/expr.c:2294 #, no-c-format msgid "PARAMETER '%s' is used at %L before its definition is complete" msgstr "" -#: fortran/expr.c:2305 +#: fortran/expr.c:2314 #, no-c-format msgid "" "Assumed size array '%s' at %L is not permitted in an initialization " "expression" msgstr "" -#: fortran/expr.c:2311 +#: fortran/expr.c:2320 #, no-c-format msgid "" "Assumed shape array '%s' at %L is not permitted in an initialization " "expression" msgstr "" -#: fortran/expr.c:2317 +#: fortran/expr.c:2326 #, no-c-format msgid "" "Deferred array '%s' at %L is not permitted in an initialization expression" msgstr "" -#: fortran/expr.c:2323 +#: fortran/expr.c:2332 #, no-c-format msgid "" "Array '%s' at %L is a variable, which does not reduce to a constant " "expression" msgstr "" -#: fortran/expr.c:2333 +#: fortran/expr.c:2342 #, no-c-format msgid "" "Parameter '%s' at %L has not been declared or is a variable, which does not " "reduce to a constant expression" msgstr "" -#: fortran/expr.c:2409 +#: fortran/expr.c:2418 #, no-c-format msgid "Initialization expression didn't reduce %C" msgstr "" -#: fortran/expr.c:2477 +#: fortran/expr.c:2486 #, no-c-format msgid "Specification function '%s' at %L cannot be a statement function" msgstr "" -#: fortran/expr.c:2484 +#: fortran/expr.c:2493 #, no-c-format msgid "Specification function '%s' at %L cannot be an internal function" msgstr "" -#: fortran/expr.c:2491 +#: fortran/expr.c:2500 #, no-c-format msgid "Specification function '%s' at %L must be PURE" msgstr "" -#: fortran/expr.c:2498 +#: fortran/expr.c:2507 #, no-c-format msgid "Specification function '%s' at %L cannot be RECURSIVE" msgstr "" -#: fortran/expr.c:2632 +#: fortran/expr.c:2641 #, no-c-format msgid "Dummy argument '%s' not allowed in expression at %L" msgstr "" -#: fortran/expr.c:2639 +#: fortran/expr.c:2648 #, no-c-format msgid "Dummy argument '%s' at %L cannot be OPTIONAL" msgstr "" -#: fortran/expr.c:2646 +#: fortran/expr.c:2655 #, no-c-format msgid "Dummy argument '%s' at %L cannot be INTENT(OUT)" msgstr "" -#: fortran/expr.c:2677 +#: fortran/expr.c:2686 #, no-c-format msgid "Variable '%s' cannot appear in the expression at %L" msgstr "" -#: fortran/expr.c:2727 +#: fortran/expr.c:2736 #, no-c-format msgid "Expression at %L must be of INTEGER type, found %s" msgstr "" -#: fortran/expr.c:2737 +#: fortran/expr.c:2746 #, no-c-format msgid "Function '%s' at %L must be PURE" msgstr "" -#: fortran/expr.c:2746 +#: fortran/expr.c:2755 #, no-c-format msgid "Expression at %L must be scalar" msgstr "" -#: fortran/expr.c:2773 +#: fortran/expr.c:2782 #, no-c-format msgid "Incompatible ranks in %s (%d and %d) at %L" msgstr "" -#: fortran/expr.c:2787 +#: fortran/expr.c:2796 #, no-c-format msgid "Different shape for %s at %L on dimension %d (%d and %d)" msgstr "" -#: fortran/expr.c:2833 fortran/expr.c:3089 +#: fortran/expr.c:2842 fortran/expr.c:3099 #, no-c-format msgid "Cannot assign to INTENT(IN) variable '%s' at %L" msgstr "" -#: fortran/expr.c:2885 +#: fortran/expr.c:2894 #, no-c-format msgid "'%s' at %L is not a VALUE" msgstr "" -#: fortran/expr.c:2892 +#: fortran/expr.c:2901 #, no-c-format msgid "Incompatible ranks %d and %d in assignment at %L" msgstr "" -#: fortran/expr.c:2899 +#: fortran/expr.c:2908 #, no-c-format msgid "Variable type is UNKNOWN in assignment at %L" msgstr "" -#: fortran/expr.c:2911 +#: fortran/expr.c:2920 #, no-c-format msgid "NULL appears on right-hand side in assignment at %L" msgstr "" -#: fortran/expr.c:2922 +#: fortran/expr.c:2931 #, no-c-format msgid "Vector assignment to assumed-size Cray Pointee at %L is illegal" msgstr "" -#: fortran/expr.c:2931 +#: fortran/expr.c:2940 #, no-c-format msgid "POINTER valued function appears on right-hand side of assignment at %L" msgstr "" -#: fortran/expr.c:2936 +#: fortran/expr.c:2945 msgid "array assignment" msgstr "" -#: fortran/expr.c:2941 +#: fortran/expr.c:2950 #, no-c-format msgid "" "Extension: BOZ literal at %L used to initialize non-integer variable '%s'" msgstr "" -#: fortran/expr.c:2947 fortran/resolve.c:6456 +#: fortran/expr.c:2956 fortran/resolve.c:6536 #, no-c-format msgid "" "Extension: BOZ literal at %L outside a DATA statement and outside INT/REAL/" "DBLE/CMPLX" msgstr "" -#: fortran/expr.c:2957 fortran/resolve.c:6466 +#: fortran/expr.c:2966 fortran/resolve.c:6546 #, no-c-format msgid "BOZ literal at %L is bitwise transferred non-integer symbol '%s'" msgstr "" -#: fortran/expr.c:2965 fortran/resolve.c:6475 +#: fortran/expr.c:2974 fortran/resolve.c:6555 #, no-c-format msgid "" "Arithmetic underflow of bit-wise transferred BOZ at %L. This check can be " "disabled with the option -fno-range-check" msgstr "" -#: fortran/expr.c:2969 fortran/resolve.c:6479 +#: fortran/expr.c:2978 fortran/resolve.c:6559 #, no-c-format msgid "" "Arithmetic overflow of bit-wise transferred BOZ at %L. This check can be " "disabled with the option -fno-range-check" msgstr "" -#: fortran/expr.c:2973 fortran/resolve.c:6483 +#: fortran/expr.c:2982 fortran/resolve.c:6563 #, no-c-format msgid "" "Arithmetic NaN of bit-wise transferred BOZ at %L. This check can be disabled " "with the option -fno-range-check" msgstr "" -#: fortran/expr.c:2995 +#: fortran/expr.c:3004 #, no-c-format msgid "" "Incompatible types in DATA statement at %L; attempted conversion of %s to %s" msgstr "" -#: fortran/expr.c:3031 +#: fortran/expr.c:3040 #, no-c-format msgid "Pointer assignment target is not a POINTER at %L" msgstr "" -#: fortran/expr.c:3039 +#: fortran/expr.c:3049 #, no-c-format msgid "" "'%s' in the pointer assignment at %L cannot be an l-value since it is a " "procedure" msgstr "" -#: fortran/expr.c:3067 +#: fortran/expr.c:3077 #, no-c-format msgid "Expected bounds specification for '%s' at %L" msgstr "" -#: fortran/expr.c:3072 +#: fortran/expr.c:3082 #, no-c-format msgid "Fortran 2003: Bounds specification for '%s' in pointer assignment at %L" msgstr "" -#: fortran/expr.c:3078 +#: fortran/expr.c:3088 #, no-c-format msgid "Pointer bounds remapping at %L is not yet implemented in gfortran" msgstr "" -#: fortran/expr.c:3096 +#: fortran/expr.c:3106 #, no-c-format msgid "Pointer assignment to non-POINTER at %L" msgstr "" -#: fortran/expr.c:3105 +#: fortran/expr.c:3115 #, no-c-format msgid "Bad pointer object in PURE procedure at %L" msgstr "" -#: fortran/expr.c:3121 +#: fortran/expr.c:3134 +#, no-c-format +msgid "Invalid procedure pointer assignment at %L" +msgstr "" + +#: fortran/expr.c:3140 #, no-c-format msgid "" -"Different types in pointer assignment at %L; attempted assignment of %s to %s" +"Abstract interface '%s' is invalid in procedure pointer assignment at %L" msgstr "" -#: fortran/expr.c:3129 +#: fortran/expr.c:3159 #, no-c-format -msgid "Different kind type parameters in pointer assignment at %L" +msgid "" +"Different types in pointer assignment at %L; attempted assignment of %s to %s" msgstr "" -#: fortran/expr.c:3136 +#: fortran/expr.c:3167 #, no-c-format -msgid "Different ranks in pointer assignment at %L" +msgid "Different kind type parameters in pointer assignment at %L" msgstr "" -#: fortran/expr.c:3151 +#: fortran/expr.c:3174 #, no-c-format -msgid "Different character lengths in pointer assignment at %L" +msgid "Different ranks in pointer assignment at %L" msgstr "" -#: fortran/expr.c:3162 +#: fortran/expr.c:3196 #, no-c-format msgid "Pointer assignment target is neither TARGET nor POINTER at %L" msgstr "" -#: fortran/expr.c:3169 +#: fortran/expr.c:3203 #, no-c-format msgid "Bad target in pointer assignment in PURE procedure at %L" msgstr "" -#: fortran/expr.c:3175 +#: fortran/expr.c:3209 #, no-c-format msgid "Pointer assignment with vector subscript on rhs at %L" msgstr "" -#: fortran/expr.c:3183 +#: fortran/expr.c:3217 #, no-c-format msgid "Pointer assignment target has PROTECTED attribute at %L" msgstr "" @@ -6094,212 +5845,212 @@ msgstr "" msgid "Expecting 'END INTERFACE %s' at %C" msgstr "" -#: fortran/interface.c:562 +#: fortran/interface.c:571 #, no-c-format msgid "Alternate return cannot appear in operator interface at %L" msgstr "" -#: fortran/interface.c:592 +#: fortran/interface.c:601 #, no-c-format msgid "Operator interface at %L has the wrong number of arguments" msgstr "" -#: fortran/interface.c:603 +#: fortran/interface.c:612 #, no-c-format msgid "Assignment operator interface at %L must be a SUBROUTINE" msgstr "" -#: fortran/interface.c:609 +#: fortran/interface.c:618 #, no-c-format msgid "Assignment operator interface at %L must have two arguments" msgstr "" -#: fortran/interface.c:624 +#: fortran/interface.c:633 #, no-c-format msgid "" "Assignment operator interface at %L must not redefine an INTRINSIC type " "assignment" msgstr "" -#: fortran/interface.c:633 +#: fortran/interface.c:642 #, no-c-format msgid "Intrinsic operator interface at %L must be a FUNCTION" msgstr "" -#: fortran/interface.c:643 +#: fortran/interface.c:652 #, no-c-format msgid "" "First argument of defined assignment at %L must be INTENT(OUT) or INTENT" "(INOUT)" msgstr "" -#: fortran/interface.c:647 +#: fortran/interface.c:656 #, no-c-format msgid "Second argument of defined assignment at %L must be INTENT(IN)" msgstr "" -#: fortran/interface.c:653 fortran/resolve.c:10246 +#: fortran/interface.c:662 fortran/resolve.c:10333 #, no-c-format msgid "First argument of operator interface at %L must be INTENT(IN)" msgstr "" -#: fortran/interface.c:657 fortran/resolve.c:10258 +#: fortran/interface.c:666 fortran/resolve.c:10345 #, no-c-format msgid "Second argument of operator interface at %L must be INTENT(IN)" msgstr "" -#: fortran/interface.c:760 +#: fortran/interface.c:769 #, no-c-format msgid "Operator interface at %L conflicts with intrinsic interface" msgstr "" -#: fortran/interface.c:1121 +#: fortran/interface.c:1130 #, no-c-format msgid "Procedure '%s' in %s at %L has no explicit interface" msgstr "" -#: fortran/interface.c:1124 +#: fortran/interface.c:1133 #, no-c-format msgid "Procedure '%s' in %s at %L is neither function nor subroutine" msgstr "" -#: fortran/interface.c:1179 fortran/interface.c:1185 +#: fortran/interface.c:1188 fortran/interface.c:1194 #, no-c-format msgid "Ambiguous interfaces '%s' and '%s' in %s at %L" msgstr "" -#: fortran/interface.c:1221 +#: fortran/interface.c:1230 #, no-c-format msgid "'%s' at %L is not a module procedure" msgstr "" -#: fortran/interface.c:1469 fortran/interface.c:2428 +#: fortran/interface.c:1478 fortran/interface.c:2440 #, no-c-format msgid "Type/rank mismatch in argument '%s' at %L" msgstr "" -#: fortran/interface.c:1478 +#: fortran/interface.c:1487 #, no-c-format msgid "Type mismatch in argument '%s' at %L; passed %s to %s" msgstr "" -#: fortran/interface.c:1496 fortran/interface.c:1536 +#: fortran/interface.c:1505 fortran/interface.c:1545 #, no-c-format msgid "Rank mismatch in argument '%s' at %L (%d and %d)" msgstr "" -#: fortran/interface.c:1523 +#: fortran/interface.c:1532 #, no-c-format msgid "" "Fortran 2003: Scalar CHARACTER actual argument with array dummy argument '%" "s' at %L" msgstr "" -#: fortran/interface.c:1548 +#: fortran/interface.c:1557 #, no-c-format msgid "Element of assumed-shaped array passed to dummy argument '%s' at %L" msgstr "" -#: fortran/interface.c:1865 +#: fortran/interface.c:1874 #, no-c-format msgid "Keyword argument '%s' at %L is not in the procedure" msgstr "" -#: fortran/interface.c:1873 +#: fortran/interface.c:1882 #, no-c-format msgid "" "Keyword argument '%s' at %L is already associated with another actual " "argument" msgstr "" -#: fortran/interface.c:1883 +#: fortran/interface.c:1892 #, no-c-format msgid "More actual than formal arguments in procedure call at %L" msgstr "" -#: fortran/interface.c:1895 fortran/interface.c:2127 +#: fortran/interface.c:1904 fortran/interface.c:2136 #, no-c-format msgid "Missing alternate return spec in subroutine call at %L" msgstr "" -#: fortran/interface.c:1903 +#: fortran/interface.c:1912 #, no-c-format msgid "Unexpected alternate return spec in subroutine call at %L" msgstr "" -#: fortran/interface.c:1926 +#: fortran/interface.c:1935 #, no-c-format msgid "" "Character length mismatch (%ld/%ld) between actual argument and pointer or " "allocatable dummy argument '%s' at %L" msgstr "" -#: fortran/interface.c:1933 +#: fortran/interface.c:1942 #, no-c-format msgid "" "Character length mismatch (%ld/%ld) between actual argument and assumed-" "shape dummy argument '%s' at %L" msgstr "" -#: fortran/interface.c:1949 +#: fortran/interface.c:1958 #, no-c-format msgid "" "Character length of actual argument shorter than of dummy argument '%s' (%lu/" "%lu) at %L" msgstr "" -#: fortran/interface.c:1954 +#: fortran/interface.c:1963 #, no-c-format msgid "" "Actual argument contains too few elements for dummy argument '%s' (%lu/%lu) " "at %L" msgstr "" -#: fortran/interface.c:1967 +#: fortran/interface.c:1976 #, no-c-format msgid "Expected a procedure pointer for argument '%s' at %L" msgstr "" -#: fortran/interface.c:1979 +#: fortran/interface.c:1988 #, no-c-format msgid "Expected a procedure for argument '%s' at %L" msgstr "" -#: fortran/interface.c:1989 +#: fortran/interface.c:1998 #, no-c-format msgid "Expected a PURE procedure for argument '%s' at %L" msgstr "" -#: fortran/interface.c:2003 +#: fortran/interface.c:2012 #, no-c-format msgid "Actual argument for '%s' cannot be an assumed-size array at %L" msgstr "" -#: fortran/interface.c:2012 +#: fortran/interface.c:2021 #, no-c-format msgid "Actual argument for '%s' must be a pointer at %L" msgstr "" -#: fortran/interface.c:2021 +#: fortran/interface.c:2030 #, no-c-format msgid "Actual argument for '%s' must be ALLOCATABLE at %L" msgstr "" -#: fortran/interface.c:2034 +#: fortran/interface.c:2043 #, no-c-format msgid "" "Actual argument at %L must be definable as the dummy argument '%s' is INTENT " "= OUT/INOUT" msgstr "" -#: fortran/interface.c:2043 +#: fortran/interface.c:2052 #, no-c-format msgid "" "Actual argument at %L is use-associated with PROTECTED attribute and dummy " "argument '%s' is INTENT = OUT/INOUT" msgstr "" -#: fortran/interface.c:2056 +#: fortran/interface.c:2065 #, no-c-format msgid "" "Array-section actual argument with vector subscripts at %L is incompatible " @@ -6307,75 +6058,75 @@ msgid "" "'%s'" msgstr "" -#: fortran/interface.c:2073 +#: fortran/interface.c:2082 #, no-c-format msgid "" "Assumed-shape actual argument at %L is incompatible with the non-assumed-" "shape dummy argument '%s' due to VOLATILE attribute" msgstr "" -#: fortran/interface.c:2085 +#: fortran/interface.c:2094 #, no-c-format msgid "" "Array-section actual argument at %L is incompatible with the non-assumed-" "shape dummy argument '%s' due to VOLATILE attribute" msgstr "" -#: fortran/interface.c:2104 +#: fortran/interface.c:2113 #, no-c-format msgid "" "Pointer-array actual argument at %L requires an assumed-shape or pointer-" "array dummy argument '%s' due to VOLATILE attribute" msgstr "" -#: fortran/interface.c:2134 +#: fortran/interface.c:2143 #, no-c-format msgid "Missing actual argument for argument '%s' at %L" msgstr "" -#: fortran/interface.c:2320 +#: fortran/interface.c:2329 #, no-c-format msgid "" "Same actual argument associated with INTENT(%s) argument '%s' and INTENT(%s) " "argument '%s' at %L" msgstr "" -#: fortran/interface.c:2376 +#: fortran/interface.c:2385 #, no-c-format msgid "" "Procedure argument at %L is INTENT(IN) while interface specifies INTENT(%s)" msgstr "" -#: fortran/interface.c:2386 +#: fortran/interface.c:2395 #, no-c-format msgid "" "Procedure argument at %L is local to a PURE procedure and is passed to an " "INTENT(%s) argument" msgstr "" -#: fortran/interface.c:2394 +#: fortran/interface.c:2403 #, no-c-format msgid "" "Procedure argument at %L is local to a PURE procedure and has the POINTER " "attribute" msgstr "" -#: fortran/interface.c:2417 +#: fortran/interface.c:2429 #, no-c-format msgid "Procedure '%s' called with an implicit interface at %L" msgstr "" -#: fortran/interface.c:2442 +#: fortran/interface.c:2454 #, no-c-format msgid "Keyword argument requires explicit interface for procedure '%s' at %L" msgstr "" -#: fortran/interface.c:2676 +#: fortran/interface.c:2689 #, no-c-format msgid "Function '%s' called in lieu of an operator at %L must be PURE" msgstr "" -#: fortran/interface.c:2756 +#: fortran/interface.c:2769 #, no-c-format msgid "Entity '%s' at %C is already present in the interface" msgstr "" @@ -6425,459 +6176,463 @@ msgstr "" msgid "Type of argument '%s' in call to '%s' at %L should be %s, not %s" msgstr "" -#: fortran/intrinsic.c:3559 +#: fortran/intrinsic.c:3556 #, no-c-format msgid "Intrinsic '%s' (is %s) is used at %L" msgstr "" -#: fortran/intrinsic.c:3623 +#: fortran/intrinsic.c:3620 #, no-c-format msgid "Fortran 2003: Function '%s' as initialization expression at %L" msgstr "" -#: fortran/intrinsic.c:3699 +#: fortran/intrinsic.c:3696 #, no-c-format msgid "" "Fortran 2003: Elemental function as initialization expression with non-" "integer/non-character arguments at %L" msgstr "" -#: fortran/intrinsic.c:3760 +#: fortran/intrinsic.c:3757 #, no-c-format msgid "Subroutine call to intrinsic '%s' at %L is not PURE" msgstr "" -#: fortran/intrinsic.c:3832 +#: fortran/intrinsic.c:3829 #, no-c-format msgid "Extension: Conversion from %s to %s at %L" msgstr "" -#: fortran/intrinsic.c:3835 +#: fortran/intrinsic.c:3832 #, no-c-format msgid "Conversion from %s to %s at %L" msgstr "" -#: fortran/intrinsic.c:3882 +#: fortran/intrinsic.c:3879 #, no-c-format msgid "Can't convert %s to %s at %L" msgstr "" -#: fortran/intrinsic.c:3978 +#: fortran/intrinsic.c:3975 #, no-c-format msgid "" "'%s' declared at %L may shadow the intrinsic of the same name. In order to " "call the intrinsic, explicit INTRINSIC declarations may be required." msgstr "" -#: fortran/intrinsic.c:3983 +#: fortran/intrinsic.c:3980 #, no-c-format msgid "" "'%s' declared at %L is also the name of an intrinsic. It can only be called " "via an explicit interface or if declared EXTERNAL." msgstr "" -#: fortran/io.c:164 fortran/primary.c:768 +#: fortran/io.c:165 fortran/primary.c:768 #, no-c-format msgid "Extension: backslash character at %C" msgstr "" -#: fortran/io.c:198 fortran/io.c:201 +#: fortran/io.c:201 fortran/io.c:204 #, no-c-format msgid "Extension: Tab character in format at %C" msgstr "" -#: fortran/io.c:445 +#: fortran/io.c:448 #, no-c-format msgid "Fortran 2003: DP format specifier not allowed at %C" msgstr "" -#: fortran/io.c:452 +#: fortran/io.c:455 #, no-c-format msgid "Fortran 2003: DC format specifier not allowed at %C" msgstr "" -#: fortran/io.c:488 +#: fortran/io.c:491 msgid "Positive width required" msgstr "" -#: fortran/io.c:489 +#: fortran/io.c:492 msgid "Nonnegative width required" msgstr "" -#: fortran/io.c:490 +#: fortran/io.c:493 msgid "Unexpected element '%c' in format string at %L" msgstr "" -#: fortran/io.c:492 +#: fortran/io.c:495 msgid "Unexpected end of format string" msgstr "" -#: fortran/io.c:493 +#: fortran/io.c:496 msgid "Zero width in format descriptor" msgstr "" -#: fortran/io.c:512 +#: fortran/io.c:516 msgid "Missing leading left parenthesis" msgstr "" -#: fortran/io.c:559 +#: fortran/io.c:563 msgid "Expected P edit descriptor" msgstr "" #. P requires a prior number. -#: fortran/io.c:567 +#: fortran/io.c:571 msgid "P descriptor requires leading scale factor" msgstr "" #. X requires a prior number if we're being pedantic. -#: fortran/io.c:572 +#: fortran/io.c:576 #, no-c-format msgid "Extension: X descriptor requires leading space count at %C" msgstr "" -#: fortran/io.c:596 +#: fortran/io.c:600 #, no-c-format msgid "Extension: $ descriptor at %C" msgstr "" -#: fortran/io.c:601 +#: fortran/io.c:605 #, no-c-format msgid "$ should be the last specifier in format at %C" msgstr "" -#: fortran/io.c:650 +#: fortran/io.c:654 msgid "Repeat count cannot follow P descriptor" msgstr "" -#: fortran/io.c:665 +#: fortran/io.c:669 msgid "Positive width required with T descriptor" msgstr "" -#: fortran/io.c:680 +#: fortran/io.c:684 #, no-c-format msgid "Extension: Missing positive width after L descriptor at %C" msgstr "" -#: fortran/io.c:723 +#: fortran/io.c:727 #, no-c-format msgid "Fortran 2008: 'G0' in format at %C" msgstr "" -#: fortran/io.c:751 fortran/io.c:753 fortran/io.c:814 fortran/io.c:816 +#: fortran/io.c:745 +msgid "E specifier not allowed with g0 descriptor" +msgstr "" + +#: fortran/io.c:759 fortran/io.c:761 fortran/io.c:822 fortran/io.c:824 #, no-c-format msgid "Period required in format specifier at %C" msgstr "" -#: fortran/io.c:785 +#: fortran/io.c:793 msgid "Positive exponent width required" msgstr "" -#: fortran/io.c:834 +#: fortran/io.c:842 #, no-c-format msgid "The H format specifier at %C is a Fortran 95 deleted feature" msgstr "" -#: fortran/io.c:919 fortran/io.c:976 +#: fortran/io.c:927 fortran/io.c:984 #, no-c-format msgid "Extension: Missing comma at %C" msgstr "" -#: fortran/io.c:989 +#: fortran/io.c:999 #, no-c-format msgid "%s in format string at %L" msgstr "" -#: fortran/io.c:1034 +#: fortran/io.c:1044 #, no-c-format msgid "Format statement in module main block at %C" msgstr "" -#: fortran/io.c:1040 +#: fortran/io.c:1050 #, no-c-format msgid "Missing format label at %C" msgstr "" -#: fortran/io.c:1100 fortran/io.c:1131 fortran/io.c:1193 +#: fortran/io.c:1110 fortran/io.c:1141 fortran/io.c:1203 #, no-c-format msgid "Invalid value for %s specification at %C" msgstr "" -#: fortran/io.c:1106 fortran/io.c:1137 +#: fortran/io.c:1116 fortran/io.c:1147 #, no-c-format msgid "Duplicate %s specification at %C" msgstr "" -#: fortran/io.c:1144 +#: fortran/io.c:1154 #, no-c-format msgid "Variable %s cannot be INTENT(IN) at %C" msgstr "" -#: fortran/io.c:1151 +#: fortran/io.c:1161 #, no-c-format msgid "Variable %s cannot be assigned in PURE procedure at %C" msgstr "" -#: fortran/io.c:1199 +#: fortran/io.c:1209 #, no-c-format msgid "Duplicate %s label specification at %C" msgstr "" -#: fortran/io.c:1219 +#: fortran/io.c:1229 #, no-c-format msgid "" "Constant expression in FORMAT tag at %L must be of type default CHARACTER" msgstr "" -#: fortran/io.c:1232 +#: fortran/io.c:1242 #, no-c-format msgid "FORMAT tag at %L must be of type CHARACTER or INTEGER" msgstr "" -#: fortran/io.c:1238 +#: fortran/io.c:1248 #, no-c-format msgid "Deleted feature: ASSIGNED variable in FORMAT tag at %L" msgstr "" -#: fortran/io.c:1244 +#: fortran/io.c:1254 #, no-c-format msgid "Variable '%s' at %L has not been assigned a format label" msgstr "" -#: fortran/io.c:1251 +#: fortran/io.c:1261 #, no-c-format msgid "Scalar '%s' in FORMAT tag at %L is not an ASSIGNED variable" msgstr "" -#: fortran/io.c:1264 +#: fortran/io.c:1274 #, no-c-format msgid "Extension: Character array in FORMAT tag at %L" msgstr "" -#: fortran/io.c:1270 +#: fortran/io.c:1280 #, no-c-format msgid "Extension: Non-character in FORMAT tag at %L" msgstr "" -#: fortran/io.c:1295 +#: fortran/io.c:1305 #, no-c-format msgid "%s tag at %L must be of type %s" msgstr "" -#: fortran/io.c:1302 +#: fortran/io.c:1312 #, no-c-format msgid "%s tag at %L must be scalar" msgstr "" -#: fortran/io.c:1308 +#: fortran/io.c:1318 #, no-c-format msgid "Fortran 2003: IOMSG tag at %L" msgstr "" -#: fortran/io.c:1316 +#: fortran/io.c:1326 #, no-c-format msgid "Fortran 95 requires default INTEGER in %s tag at %L" msgstr "" -#: fortran/io.c:1324 +#: fortran/io.c:1334 #, no-c-format msgid "Extension: CONVERT tag at %L" msgstr "" -#: fortran/io.c:1505 fortran/io.c:1513 +#: fortran/io.c:1515 fortran/io.c:1523 #, no-c-format msgid "Fortran 2003: %s specifier in %s statement at %C has value '%s'" msgstr "" -#: fortran/io.c:1532 fortran/io.c:1540 +#: fortran/io.c:1542 fortran/io.c:1550 #, no-c-format msgid "Extension: %s specifier in %s statement at %C has value '%s'" msgstr "" -#: fortran/io.c:1553 fortran/io.c:1561 +#: fortran/io.c:1563 fortran/io.c:1571 #, no-c-format msgid "%s specifier in %s statement at %C has invalid value '%s'" msgstr "" -#: fortran/io.c:1616 +#: fortran/io.c:1626 #, no-c-format msgid "OPEN statement not allowed in PURE procedure at %C" msgstr "" -#: fortran/io.c:1649 +#: fortran/io.c:1659 #, no-c-format msgid "Fortran 2003: ASYNCHRONOUS= at %C not allowed in Fortran 95" msgstr "" -#: fortran/io.c:1667 fortran/io.c:3045 +#: fortran/io.c:1677 fortran/io.c:3060 #, no-c-format msgid "Fortran 2003: BLANK= at %C not allowed in Fortran 95" msgstr "" -#: fortran/io.c:1685 fortran/io.c:3024 +#: fortran/io.c:1695 fortran/io.c:3039 #, no-c-format msgid "Fortran 2003: DECIMAL= at %C not allowed in Fortran 95" msgstr "" -#: fortran/io.c:1703 fortran/io.c:3135 +#: fortran/io.c:1713 fortran/io.c:3150 #, no-c-format msgid "Fortran 2003: DELIM= at %C not allowed in Fortran 95" msgstr "" -#: fortran/io.c:1721 +#: fortran/io.c:1731 #, no-c-format msgid "Fortran 2003: ENCODING= at %C not allowed in Fortran 95" msgstr "" #. When implemented, change the following to use gfc_notify_std F2003. -#: fortran/io.c:1773 +#: fortran/io.c:1783 #, no-c-format msgid "Fortran F2003: ROUND= specifier at %C not implemented" msgstr "" -#: fortran/io.c:1792 +#: fortran/io.c:1802 #, no-c-format msgid "Fortran 2003: SIGN= at %C not allowed in Fortran 95" msgstr "" -#: fortran/io.c:2005 +#: fortran/io.c:2015 #, no-c-format msgid "CLOSE statement not allowed in PURE procedure at %C" msgstr "" -#: fortran/io.c:2142 fortran/match.c:1948 +#: fortran/io.c:2152 fortran/match.c:1948 #, no-c-format msgid "%s statement not allowed in PURE procedure at %C" msgstr "" -#: fortran/io.c:2198 +#: fortran/io.c:2208 #, no-c-format msgid "Fortran 2003: FLUSH statement at %C" msgstr "" -#: fortran/io.c:2254 +#: fortran/io.c:2264 #, no-c-format msgid "Duplicate UNIT specification at %C" msgstr "" -#: fortran/io.c:2314 +#: fortran/io.c:2324 #, no-c-format msgid "Duplicate format specification at %C" msgstr "" -#: fortran/io.c:2331 +#: fortran/io.c:2341 #, no-c-format msgid "Symbol '%s' in namelist '%s' is INTENT(IN) at %C" msgstr "" -#: fortran/io.c:2367 +#: fortran/io.c:2377 #, no-c-format msgid "Duplicate NML specification at %C" msgstr "" -#: fortran/io.c:2376 +#: fortran/io.c:2386 #, no-c-format msgid "Symbol '%s' at %C must be a NAMELIST group name" msgstr "" -#: fortran/io.c:2441 +#: fortran/io.c:2451 #, no-c-format msgid "END tag at %C not allowed in output statement" msgstr "" -#: fortran/io.c:2517 +#: fortran/io.c:2528 #, no-c-format msgid "" "UNIT specification at %L must be an INTEGER expression or a CHARACTER " "variable" msgstr "" -#: fortran/io.c:2542 +#: fortran/io.c:2553 #, no-c-format msgid "Invalid form of WRITE statement at %L, UNIT required" msgstr "" -#: fortran/io.c:2553 +#: fortran/io.c:2564 #, no-c-format msgid "Internal unit with vector subscript at %L" msgstr "" -#: fortran/io.c:2560 +#: fortran/io.c:2571 #, no-c-format msgid "External IO UNIT cannot be an array at %L" msgstr "" -#: fortran/io.c:2565 +#: fortran/io.c:2576 #, no-c-format msgid "Extension: Comma before i/o item list at %L" msgstr "" -#: fortran/io.c:2575 +#: fortran/io.c:2586 #, no-c-format msgid "ERR tag label %d at %L not defined" msgstr "" -#: fortran/io.c:2587 +#: fortran/io.c:2598 #, no-c-format msgid "END tag label %d at %L not defined" msgstr "" -#: fortran/io.c:2599 +#: fortran/io.c:2610 #, no-c-format msgid "EOR tag label %d at %L not defined" msgstr "" -#: fortran/io.c:2609 +#: fortran/io.c:2620 #, no-c-format msgid "FORMAT label %d at %L not defined" msgstr "" -#: fortran/io.c:2730 +#: fortran/io.c:2741 #, no-c-format msgid "Syntax error in I/O iterator at %C" msgstr "" -#: fortran/io.c:2761 +#: fortran/io.c:2772 #, no-c-format msgid "Expected variable in READ statement at %C" msgstr "" -#: fortran/io.c:2767 +#: fortran/io.c:2778 #, no-c-format msgid "Expected expression in %s statement at %C" msgstr "" -#: fortran/io.c:2777 +#: fortran/io.c:2788 #, no-c-format msgid "Variable '%s' in input list at %C cannot be INTENT(IN)" msgstr "" -#: fortran/io.c:2786 +#: fortran/io.c:2797 #, no-c-format msgid "Cannot read to variable '%s' in PURE procedure at %C" msgstr "" -#: fortran/io.c:2802 +#: fortran/io.c:2813 #, no-c-format msgid "Cannot write to internal file unit '%s' at %C inside a PURE procedure" msgstr "" #. A general purpose syntax error. -#: fortran/io.c:2863 fortran/io.c:3462 fortran/gfortran.h:2202 +#: fortran/io.c:2874 fortran/io.c:3481 fortran/gfortran.h:2209 #, no-c-format msgid "Syntax error in %s statement at %C" msgstr "" -#: fortran/io.c:2944 +#: fortran/io.c:2959 #, no-c-format msgid "Fortran 2003: Internal file at %L with namelist" msgstr "" -#: fortran/io.c:2998 +#: fortran/io.c:3013 #, no-c-format msgid "ASYNCHRONOUS= specifier at %L must be an initialization expression" msgstr "" -#: fortran/io.c:3066 +#: fortran/io.c:3081 #, no-c-format msgid "Fortran 2003: PAD= at %C not allowed in Fortran 95" msgstr "" @@ -6886,58 +6641,58 @@ msgstr "" #. if (gfc_notify_std (GFC_STD_F2003, "Fortran 2003: ROUND= at %C " #. "not allowed in Fortran 95") == FAILURE) #. return MATCH_ERROR; -#: fortran/io.c:3091 +#: fortran/io.c:3106 #, no-c-format msgid "F2003 Feature: ROUND= specifier at %C not implemented" msgstr "" -#: fortran/io.c:3280 +#: fortran/io.c:3299 #, no-c-format msgid "PRINT namelist at %C is an extension" msgstr "" -#: fortran/io.c:3432 +#: fortran/io.c:3451 #, no-c-format msgid "Expected comma in I/O list at %C" msgstr "" -#: fortran/io.c:3496 +#: fortran/io.c:3515 #, no-c-format msgid "PRINT statement at %C not allowed within PURE procedure" msgstr "" -#: fortran/io.c:3650 fortran/io.c:3701 +#: fortran/io.c:3671 fortran/io.c:3722 #, no-c-format msgid "INQUIRE statement not allowed in PURE procedure at %C" msgstr "" -#: fortran/io.c:3677 +#: fortran/io.c:3698 #, no-c-format msgid "IOLENGTH tag invalid in INQUIRE statement at %C" msgstr "" -#: fortran/io.c:3687 fortran/trans-io.c:1178 +#: fortran/io.c:3708 fortran/trans-io.c:1178 #, no-c-format msgid "INQUIRE statement at %L cannot contain both FILE and UNIT specifiers" msgstr "" -#: fortran/io.c:3694 +#: fortran/io.c:3715 #, no-c-format msgid "INQUIRE statement at %L requires either FILE or UNIT specifier" msgstr "" -#: fortran/io.c:3707 +#: fortran/io.c:3728 #, no-c-format msgid "" "INQUIRE statement at %L requires a PENDING= specifier with the ID= specifier" msgstr "" -#: fortran/io.c:3866 +#: fortran/io.c:3888 #, no-c-format msgid "Fortran 2003: WAIT at %C not allowed in Fortran 95" msgstr "" -#: fortran/io.c:3872 +#: fortran/io.c:3894 #, no-c-format msgid "WAIT statement not allowed in PURE procedure at %C" msgstr "" @@ -7348,254 +7103,279 @@ msgstr "" msgid "Out of memory-- malloc() failed" msgstr "" -#: fortran/module.c:505 +#: fortran/module.c:509 #, no-c-format msgid "Fortran 2003: module nature in USE statement at %C" msgstr "" -#: fortran/module.c:517 +#: fortran/module.c:521 #, no-c-format msgid "" "Module nature in USE statement at %C shall be either INTRINSIC or " "NON_INTRINSIC" msgstr "" -#: fortran/module.c:530 +#: fortran/module.c:534 #, no-c-format msgid "\"::\" was expected after module nature at %C but was not found" msgstr "" -#: fortran/module.c:539 +#: fortran/module.c:543 #, no-c-format msgid "Fortran 2003: \"USE :: module\" at %C" msgstr "" -#: fortran/module.c:593 +#: fortran/module.c:597 #, no-c-format msgid "Missing generic specification in USE statement at %C" msgstr "" -#: fortran/module.c:601 +#: fortran/module.c:605 #, no-c-format msgid "Fortran 2003: Renaming operators in USE statements at %C" msgstr "" -#: fortran/module.c:643 +#: fortran/module.c:647 #, no-c-format msgid "The name '%s' at %C has already been used as an external module name." msgstr "" -#: fortran/module.c:921 +#: fortran/module.c:925 #, no-c-format msgid "Reading module %s at line %d column %d: %s" msgstr "" -#: fortran/module.c:925 +#: fortran/module.c:929 #, no-c-format msgid "Writing module %s at line %d column %d: %s" msgstr "" -#: fortran/module.c:929 +#: fortran/module.c:933 #, no-c-format msgid "Module %s at line %d column %d: %s" msgstr "" -#: fortran/module.c:969 +#: fortran/module.c:973 msgid "Unexpected EOF" msgstr "" -#: fortran/module.c:1001 +#: fortran/module.c:1005 msgid "Unexpected end of module in string constant" msgstr "" -#: fortran/module.c:1055 +#: fortran/module.c:1059 msgid "Integer overflow" msgstr "" -#: fortran/module.c:1086 +#: fortran/module.c:1090 msgid "Name too long" msgstr "" -#: fortran/module.c:1193 +#: fortran/module.c:1197 msgid "Bad name" msgstr "" -#: fortran/module.c:1237 +#: fortran/module.c:1241 msgid "Expected name" msgstr "" -#: fortran/module.c:1240 +#: fortran/module.c:1244 msgid "Expected left parenthesis" msgstr "" -#: fortran/module.c:1243 +#: fortran/module.c:1247 msgid "Expected right parenthesis" msgstr "" -#: fortran/module.c:1246 +#: fortran/module.c:1250 msgid "Expected integer" msgstr "" -#: fortran/module.c:1249 +#: fortran/module.c:1253 msgid "Expected string" msgstr "" -#: fortran/module.c:1273 +#: fortran/module.c:1277 msgid "find_enum(): Enum not found" msgstr "" -#: fortran/module.c:1287 +#: fortran/module.c:1291 #, no-c-format msgid "Error writing modules file: %s" msgstr "" -#: fortran/module.c:1836 +#: fortran/module.c:1840 msgid "Expected attribute bit name" msgstr "" -#: fortran/module.c:2661 +#: fortran/module.c:2665 msgid "Expected integer string" msgstr "" -#: fortran/module.c:2665 +#: fortran/module.c:2669 msgid "Error converting integer" msgstr "" -#: fortran/module.c:2687 +#: fortran/module.c:2691 msgid "Expected real string" msgstr "" -#: fortran/module.c:2889 +#: fortran/module.c:2893 msgid "Expected expression type" msgstr "" -#: fortran/module.c:2943 +#: fortran/module.c:2947 msgid "Bad operator" msgstr "" -#: fortran/module.c:3032 +#: fortran/module.c:3036 msgid "Bad type in constant expression" msgstr "" -#: fortran/module.c:3073 +#: fortran/module.c:3077 #, no-c-format msgid "Namelist %s cannot be renamed by USE association to %s" msgstr "" -#: fortran/module.c:4244 +#: fortran/module.c:4250 #, no-c-format msgid "Symbol '%s' referenced at %L not found in module '%s'" msgstr "" -#: fortran/module.c:4251 +#: fortran/module.c:4257 #, no-c-format msgid "User operator '%s' referenced at %L not found in module '%s'" msgstr "" -#: fortran/module.c:4256 +#: fortran/module.c:4262 #, no-c-format msgid "Intrinsic operator '%s' referenced at %L not found in module '%s'" msgstr "" -#: fortran/module.c:4805 +#: fortran/module.c:4825 #, no-c-format msgid "Can't open module file '%s' for writing at %C: %s" msgstr "" -#: fortran/module.c:4843 +#: fortran/module.c:4863 #, no-c-format msgid "Error writing module file '%s' for writing: %s" msgstr "" -#: fortran/module.c:4873 fortran/module.c:4955 +#: fortran/module.c:4872 +#, no-c-format +msgid "Can't delete module file '%s': %s" +msgstr "" + +#: fortran/module.c:4875 +#, no-c-format +msgid "Can't rename module file '%s' to '%s': %s" +msgstr "" + +#: fortran/module.c:4881 +#, no-c-format +msgid "Can't delete temporary module file '%s': %s" +msgstr "" + +#: fortran/module.c:4901 fortran/module.c:4983 #, no-c-format msgid "" "Symbol '%s' referenced at %L does not exist in intrinsic module " "ISO_C_BINDING." msgstr "" -#: fortran/module.c:4986 +#: fortran/module.c:5014 #, no-c-format msgid "" "Symbol '%s' referenced at %L not found in intrinsic module ISO_C_BINDING" msgstr "" -#: fortran/module.c:5008 +#: fortran/module.c:5036 #, no-c-format msgid "Symbol '%s' already declared" msgstr "" -#: fortran/module.c:5063 +#: fortran/module.c:5091 #, no-c-format msgid "" "Use of intrinsic module '%s' at %C conflicts with non-intrinsic module name " "used previously" msgstr "" -#: fortran/module.c:5076 +#: fortran/module.c:5104 #, no-c-format msgid "" "Symbol '%s' referenced at %L does not exist in intrinsic module " "ISO_FORTRAN_ENV" msgstr "" -#: fortran/module.c:5084 +#: fortran/module.c:5112 #, no-c-format msgid "" "Use of the NUMERIC_STORAGE_SIZE named constant from intrinsic module " "ISO_FORTRAN_ENV at %L is incompatible with option %s" msgstr "" -#: fortran/module.c:5112 +#: fortran/module.c:5140 #, no-c-format msgid "" "Use of the NUMERIC_STORAGE_SIZE named constant from intrinsic module " "ISO_FORTRAN_ENV at %C is incompatible with option %s" msgstr "" -#: fortran/module.c:5128 +#: fortran/module.c:5156 #, no-c-format msgid "" "Symbol '%s' referenced at %L not found in intrinsic module ISO_FORTRAN_ENV" msgstr "" -#: fortran/module.c:5162 +#: fortran/module.c:5190 #, no-c-format msgid "Fortran 2003: ISO_FORTRAN_ENV intrinsic module at %C" msgstr "" -#: fortran/module.c:5170 +#: fortran/module.c:5198 #, no-c-format msgid "Fortran 2003: ISO_C_BINDING module at %C" msgstr "" -#: fortran/module.c:5180 +#: fortran/module.c:5208 #, no-c-format msgid "Can't find an intrinsic module named '%s' at %C" msgstr "" -#: fortran/module.c:5185 +#: fortran/module.c:5213 #, no-c-format msgid "Can't open module file '%s' for reading at %C: %s" msgstr "" -#: fortran/module.c:5193 +#: fortran/module.c:5221 #, no-c-format msgid "" "Use of non-intrinsic module '%s' at %C conflicts with intrinsic module name " "used previously" msgstr "" -#: fortran/module.c:5208 +#: fortran/module.c:5236 msgid "Unexpected end of module" msgstr "" -#: fortran/module.c:5213 +#: fortran/module.c:5241 #, no-c-format msgid "File '%s' opened at %C is not a GFORTRAN module file" msgstr "" -#: fortran/module.c:5223 +#: fortran/module.c:5248 +#, no-c-format +msgid "Parse error when checking module version for file '%s' opened at %C" +msgstr "" + +#: fortran/module.c:5253 +#, no-c-format +msgid "Wrong module version '%s' (expected '" +msgstr "" + +#: fortran/module.c:5266 #, no-c-format msgid "Can't USE the same module we're building!" msgstr "" @@ -7630,7 +7410,7 @@ msgstr "" msgid "Syntax error in !$OMP THREADPRIVATE list at %C" msgstr "" -#: fortran/openmp.c:759 fortran/resolve.c:6365 fortran/resolve.c:6718 +#: fortran/openmp.c:759 fortran/resolve.c:6445 fortran/resolve.c:6798 #, no-c-format msgid "IF clause at %L requires a scalar LOGICAL expression" msgstr "" @@ -7927,17 +7707,17 @@ msgstr "" msgid "Unrecognized option to -finit-logical: %s" msgstr "" -#: fortran/options.c:726 +#: fortran/options.c:728 #, no-c-format msgid "Unrecognized option to -finit-real: %s" msgstr "" -#: fortran/options.c:742 +#: fortran/options.c:744 #, no-c-format msgid "The value of n in -finit-character=n must be between 0 and 127" msgstr "" -#: fortran/options.c:833 +#: fortran/options.c:835 #, no-c-format msgid "Maximum subrecord length cannot exceed %d" msgstr "" @@ -8180,129 +7960,129 @@ msgid "" "INTERFACE procedure '%s' at %L has the same name as the enclosing procedure" msgstr "" -#: fortran/parse.c:2410 +#: fortran/parse.c:2411 #, no-c-format msgid "%s statement must appear in a MODULE" msgstr "" -#: fortran/parse.c:2417 +#: fortran/parse.c:2418 #, no-c-format msgid "%s statement at %C follows another accessibility specification" msgstr "" -#: fortran/parse.c:2467 +#: fortran/parse.c:2468 #, no-c-format msgid "Bad kind expression for function '%s' at %L" msgstr "" -#: fortran/parse.c:2471 +#: fortran/parse.c:2472 #, no-c-format msgid "The type for function '%s' at %L is not accessible" msgstr "" -#: fortran/parse.c:2529 +#: fortran/parse.c:2530 #, no-c-format msgid "ELSEWHERE statement at %C follows previous unmasked ELSEWHERE" msgstr "" -#: fortran/parse.c:2550 +#: fortran/parse.c:2551 #, no-c-format msgid "Unexpected %s statement in WHERE block at %C" msgstr "" -#: fortran/parse.c:2609 +#: fortran/parse.c:2610 #, no-c-format msgid "Unexpected %s statement in FORALL block at %C" msgstr "" -#: fortran/parse.c:2660 +#: fortran/parse.c:2661 #, no-c-format msgid "ELSE IF statement at %C cannot follow ELSE statement at %L" msgstr "" -#: fortran/parse.c:2678 +#: fortran/parse.c:2679 #, no-c-format msgid "Duplicate ELSE statements at %L and %C" msgstr "" -#: fortran/parse.c:2739 +#: fortran/parse.c:2740 #, no-c-format msgid "Expected a CASE or END SELECT statement following SELECT CASE at %C" msgstr "" -#: fortran/parse.c:2797 +#: fortran/parse.c:2798 #, no-c-format msgid "Variable '%s' at %C cannot be redefined inside loop beginning at %L" msgstr "" -#: fortran/parse.c:2831 +#: fortran/parse.c:2832 #, no-c-format msgid "End of nonblock DO statement at %C is within another block" msgstr "" -#: fortran/parse.c:2840 +#: fortran/parse.c:2841 #, no-c-format msgid "End of nonblock DO statement at %C is interwoven with another DO loop" msgstr "" -#: fortran/parse.c:2889 +#: fortran/parse.c:2890 #, no-c-format msgid "Statement label in ENDDO at %C doesn't match DO label" msgstr "" -#: fortran/parse.c:2905 +#: fortran/parse.c:2906 #, no-c-format msgid "named block DO at %L requires matching ENDDO name" msgstr "" -#: fortran/parse.c:3164 +#: fortran/parse.c:3165 #, no-c-format msgid "Name after !$omp critical and !$omp end critical does not match at %C" msgstr "" -#: fortran/parse.c:3220 +#: fortran/parse.c:3221 #, no-c-format msgid "%s statement at %C cannot terminate a non-block DO loop" msgstr "" -#: fortran/parse.c:3407 +#: fortran/parse.c:3408 #, no-c-format msgid "Contained procedure '%s' at %C is already ambiguous" msgstr "" -#: fortran/parse.c:3457 +#: fortran/parse.c:3458 #, no-c-format msgid "Unexpected %s statement in CONTAINS section at %C" msgstr "" -#: fortran/parse.c:3481 +#: fortran/parse.c:3482 #, no-c-format msgid "" "Fortran 2008: CONTAINS statement without FUNCTION or SUBROUTINE statement at " "%C" msgstr "" -#: fortran/parse.c:3552 +#: fortran/parse.c:3553 #, no-c-format msgid "CONTAINS statement at %C is already in a contained program unit" msgstr "" -#: fortran/parse.c:3601 +#: fortran/parse.c:3602 #, no-c-format msgid "Global name '%s' at %L is already being used as a %s at %L" msgstr "" -#: fortran/parse.c:3622 +#: fortran/parse.c:3623 #, no-c-format msgid "Blank BLOCK DATA at %C conflicts with prior BLOCK DATA at %L" msgstr "" -#: fortran/parse.c:3648 +#: fortran/parse.c:3649 #, no-c-format msgid "Unexpected %s statement in BLOCK DATA at %C" msgstr "" -#: fortran/parse.c:3691 +#: fortran/parse.c:3692 #, no-c-format msgid "Unexpected %s statement in MODULE at %C" msgstr "" @@ -8310,7 +8090,7 @@ msgstr "" #. If we see a duplicate main program, shut down. If the second #. instance is an implied main program, i.e. data decls or executable #. statements, we're in for lots of errors. -#: fortran/parse.c:3874 +#: fortran/parse.c:3875 #, no-c-format msgid "Two main PROGRAMs at %L and %C" msgstr "" @@ -8463,91 +8243,91 @@ msgstr "" msgid "Syntax error in COMPLEX constant at %C" msgstr "" -#: fortran/primary.c:1475 +#: fortran/primary.c:1476 #, no-c-format msgid "Keyword '%s' at %C has already appeared in the current argument list" msgstr "" -#: fortran/primary.c:1539 +#: fortran/primary.c:1540 #, no-c-format msgid "Extension: argument list function at %C" msgstr "" -#: fortran/primary.c:1606 +#: fortran/primary.c:1607 #, no-c-format msgid "Expected alternate return label at %C" msgstr "" -#: fortran/primary.c:1624 +#: fortran/primary.c:1625 #, no-c-format msgid "Missing keyword name in actual argument list at %C" msgstr "" -#: fortran/primary.c:1669 +#: fortran/primary.c:1670 #, no-c-format msgid "Syntax error in argument list at %C" msgstr "" -#: fortran/primary.c:1764 +#: fortran/primary.c:1765 #, no-c-format msgid "Expected structure component name at %C" msgstr "" -#: fortran/primary.c:1801 +#: fortran/primary.c:1802 #, no-c-format msgid "Expected argument list at %C" msgstr "" -#: fortran/primary.c:2095 +#: fortran/primary.c:2096 #, no-c-format msgid "" "Fortran 2003: Structure constructor with missing optional arguments at %C" msgstr "" -#: fortran/primary.c:2103 +#: fortran/primary.c:2104 #, no-c-format msgid "" "No initializer for component '%s' given in the structure constructor at %C!" msgstr "" -#: fortran/primary.c:2159 +#: fortran/primary.c:2160 #, no-c-format msgid "Can't construct ABSTRACT type '%s' at %C" msgstr "" -#: fortran/primary.c:2187 +#: fortran/primary.c:2188 #, no-c-format msgid "Fortran 2003: Structure constructor with named arguments at %C" msgstr "" -#: fortran/primary.c:2202 +#: fortran/primary.c:2203 #, no-c-format msgid "Component initializer without name after component named %s at %C!" msgstr "" -#: fortran/primary.c:2205 +#: fortran/primary.c:2206 #, no-c-format msgid "Too many components in structure constructor at %C!" msgstr "" -#: fortran/primary.c:2238 +#: fortran/primary.c:2239 #, no-c-format msgid "Component '%s' is initialized twice in the structure constructor at %C!" msgstr "" -#: fortran/primary.c:2294 +#: fortran/primary.c:2295 #, no-c-format msgid "" "component '%s' at %L has already been set by a parent derived type " "constructor" msgstr "" -#: fortran/primary.c:2317 +#: fortran/primary.c:2318 #, no-c-format msgid "Syntax error in structure constructor at %C" msgstr "" -#: fortran/primary.c:2407 +#: fortran/primary.c:2408 #, no-c-format msgid "" "'%s' at %C is the name of a recursive function and so refers to the result " @@ -8630,7 +8410,7 @@ msgstr "" msgid "Dummy procedure at %L not allowed in ELEMENTAL procedure" msgstr "" -#: fortran/resolve.c:188 fortran/resolve.c:1205 +#: fortran/resolve.c:188 fortran/resolve.c:1277 #, no-c-format msgid "" "Unable to find a specific INTRINSIC procedure for the reference '%s' at %L" @@ -8837,66 +8617,66 @@ msgstr "" msgid "GENERIC procedure '%s' is not allowed as an actual argument at %L" msgstr "" -#: fortran/resolve.c:1100 fortran/resolve.c:5928 fortran/resolve.c:6683 +#: fortran/resolve.c:1148 +#, no-c-format +msgid "" +"Non-RECURSIVE procedure '%s' at %L is possibly calling itself recursively. " +"Declare it RECURSIVE or use -frecursive" +msgstr "" + +#: fortran/resolve.c:1181 fortran/resolve.c:6008 fortran/resolve.c:6763 #, no-c-format msgid "Label %d referenced at %L is never defined" msgstr "" -#: fortran/resolve.c:1145 +#: fortran/resolve.c:1226 #, no-c-format msgid "Statement function '%s' at %L is not allowed as an actual argument" msgstr "" -#: fortran/resolve.c:1153 +#: fortran/resolve.c:1234 #, no-c-format msgid "Intrinsic '%s' at %L is not allowed as an actual argument" msgstr "" -#: fortran/resolve.c:1160 +#: fortran/resolve.c:1241 #, no-c-format msgid "Internal procedure '%s' is not allowed as an actual argument at %L" msgstr "" -#: fortran/resolve.c:1166 +#: fortran/resolve.c:1247 #, no-c-format msgid "" "ELEMENTAL non-INTRINSIC procedure '%s' is not allowed as an actual argument " "at %L" msgstr "" -#: fortran/resolve.c:1183 -#, no-c-format -msgid "" -"Reference to ENTRY '%s' at %L is recursive, but procedure '%s' is not " -"declared as RECURSIVE" -msgstr "" - -#: fortran/resolve.c:1224 +#: fortran/resolve.c:1299 #, no-c-format msgid "Symbol '%s' at %L is ambiguous" msgstr "" -#: fortran/resolve.c:1273 +#: fortran/resolve.c:1350 #, no-c-format msgid "By-value argument at %L is not of numeric type" msgstr "" -#: fortran/resolve.c:1280 +#: fortran/resolve.c:1357 #, no-c-format msgid "By-value argument at %L cannot be an array or an array section" msgstr "" -#: fortran/resolve.c:1294 +#: fortran/resolve.c:1371 #, no-c-format msgid "By-value argument at %L is not allowed in this context" msgstr "" -#: fortran/resolve.c:1306 +#: fortran/resolve.c:1383 #, no-c-format msgid "Passing internal procedure at %L by location not allowed" msgstr "" -#: fortran/resolve.c:1431 +#: fortran/resolve.c:1508 #, no-c-format msgid "" "'%s' at %L is an array and OPTIONAL; IF IT IS MISSING, it cannot be the " @@ -8904,570 +8684,572 @@ msgid "" "argument with the same rank (12.4.1.5)" msgstr "" -#: fortran/resolve.c:1453 +#: fortran/resolve.c:1530 msgid "elemental procedure" msgstr "" -#: fortran/resolve.c:1470 +#: fortran/resolve.c:1547 #, no-c-format msgid "" "Actual argument at %L for INTENT(%s) dummy '%s' of ELEMENTAL subroutine '%s' " "is a scalar, but another actual argument is an array" msgstr "" -#: fortran/resolve.c:1607 +#: fortran/resolve.c:1684 #, no-c-format msgid "There is no specific function for the generic '%s' at %L" msgstr "" -#: fortran/resolve.c:1616 +#: fortran/resolve.c:1693 #, no-c-format msgid "" "Generic function '%s' at %L is not consistent with a specific intrinsic " "interface" msgstr "" -#: fortran/resolve.c:1671 +#: fortran/resolve.c:1748 #, no-c-format msgid "" "Function '%s' at %L is INTRINSIC but is not compatible with an intrinsic" msgstr "" -#: fortran/resolve.c:1717 +#: fortran/resolve.c:1794 #, no-c-format msgid "Unable to resolve the specific function '%s' at %L" msgstr "" -#: fortran/resolve.c:1773 fortran/resolve.c:10177 +#: fortran/resolve.c:1850 fortran/resolve.c:10264 #, no-c-format msgid "Function '%s' at %L has no IMPLICIT type" msgstr "" -#: fortran/resolve.c:1984 +#: fortran/resolve.c:2059 #, no-c-format msgid "Argument to '%s' at %L is not a variable" msgstr "" -#: fortran/resolve.c:2056 +#: fortran/resolve.c:2107 #, no-c-format msgid "More actual than formal arguments in '%s' call at %L" msgstr "" -#: fortran/resolve.c:2068 +#: fortran/resolve.c:2116 #, no-c-format msgid "" "Parameter '%s' to '%s' at %L must be either a TARGET or an associated pointer" msgstr "" -#: fortran/resolve.c:2094 +#: fortran/resolve.c:2139 #, no-c-format msgid "" "Allocatable variable '%s' used as a parameter to '%s' at %L must not be an " "array of zero size" msgstr "" -#: fortran/resolve.c:2111 +#: fortran/resolve.c:2156 #, no-c-format msgid "" "Assumed-shape array '%s' at %L cannot be an argument to the procedure '%s' " "because it is not C interoperable" msgstr "" -#: fortran/resolve.c:2121 +#: fortran/resolve.c:2166 #, no-c-format msgid "" "Deferred-shape array '%s' at %L cannot be an argument to the procedure '%s' " "because it is not C interoperable" msgstr "" -#: fortran/resolve.c:2144 fortran/resolve.c:2183 +#: fortran/resolve.c:2189 fortran/resolve.c:2226 #, no-c-format msgid "CHARACTER argument '%s' to '%s' at %L must have a length of 1" msgstr "" #. Case 1c, section 15.1.2.5, J3/04-007: an associated #. scalar pointer. -#: fortran/resolve.c:2159 +#: fortran/resolve.c:2202 #, no-c-format msgid "Argument '%s' to '%s' at %L must be an associated scalar POINTER" msgstr "" -#: fortran/resolve.c:2175 +#: fortran/resolve.c:2218 #, no-c-format msgid "Parameter '%s' to '%s' at %L must be a scalar" msgstr "" #. TODO: Update this error message to allow for procedure #. pointers once they are implemented. -#: fortran/resolve.c:2197 +#: fortran/resolve.c:2240 #, no-c-format msgid "Parameter '%s' to '%s' at %L must be a procedure" msgstr "" -#: fortran/resolve.c:2205 +#: fortran/resolve.c:2248 #, no-c-format msgid "Parameter '%s' to '%s' at %L must be BIND(C)" msgstr "" -#: fortran/resolve.c:2251 +#: fortran/resolve.c:2294 #, no-c-format msgid "Intrinsic subroutine '%s' used as a function at %L" msgstr "" -#: fortran/resolve.c:2258 +#: fortran/resolve.c:2301 #, no-c-format msgid "'%s' at %L is not a function" msgstr "" -#: fortran/resolve.c:2264 +#: fortran/resolve.c:2307 #, no-c-format msgid "ABSTRACT INTERFACE '%s' must not be referenced at %L" msgstr "" #. Internal procedures are taken care of in resolve_contained_fntype. -#: fortran/resolve.c:2309 +#: fortran/resolve.c:2352 #, no-c-format msgid "" "Function '%s' is declared CHARACTER(*) and cannot be used at %L since it is " "not a dummy argument" msgstr "" -#: fortran/resolve.c:2362 +#: fortran/resolve.c:2405 #, no-c-format msgid "" "User defined non-ELEMENTAL function '%s' at %L not allowed in WORKSHARE " "construct" msgstr "" -#: fortran/resolve.c:2412 +#: fortran/resolve.c:2455 #, no-c-format msgid "reference to non-PURE function '%s' at %L inside a FORALL %s" msgstr "" -#: fortran/resolve.c:2419 +#: fortran/resolve.c:2462 #, no-c-format msgid "" "Function reference to '%s' at %L is to a non-PURE procedure within a PURE " "procedure" msgstr "" -#: fortran/resolve.c:2434 +#: fortran/resolve.c:2478 #, no-c-format -msgid "Function '%s' at %L cannot call itself, as it is not RECURSIVE" +msgid "" +"ENTRY '%s' at %L cannot be called recursively, as function '%s' is not " +"RECURSIVE" msgstr "" -#: fortran/resolve.c:2442 +#: fortran/resolve.c:2482 #, no-c-format msgid "" -"Call to ENTRY '%s' at %L is recursive, but function '%s' is not declared as " -"RECURSIVE" +"Function '%s' at %L cannot be called recursively, as it is not RECURSIVE" msgstr "" -#: fortran/resolve.c:2489 +#: fortran/resolve.c:2529 #, no-c-format msgid "Subroutine call to '%s' in FORALL block at %L is not PURE" msgstr "" -#: fortran/resolve.c:2492 +#: fortran/resolve.c:2532 #, no-c-format msgid "Subroutine call to '%s' at %L is not PURE" msgstr "" -#: fortran/resolve.c:2555 +#: fortran/resolve.c:2595 #, no-c-format msgid "There is no specific subroutine for the generic '%s' at %L" msgstr "" -#: fortran/resolve.c:2564 +#: fortran/resolve.c:2604 #, no-c-format msgid "" "Generic subroutine '%s' at %L is not consistent with an intrinsic subroutine " "interface" msgstr "" -#: fortran/resolve.c:2672 +#: fortran/resolve.c:2712 #, no-c-format msgid "Missing SHAPE parameter for call to %s at %L" msgstr "" -#: fortran/resolve.c:2680 +#: fortran/resolve.c:2720 #, no-c-format msgid "SHAPE parameter for call to %s at %L must be a rank 1 INTEGER array" msgstr "" -#: fortran/resolve.c:2764 +#: fortran/resolve.c:2805 #, no-c-format msgid "" "Subroutine '%s' at %L is INTRINSIC but is not compatible with an intrinsic" msgstr "" -#: fortran/resolve.c:2808 +#: fortran/resolve.c:2849 #, no-c-format msgid "Unable to resolve the specific subroutine '%s' at %L" msgstr "" -#: fortran/resolve.c:2868 +#: fortran/resolve.c:2909 #, no-c-format msgid "'%s' at %L has a type, which is not consistent with the CALL at %L" msgstr "" -#: fortran/resolve.c:2899 +#: fortran/resolve.c:2942 #, no-c-format -msgid "SUBROUTINE '%s' at %L cannot call itself, as it is not RECURSIVE" +msgid "" +"ENTRY '%s' at %L cannot be called recursively, as subroutine '%s' is not " +"RECURSIVE" msgstr "" -#: fortran/resolve.c:2907 +#: fortran/resolve.c:2946 #, no-c-format msgid "" -"Call to ENTRY '%s' at %L is recursive, but subroutine '%s' is not declared " -"as RECURSIVE" +"SUBROUTINE '%s' at %L cannot be called recursively, as it is not RECURSIVE" msgstr "" -#: fortran/resolve.c:2982 +#: fortran/resolve.c:3020 #, no-c-format msgid "Shapes for operands at %L and %L are not conformable" msgstr "" -#: fortran/resolve.c:3033 +#: fortran/resolve.c:3071 #, c-format msgid "Invalid context for NULL() pointer at %%L" msgstr "" -#: fortran/resolve.c:3049 +#: fortran/resolve.c:3087 #, c-format msgid "Operand of unary numeric operator '%s' at %%L is %s" msgstr "" -#: fortran/resolve.c:3065 +#: fortran/resolve.c:3103 #, c-format msgid "Operands of binary numeric operator '%s' at %%L are %s/%s" msgstr "" -#: fortran/resolve.c:3080 +#: fortran/resolve.c:3118 #, c-format msgid "Operands of string concatenation operator at %%L are %s/%s" msgstr "" -#: fortran/resolve.c:3099 +#: fortran/resolve.c:3137 #, c-format msgid "Operands of logical operator '%s' at %%L are %s/%s" msgstr "" -#: fortran/resolve.c:3113 +#: fortran/resolve.c:3151 #, c-format msgid "Operand of .not. operator at %%L is %s" msgstr "" -#: fortran/resolve.c:3127 +#: fortran/resolve.c:3165 msgid "COMPLEX quantities cannot be compared at %L" msgstr "" -#: fortran/resolve.c:3156 +#: fortran/resolve.c:3194 #, c-format msgid "Logicals at %%L must be compared with %s instead of %s" msgstr "" -#: fortran/resolve.c:3162 +#: fortran/resolve.c:3200 #, c-format msgid "Operands of comparison operator '%s' at %%L are %s/%s" msgstr "" -#: fortran/resolve.c:3170 +#: fortran/resolve.c:3208 #, c-format msgid "Unknown operator '%s' at %%L" msgstr "" -#: fortran/resolve.c:3172 +#: fortran/resolve.c:3210 #, c-format msgid "Operand of user operator '%s' at %%L is %s" msgstr "" -#: fortran/resolve.c:3175 +#: fortran/resolve.c:3213 #, c-format msgid "Operands of user operator '%s' at %%L are %s/%s" msgstr "" -#: fortran/resolve.c:3261 +#: fortran/resolve.c:3299 #, c-format msgid "Inconsistent ranks for operator at %%L and %%L" msgstr "" -#: fortran/resolve.c:3458 +#: fortran/resolve.c:3496 #, no-c-format msgid "Array reference at %L is out of bounds (%ld < %ld) in dimension %d" msgstr "" -#: fortran/resolve.c:3466 +#: fortran/resolve.c:3504 #, no-c-format msgid "Array reference at %L is out of bounds (%ld > %ld) in dimension %d" msgstr "" -#: fortran/resolve.c:3485 +#: fortran/resolve.c:3523 #, no-c-format msgid "Illegal stride of zero at %L" msgstr "" -#: fortran/resolve.c:3502 +#: fortran/resolve.c:3540 #, no-c-format msgid "" "Lower array reference at %L is out of bounds (%ld < %ld) in dimension %d" msgstr "" -#: fortran/resolve.c:3510 +#: fortran/resolve.c:3548 #, no-c-format msgid "" "Lower array reference at %L is out of bounds (%ld > %ld) in dimension %d" msgstr "" -#: fortran/resolve.c:3526 +#: fortran/resolve.c:3564 #, no-c-format msgid "" "Upper array reference at %L is out of bounds (%ld < %ld) in dimension %d" msgstr "" -#: fortran/resolve.c:3535 +#: fortran/resolve.c:3573 #, no-c-format msgid "" "Upper array reference at %L is out of bounds (%ld > %ld) in dimension %d" msgstr "" -#: fortran/resolve.c:3574 +#: fortran/resolve.c:3612 #, no-c-format msgid "Rightmost upper bound of assumed size array section not specified at %L" msgstr "" -#: fortran/resolve.c:3584 +#: fortran/resolve.c:3622 #, no-c-format msgid "Rank mismatch in array reference at %L (%d/%d)" msgstr "" -#: fortran/resolve.c:3612 +#: fortran/resolve.c:3650 #, no-c-format msgid "Array index at %L must be scalar" msgstr "" -#: fortran/resolve.c:3618 +#: fortran/resolve.c:3656 #, no-c-format msgid "Array index at %L must be of INTEGER type, found %s" msgstr "" -#: fortran/resolve.c:3624 +#: fortran/resolve.c:3662 #, no-c-format msgid "Extension: REAL array index at %L" msgstr "" -#: fortran/resolve.c:3654 +#: fortran/resolve.c:3692 #, no-c-format msgid "Argument dim at %L must be scalar" msgstr "" -#: fortran/resolve.c:3661 +#: fortran/resolve.c:3699 #, no-c-format msgid "Argument dim at %L must be of INTEGER type" msgstr "" -#: fortran/resolve.c:3782 +#: fortran/resolve.c:3820 #, no-c-format msgid "Array index at %L is an array of rank %d" msgstr "" -#: fortran/resolve.c:3819 +#: fortran/resolve.c:3857 #, no-c-format msgid "Substring start index at %L must be of type INTEGER" msgstr "" -#: fortran/resolve.c:3826 +#: fortran/resolve.c:3864 #, no-c-format msgid "Substring start index at %L must be scalar" msgstr "" -#: fortran/resolve.c:3835 +#: fortran/resolve.c:3873 #, no-c-format msgid "Substring start index at %L is less than one" msgstr "" -#: fortran/resolve.c:3848 +#: fortran/resolve.c:3886 #, no-c-format msgid "Substring end index at %L must be of type INTEGER" msgstr "" -#: fortran/resolve.c:3855 +#: fortran/resolve.c:3893 #, no-c-format msgid "Substring end index at %L must be scalar" msgstr "" -#: fortran/resolve.c:3865 +#: fortran/resolve.c:3903 #, no-c-format msgid "Substring end index at %L exceeds the string length" msgstr "" -#: fortran/resolve.c:4003 +#: fortran/resolve.c:4041 #, no-c-format msgid "" "Component to the right of a part reference with nonzero rank must not have " "the POINTER attribute at %L" msgstr "" -#: fortran/resolve.c:4010 +#: fortran/resolve.c:4048 #, no-c-format msgid "" "Component to the right of a part reference with nonzero rank must not have " "the ALLOCATABLE attribute at %L" msgstr "" -#: fortran/resolve.c:4029 +#: fortran/resolve.c:4067 #, no-c-format msgid "" "Two or more part references with nonzero rank must not be specified at %L" msgstr "" -#: fortran/resolve.c:4208 +#: fortran/resolve.c:4246 #, no-c-format msgid "" "Variable '%s', used in a specification expression, is referenced at %L " "before the ENTRY statement in which it is a parameter" msgstr "" -#: fortran/resolve.c:4213 +#: fortran/resolve.c:4251 #, no-c-format msgid "" "Variable '%s' is used at %L before the ENTRY statement in which it is a " "parameter" msgstr "" -#: fortran/resolve.c:4455 +#: fortran/resolve.c:4535 #, no-c-format msgid "Passed-object at %L must be scalar" msgstr "" #. Nothing matching found! -#: fortran/resolve.c:4565 +#: fortran/resolve.c:4645 #, no-c-format msgid "" "Found no matching specific binding for the call to the GENERIC '%s' at %L" msgstr "" -#: fortran/resolve.c:4585 +#: fortran/resolve.c:4665 #, no-c-format msgid "'%s' at %L should be a SUBROUTINE" msgstr "" -#: fortran/resolve.c:4621 +#: fortran/resolve.c:4701 #, no-c-format msgid "'%s' at %L should be a FUNCTION" msgstr "" -#: fortran/resolve.c:4757 +#: fortran/resolve.c:4837 #, no-c-format msgid "%s at %L must be a scalar" msgstr "" -#: fortran/resolve.c:4767 +#: fortran/resolve.c:4847 #, no-c-format msgid "Deleted feature: %s at %L must be integer" msgstr "" -#: fortran/resolve.c:4771 fortran/resolve.c:4778 +#: fortran/resolve.c:4851 fortran/resolve.c:4858 #, no-c-format msgid "%s at %L must be INTEGER" msgstr "" -#: fortran/resolve.c:4798 +#: fortran/resolve.c:4878 #, no-c-format msgid "Cannot assign to loop variable in PURE procedure at %L" msgstr "" -#: fortran/resolve.c:4822 +#: fortran/resolve.c:4902 #, no-c-format msgid "Step expression in DO loop at %L cannot be zero" msgstr "" -#: fortran/resolve.c:4898 +#: fortran/resolve.c:4978 #, no-c-format msgid "FORALL index-name at %L must be a scalar INTEGER" msgstr "" -#: fortran/resolve.c:4903 +#: fortran/resolve.c:4983 #, no-c-format msgid "FORALL start expression at %L must be a scalar INTEGER" msgstr "" -#: fortran/resolve.c:4910 +#: fortran/resolve.c:4990 #, no-c-format msgid "FORALL end expression at %L must be a scalar INTEGER" msgstr "" -#: fortran/resolve.c:4918 +#: fortran/resolve.c:4998 #, no-c-format msgid "FORALL stride expression at %L must be a scalar %s" msgstr "" -#: fortran/resolve.c:4923 +#: fortran/resolve.c:5003 #, no-c-format msgid "FORALL stride expression at %L cannot be zero" msgstr "" -#: fortran/resolve.c:4939 +#: fortran/resolve.c:5019 #, no-c-format msgid "FORALL index '%s' may not appear in triplet specification at %L" msgstr "" -#: fortran/resolve.c:5019 +#: fortran/resolve.c:5099 #, no-c-format msgid "" "Expression in DEALLOCATE statement at %L must be ALLOCATABLE or a POINTER" msgstr "" -#: fortran/resolve.c:5026 +#: fortran/resolve.c:5106 #, no-c-format msgid "Cannot deallocate INTENT(IN) variable '%s' at %L" msgstr "" -#: fortran/resolve.c:5130 +#: fortran/resolve.c:5210 #, no-c-format msgid "" "The STAT variable '%s' in an ALLOCATE statement must not be allocated in the " "same statement at %L" msgstr "" -#: fortran/resolve.c:5166 +#: fortran/resolve.c:5246 #, no-c-format msgid "Expression in ALLOCATE statement at %L must be ALLOCATABLE or a POINTER" msgstr "" -#: fortran/resolve.c:5174 +#: fortran/resolve.c:5254 #, no-c-format msgid "Cannot allocate INTENT(IN) variable '%s' at %L" msgstr "" -#: fortran/resolve.c:5198 +#: fortran/resolve.c:5278 #, no-c-format msgid "Array specification required in ALLOCATE statement at %L" msgstr "" -#: fortran/resolve.c:5228 +#: fortran/resolve.c:5308 #, no-c-format msgid "Bad array specification in ALLOCATE statement at %L" msgstr "" -#: fortran/resolve.c:5248 +#: fortran/resolve.c:5328 #, no-c-format msgid "" "'%s' must not appear in the array specification at %L in the same ALLOCATE " "statement where it is itself allocated" msgstr "" -#: fortran/resolve.c:5271 +#: fortran/resolve.c:5351 #, no-c-format msgid "STAT variable '%s' of %s statement at %C cannot be INTENT(IN)" msgstr "" -#: fortran/resolve.c:5275 +#: fortran/resolve.c:5355 #, no-c-format msgid "Illegal STAT variable in %s statement at %C for a PURE procedure" msgstr "" -#: fortran/resolve.c:5280 +#: fortran/resolve.c:5360 #, no-c-format msgid "STAT tag in %s statement at %L must be of type INTEGER" msgstr "" @@ -9476,99 +9258,99 @@ msgstr "" #. element in the list. Either way, we must #. issue an error and get the next case from P. #. FIXME: Sort P and Q by line number. -#: fortran/resolve.c:5443 +#: fortran/resolve.c:5523 #, no-c-format msgid "CASE label at %L overlaps with CASE label at %L" msgstr "" -#: fortran/resolve.c:5494 +#: fortran/resolve.c:5574 #, no-c-format msgid "Expression in CASE statement at %L must be of type %s" msgstr "" -#: fortran/resolve.c:5505 +#: fortran/resolve.c:5585 #, no-c-format msgid "Expression in CASE statement at %L must be of kind %d" msgstr "" -#: fortran/resolve.c:5517 +#: fortran/resolve.c:5597 #, no-c-format msgid "Expression in CASE statement at %L must be scalar" msgstr "" -#: fortran/resolve.c:5563 +#: fortran/resolve.c:5643 #, no-c-format msgid "" "Selection expression in computed GOTO statement at %L must be a scalar " "integer expression" msgstr "" -#: fortran/resolve.c:5581 +#: fortran/resolve.c:5661 #, no-c-format msgid "Argument of SELECT statement at %L cannot be %s" msgstr "" -#: fortran/resolve.c:5590 +#: fortran/resolve.c:5670 #, no-c-format msgid "Argument of SELECT statement at %L must be a scalar expression" msgstr "" -#: fortran/resolve.c:5655 +#: fortran/resolve.c:5735 #, no-c-format msgid "" "The DEFAULT CASE at %L cannot be followed by a second DEFAULT CASE at %L" msgstr "" -#: fortran/resolve.c:5681 +#: fortran/resolve.c:5761 #, no-c-format msgid "Logical range in CASE statement at %L is not allowed" msgstr "" -#: fortran/resolve.c:5693 +#: fortran/resolve.c:5773 #, no-c-format msgid "constant logical value in CASE statement is repeated at %L" msgstr "" -#: fortran/resolve.c:5707 +#: fortran/resolve.c:5787 #, no-c-format msgid "Range specification at %L can never be matched" msgstr "" -#: fortran/resolve.c:5810 +#: fortran/resolve.c:5890 #, no-c-format msgid "Logical SELECT CASE block at %L has more that two cases" msgstr "" -#: fortran/resolve.c:5848 +#: fortran/resolve.c:5928 #, no-c-format msgid "Data transfer element at %L cannot have POINTER components" msgstr "" -#: fortran/resolve.c:5855 +#: fortran/resolve.c:5935 #, no-c-format msgid "Data transfer element at %L cannot have ALLOCATABLE components" msgstr "" -#: fortran/resolve.c:5862 +#: fortran/resolve.c:5942 #, no-c-format msgid "Data transfer element at %L cannot have PRIVATE components" msgstr "" -#: fortran/resolve.c:5871 +#: fortran/resolve.c:5951 #, no-c-format msgid "" "Data transfer element at %L cannot be a full reference to an assumed-size " "array" msgstr "" -#: fortran/resolve.c:5935 +#: fortran/resolve.c:6015 #, no-c-format msgid "" "Statement at %L is not a valid branch target statement for the branch " "statement at %L" msgstr "" -#: fortran/resolve.c:5944 +#: fortran/resolve.c:6024 #, no-c-format msgid "Branch at %L may result in an infinite loop" msgstr "" @@ -9576,118 +9358,118 @@ msgstr "" #. The label is not in an enclosing block, so illegal. This was #. allowed in Fortran 66, so we allow it as extension. No #. further checks are necessary in this case. -#: fortran/resolve.c:5957 +#: fortran/resolve.c:6037 #, no-c-format msgid "Label at %L is not in the same block as the GOTO statement at %L" msgstr "" -#: fortran/resolve.c:5972 fortran/resolve.c:5986 +#: fortran/resolve.c:6052 fortran/resolve.c:6066 #, no-c-format msgid "Deleted feature: GOTO at %L jumps to END of construct at %L" msgstr "" -#: fortran/resolve.c:6063 +#: fortran/resolve.c:6143 #, no-c-format msgid "WHERE mask at %L has inconsistent shape" msgstr "" -#: fortran/resolve.c:6079 +#: fortran/resolve.c:6159 #, no-c-format msgid "WHERE assignment target at %L has inconsistent shape" msgstr "" -#: fortran/resolve.c:6087 fortran/resolve.c:6174 +#: fortran/resolve.c:6167 fortran/resolve.c:6254 #, no-c-format msgid "Non-ELEMENTAL user-defined assignment in WHERE at %L" msgstr "" -#: fortran/resolve.c:6097 fortran/resolve.c:6184 +#: fortran/resolve.c:6177 fortran/resolve.c:6264 #, no-c-format msgid "Unsupported statement inside WHERE at %L" msgstr "" -#: fortran/resolve.c:6128 +#: fortran/resolve.c:6208 #, no-c-format msgid "Assignment to a FORALL index variable at %L" msgstr "" -#: fortran/resolve.c:6137 +#: fortran/resolve.c:6217 #, no-c-format msgid "" "The FORALL with index '%s' is not used on the left side of the assignment at " "%L and so might cause multiple assignment to this object" msgstr "" -#: fortran/resolve.c:6306 +#: fortran/resolve.c:6386 #, no-c-format msgid "An outer FORALL construct already has an index with this name %L" msgstr "" -#: fortran/resolve.c:6373 +#: fortran/resolve.c:6453 #, no-c-format msgid "WHERE/ELSEWHERE clause at %L requires a LOGICAL array" msgstr "" -#: fortran/resolve.c:6435 +#: fortran/resolve.c:6515 #, no-c-format msgid "Subroutine '%s' called instead of assignment at %L must be PURE" msgstr "" -#: fortran/resolve.c:6508 +#: fortran/resolve.c:6588 #, no-c-format msgid "CHARACTER expression will be truncated in assignment (%d/%d) at %L" msgstr "" -#: fortran/resolve.c:6533 +#: fortran/resolve.c:6613 #, no-c-format msgid "Cannot assign to variable '%s' in PURE procedure at %L" msgstr "" -#: fortran/resolve.c:6545 +#: fortran/resolve.c:6625 #, no-c-format msgid "" "The impure variable at %L is assigned to a derived type variable with a " "POINTER component in a PURE procedure (12.6)" msgstr "" -#: fortran/resolve.c:6651 +#: fortran/resolve.c:6731 #, no-c-format msgid "ASSIGNED GOTO statement at %L requires an INTEGER variable" msgstr "" -#: fortran/resolve.c:6654 +#: fortran/resolve.c:6734 #, no-c-format msgid "Variable '%s' has not been assigned a target label at %L" msgstr "" -#: fortran/resolve.c:6665 +#: fortran/resolve.c:6745 #, no-c-format msgid "" "Alternate RETURN statement at %L requires a SCALAR-INTEGER return specifier" msgstr "" -#: fortran/resolve.c:6691 +#: fortran/resolve.c:6771 #, no-c-format msgid "ASSIGN statement at %L requires a scalar default INTEGER variable" msgstr "" -#: fortran/resolve.c:6706 +#: fortran/resolve.c:6786 #, no-c-format msgid "Arithmetic IF statement at %L requires a numeric expression" msgstr "" -#: fortran/resolve.c:6752 +#: fortran/resolve.c:6832 #, no-c-format msgid "" "Exit condition of DO WHILE loop at %L must be a scalar LOGICAL expression" msgstr "" -#: fortran/resolve.c:6834 +#: fortran/resolve.c:6914 #, no-c-format msgid "FORALL mask clause at %L requires a LOGICAL expression" msgstr "" -#: fortran/resolve.c:6906 fortran/resolve.c:6962 +#: fortran/resolve.c:6986 fortran/resolve.c:7042 #, no-c-format msgid "" "Binding label '%s' for common block '%s' at %L collides with the global " @@ -9695,14 +9477,14 @@ msgid "" msgstr "" #. Common block names match but binding labels do not. -#: fortran/resolve.c:6927 +#: fortran/resolve.c:7007 #, no-c-format msgid "" "Binding label '%s' for common block '%s' at %L does not match the binding " "label '%s' for common block '%s' at %L" msgstr "" -#: fortran/resolve.c:6974 +#: fortran/resolve.c:7054 #, no-c-format msgid "" "Binding label '%s' for common block '%s' at %L collides with global entity '%" @@ -9710,57 +9492,57 @@ msgid "" msgstr "" #. Make sure global procedures don't collide with anything. -#: fortran/resolve.c:7026 +#: fortran/resolve.c:7106 #, no-c-format msgid "Binding label '%s' at %L collides with the global entity '%s' at %L" msgstr "" #. Make sure procedures in interface bodies don't collide. -#: fortran/resolve.c:7039 +#: fortran/resolve.c:7119 #, no-c-format msgid "" "Binding label '%s' in interface body at %L collides with the global entity '%" "s' at %L" msgstr "" -#: fortran/resolve.c:7052 +#: fortran/resolve.c:7132 #, no-c-format msgid "Binding label '%s' at %L collides with global entity '%s' at %L" msgstr "" -#: fortran/resolve.c:7129 +#: fortran/resolve.c:7209 #, no-c-format msgid "CHARACTER variable has zero length at %L" msgstr "" -#: fortran/resolve.c:7416 +#: fortran/resolve.c:7502 #, no-c-format msgid "Allocatable array '%s' at %L must have a deferred shape" msgstr "" -#: fortran/resolve.c:7419 +#: fortran/resolve.c:7505 #, no-c-format msgid "Scalar object '%s' at %L may not be ALLOCATABLE" msgstr "" -#: fortran/resolve.c:7426 +#: fortran/resolve.c:7512 #, no-c-format msgid "Array pointer '%s' at %L must have a deferred shape" msgstr "" -#: fortran/resolve.c:7437 +#: fortran/resolve.c:7523 #, no-c-format msgid "Array '%s' at %L cannot have a deferred shape" msgstr "" -#: fortran/resolve.c:7465 +#: fortran/resolve.c:7551 #, no-c-format msgid "" "The type '%s' cannot be host associated at %L because it is blocked by an " "incompatible object of the same name declared at %L" msgstr "" -#: fortran/resolve.c:7488 +#: fortran/resolve.c:7574 #, no-c-format msgid "" "Object '%s' at %L must have the SAVE attribute for default initialization of " @@ -9769,181 +9551,181 @@ msgstr "" #. The shape of a main program or module array needs to be #. constant. -#: fortran/resolve.c:7535 +#: fortran/resolve.c:7621 #, no-c-format msgid "The module or main program array '%s' at %L must have constant shape" msgstr "" -#: fortran/resolve.c:7548 +#: fortran/resolve.c:7634 #, no-c-format msgid "" "Entity with assumed character length at %L must be a dummy argument or a " "PARAMETER" msgstr "" -#: fortran/resolve.c:7567 +#: fortran/resolve.c:7653 #, no-c-format msgid "'%s' at %L must have constant character length in this context" msgstr "" -#: fortran/resolve.c:7603 +#: fortran/resolve.c:7689 #, no-c-format msgid "Allocatable '%s' at %L cannot have an initializer" msgstr "" -#: fortran/resolve.c:7606 +#: fortran/resolve.c:7692 #, no-c-format msgid "External '%s' at %L cannot have an initializer" msgstr "" -#: fortran/resolve.c:7610 +#: fortran/resolve.c:7696 #, no-c-format msgid "Dummy '%s' at %L cannot have an initializer" msgstr "" -#: fortran/resolve.c:7613 +#: fortran/resolve.c:7699 #, no-c-format msgid "Intrinsic '%s' at %L cannot have an initializer" msgstr "" -#: fortran/resolve.c:7616 +#: fortran/resolve.c:7702 #, no-c-format msgid "Function result '%s' at %L cannot have an initializer" msgstr "" -#: fortran/resolve.c:7619 +#: fortran/resolve.c:7705 #, no-c-format msgid "Automatic array '%s' at %L cannot have an initializer" msgstr "" -#: fortran/resolve.c:7642 +#: fortran/resolve.c:7728 #, no-c-format msgid "Although not referenced, '%s' at %L has ambiguous interfaces" msgstr "" -#: fortran/resolve.c:7661 +#: fortran/resolve.c:7747 #, no-c-format msgid "" "Character-valued statement function '%s' at %L must have constant length" msgstr "" -#: fortran/resolve.c:7669 +#: fortran/resolve.c:7755 #, no-c-format msgid "" "Automatic character length function '%s' at %L must have an explicit " "interface" msgstr "" -#: fortran/resolve.c:7694 +#: fortran/resolve.c:7780 #, no-c-format msgid "" "Fortran 2003: '%s' is of a PRIVATE type and cannot be a dummy argument of '%" "s', which is PUBLIC at %L" msgstr "" -#: fortran/resolve.c:7717 fortran/resolve.c:7742 +#: fortran/resolve.c:7803 fortran/resolve.c:7828 #, no-c-format msgid "" "Fortran 2003: Procedure '%s' in PUBLIC interface '%s' at %L takes dummy " "arguments of '%s' which is PRIVATE" msgstr "" -#: fortran/resolve.c:7760 +#: fortran/resolve.c:7846 #, no-c-format msgid "Function '%s' at %L cannot have an initializer" msgstr "" -#: fortran/resolve.c:7769 +#: fortran/resolve.c:7855 #, no-c-format msgid "External object '%s' at %L may not have an initializer" msgstr "" -#: fortran/resolve.c:7777 +#: fortran/resolve.c:7863 #, no-c-format msgid "ELEMENTAL function '%s' at %L must have a scalar result" msgstr "" -#: fortran/resolve.c:7798 +#: fortran/resolve.c:7884 #, no-c-format msgid "CHARACTER(*) function '%s' at %L cannot be array-valued" msgstr "" -#: fortran/resolve.c:7802 +#: fortran/resolve.c:7888 #, no-c-format msgid "CHARACTER(*) function '%s' at %L cannot be pointer-valued" msgstr "" -#: fortran/resolve.c:7806 +#: fortran/resolve.c:7892 #, no-c-format msgid "CHARACTER(*) function '%s' at %L cannot be pure" msgstr "" -#: fortran/resolve.c:7810 +#: fortran/resolve.c:7896 #, no-c-format msgid "CHARACTER(*) function '%s' at %L cannot be recursive" msgstr "" -#: fortran/resolve.c:7819 +#: fortran/resolve.c:7905 #, no-c-format msgid "CHARACTER(*) function '%s' at %L is obsolescent in fortran 95" msgstr "" -#: fortran/resolve.c:7872 +#: fortran/resolve.c:7958 #, no-c-format msgid "PROCEDURE attribute conflicts with SAVE attribute in '%s' at %L" msgstr "" -#: fortran/resolve.c:7879 +#: fortran/resolve.c:7965 #, no-c-format msgid "PROCEDURE attribute conflicts with INTENT attribute in '%s' at %L" msgstr "" -#: fortran/resolve.c:7923 +#: fortran/resolve.c:8009 #, no-c-format msgid "FINAL procedure '%s' at %L is not a SUBROUTINE" msgstr "" -#: fortran/resolve.c:7931 +#: fortran/resolve.c:8017 #, no-c-format msgid "FINAL procedure at %L must have exactly one argument" msgstr "" -#: fortran/resolve.c:7940 +#: fortran/resolve.c:8026 #, no-c-format msgid "Argument of FINAL procedure at %L must be of type '%s'" msgstr "" -#: fortran/resolve.c:7948 +#: fortran/resolve.c:8034 #, no-c-format msgid "Argument of FINAL procedure at %L must not be a POINTER" msgstr "" -#: fortran/resolve.c:7954 +#: fortran/resolve.c:8040 #, no-c-format msgid "Argument of FINAL procedure at %L must not be ALLOCATABLE" msgstr "" -#: fortran/resolve.c:7960 +#: fortran/resolve.c:8046 #, no-c-format msgid "Argument of FINAL procedure at %L must not be OPTIONAL" msgstr "" -#: fortran/resolve.c:7968 +#: fortran/resolve.c:8054 #, no-c-format msgid "Argument of FINAL procedure at %L must not be INTENT(OUT)" msgstr "" -#: fortran/resolve.c:7976 +#: fortran/resolve.c:8062 #, no-c-format msgid "Non-scalar FINAL procedure at %L should have assumed shape argument" msgstr "" -#: fortran/resolve.c:7995 +#: fortran/resolve.c:8081 #, no-c-format msgid "FINAL procedure '%s' declared at %L has the same rank (%d) as '%s'" msgstr "" -#: fortran/resolve.c:8028 +#: fortran/resolve.c:8114 #, no-c-format msgid "" "Only array FINAL procedures declared for derived type '%s' defined at %L, " @@ -9951,302 +9733,302 @@ msgid "" msgstr "" #. TODO: Remove this error when finalization is finished. -#: fortran/resolve.c:8033 +#: fortran/resolve.c:8119 #, no-c-format msgid "Finalization at %L is not yet implemented" msgstr "" -#: fortran/resolve.c:8059 +#: fortran/resolve.c:8145 #, no-c-format msgid "Can't overwrite GENERIC '%s' at %L" msgstr "" -#: fortran/resolve.c:8071 +#: fortran/resolve.c:8157 #, no-c-format msgid "'%s' at %L overrides a procedure binding declared NON_OVERRIDABLE" msgstr "" -#: fortran/resolve.c:8079 +#: fortran/resolve.c:8165 #, no-c-format msgid "'%s' at %L overrides a PURE procedure and must also be PURE" msgstr "" -#: fortran/resolve.c:8088 +#: fortran/resolve.c:8174 #, no-c-format msgid "'%s' at %L overrides an ELEMENTAL procedure and must also be ELEMENTAL" msgstr "" -#: fortran/resolve.c:8094 +#: fortran/resolve.c:8180 #, no-c-format msgid "" "'%s' at %L overrides a non-ELEMENTAL procedure and must not be ELEMENTAL, " "either" msgstr "" -#: fortran/resolve.c:8103 +#: fortran/resolve.c:8189 #, no-c-format msgid "'%s' at %L overrides a SUBROUTINE and must also be a SUBROUTINE" msgstr "" -#: fortran/resolve.c:8114 +#: fortran/resolve.c:8200 #, no-c-format msgid "'%s' at %L overrides a FUNCTION and must also be a FUNCTION" msgstr "" -#: fortran/resolve.c:8125 +#: fortran/resolve.c:8211 #, no-c-format msgid "" "'%s' at %L and the overridden FUNCTION should have matching result types" msgstr "" -#: fortran/resolve.c:8136 +#: fortran/resolve.c:8222 #, no-c-format msgid "'%s' at %L overrides a PUBLIC procedure and must not be PRIVATE" msgstr "" -#: fortran/resolve.c:8165 +#: fortran/resolve.c:8251 #, no-c-format msgid "" "Dummy argument '%s' of '%s' at %L should be named '%s' as to match the " "corresponding argument of the overridden procedure" msgstr "" -#: fortran/resolve.c:8178 +#: fortran/resolve.c:8264 #, no-c-format msgid "" "Types mismatch for dummy argument '%s' of '%s' %L in in respect to the " "overridden procedure" msgstr "" -#: fortran/resolve.c:8188 +#: fortran/resolve.c:8274 #, no-c-format msgid "" "'%s' at %L must have the same number of formal arguments as the overridden " "procedure" msgstr "" -#: fortran/resolve.c:8197 +#: fortran/resolve.c:8283 #, no-c-format msgid "'%s' at %L overrides a NOPASS binding and must also be NOPASS" msgstr "" -#: fortran/resolve.c:8208 +#: fortran/resolve.c:8294 #, no-c-format msgid "'%s' at %L overrides a binding with PASS and must also be PASS" msgstr "" -#: fortran/resolve.c:8215 +#: fortran/resolve.c:8301 #, no-c-format msgid "" "Passed-object dummy argument of '%s' at %L must be at the same position as " "the passed-object dummy argument of the overridden procedure" msgstr "" -#: fortran/resolve.c:8246 +#: fortran/resolve.c:8332 #, no-c-format msgid "'%s' and '%s' can't be mixed FUNCTION/SUBROUTINE for GENERIC '%s' at %L" msgstr "" -#: fortran/resolve.c:8255 +#: fortran/resolve.c:8341 #, no-c-format msgid "'%s' and '%s' for GENERIC '%s' at %L are ambiguous" msgstr "" -#: fortran/resolve.c:8324 +#: fortran/resolve.c:8410 #, no-c-format msgid "Undefined specific binding '%s' as target of GENERIC '%s' at %L" msgstr "" -#: fortran/resolve.c:8336 +#: fortran/resolve.c:8422 #, no-c-format msgid "GENERIC '%s' at %L must target a specific binding, '%s' is GENERIC, too" msgstr "" -#: fortran/resolve.c:8366 +#: fortran/resolve.c:8452 #, no-c-format msgid "GENERIC '%s' at %L can't overwrite specific binding with the same name" msgstr "" -#: fortran/resolve.c:8424 +#: fortran/resolve.c:8510 #, no-c-format msgid "" "'%s' must be a module procedure or an external procedure with an explicit " "interface at %L" msgstr "" -#: fortran/resolve.c:8461 +#: fortran/resolve.c:8547 #, no-c-format msgid "Procedure '%s' with PASS(%s) at %L has no argument '%s'" msgstr "" -#: fortran/resolve.c:8475 +#: fortran/resolve.c:8561 #, no-c-format msgid "Procedure '%s' with PASS at %L must have at least one argument" msgstr "" -#: fortran/resolve.c:8487 +#: fortran/resolve.c:8573 #, no-c-format msgid "" "Argument '%s' of '%s' with PASS(%s) at %L must be of the derived-type '%s'" msgstr "" -#: fortran/resolve.c:8493 +#: fortran/resolve.c:8579 #, no-c-format msgid "" "Polymorphic entities are not yet implemented, non-polymorphic passed-object " "dummy argument of '%s' at %L accepted" msgstr "" -#: fortran/resolve.c:8518 +#: fortran/resolve.c:8604 #, no-c-format msgid "Procedure '%s' at %L has the same name as a component of '%s'" msgstr "" -#: fortran/resolve.c:8527 +#: fortran/resolve.c:8613 #, no-c-format msgid "" "Procedure '%s' at %L has the same name as an inherited component of '%s'" msgstr "" -#: fortran/resolve.c:8595 +#: fortran/resolve.c:8681 #, no-c-format msgid "Non-extensible derived-type '%s' at %L must not be ABSTRACT" msgstr "" -#: fortran/resolve.c:8612 +#: fortran/resolve.c:8698 #, no-c-format msgid "" "Component '%s' of '%s' at %L has the same name as an inherited type-bound " "procedure" msgstr "" -#: fortran/resolve.c:8624 +#: fortran/resolve.c:8710 #, no-c-format msgid "" "Character length of component '%s' needs to be a constant specification " "expression at %L" msgstr "" -#: fortran/resolve.c:8639 +#: fortran/resolve.c:8725 #, no-c-format msgid "" "The component '%s' is a PRIVATE type and cannot be a component of '%s', " "which is PUBLIC at %L" msgstr "" -#: fortran/resolve.c:8649 +#: fortran/resolve.c:8735 #, no-c-format msgid "" "Component %s of SEQUENCE type declared at %L does not have the SEQUENCE " "attribute" msgstr "" -#: fortran/resolve.c:8660 +#: fortran/resolve.c:8746 #, no-c-format msgid "" "The pointer component '%s' of '%s' at %L is a type that has not been declared" msgstr "" -#: fortran/resolve.c:8688 +#: fortran/resolve.c:8774 #, no-c-format msgid "Component '%s' of '%s' at %L must have constant array bounds" msgstr "" -#: fortran/resolve.c:8729 +#: fortran/resolve.c:8815 #, no-c-format msgid "" "NAMELIST object '%s' was declared PRIVATE and cannot be member of PUBLIC " "namelist '%s' at %L" msgstr "" -#: fortran/resolve.c:8739 +#: fortran/resolve.c:8825 #, no-c-format msgid "" "NAMELIST object '%s' has use-associated PRIVATE components and cannot be " "member of namelist '%s' at %L" msgstr "" -#: fortran/resolve.c:8752 +#: fortran/resolve.c:8838 #, no-c-format msgid "" "NAMELIST object '%s' has PRIVATE components and cannot be a member of PUBLIC " "namelist '%s' at %L" msgstr "" -#: fortran/resolve.c:8764 +#: fortran/resolve.c:8850 #, no-c-format msgid "" "NAMELIST array object '%s' must not have assumed shape in namelist '%s' at %L" msgstr "" -#: fortran/resolve.c:8773 +#: fortran/resolve.c:8859 #, no-c-format msgid "" "NAMELIST array object '%s' must have constant shape in namelist '%s' at %L" msgstr "" -#: fortran/resolve.c:8785 +#: fortran/resolve.c:8871 #, no-c-format msgid "" "NAMELIST object '%s' in namelist '%s' at %L cannot have ALLOCATABLE " "components" msgstr "" -#: fortran/resolve.c:8793 +#: fortran/resolve.c:8879 #, no-c-format msgid "" "NAMELIST object '%s' in namelist '%s' at %L cannot have POINTER components" msgstr "" -#: fortran/resolve.c:8819 +#: fortran/resolve.c:8905 #, no-c-format msgid "PROCEDURE attribute conflicts with NAMELIST attribute in '%s' at %L" msgstr "" -#: fortran/resolve.c:8838 +#: fortran/resolve.c:8924 #, no-c-format msgid "Parameter array '%s' at %L cannot be automatic or of deferred shape" msgstr "" -#: fortran/resolve.c:8849 +#: fortran/resolve.c:8935 #, no-c-format msgid "" "Implicitly typed PARAMETER '%s' at %L doesn't match a later IMPLICIT type" msgstr "" -#: fortran/resolve.c:8860 +#: fortran/resolve.c:8946 #, no-c-format msgid "Incompatible derived type in PARAMETER at %L" msgstr "" -#: fortran/resolve.c:8919 +#: fortran/resolve.c:9005 #, no-c-format msgid "" "Interface '%s', used by procedure '%s' at %L, is declared in a later " "PROCEDURE statement" msgstr "" -#: fortran/resolve.c:8967 +#: fortran/resolve.c:9053 #, no-c-format msgid "Interface '%s' of procedure '%s' at %L must be explicit" msgstr "" -#: fortran/resolve.c:9000 +#: fortran/resolve.c:9086 #, no-c-format msgid "Type specified for intrinsic function '%s' at %L is ignored" msgstr "" -#: fortran/resolve.c:9007 +#: fortran/resolve.c:9093 #, no-c-format msgid "Intrinsic subroutine '%s' at %L shall not have a type specifier" msgstr "" -#: fortran/resolve.c:9014 +#: fortran/resolve.c:9100 #, no-c-format msgid "'%s' declared INTRINSIC at %L does not exist" msgstr "" -#: fortran/resolve.c:9023 +#: fortran/resolve.c:9109 #, no-c-format msgid "" "The intrinsic '%s' declared INTRINSIC at %L is not available in the current " @@ -10254,229 +10036,229 @@ msgid "" "intrinsics in order to use it." msgstr "" -#: fortran/resolve.c:9067 +#: fortran/resolve.c:9153 #, no-c-format msgid "Assumed size array at %L must be a dummy argument" msgstr "" -#: fortran/resolve.c:9070 +#: fortran/resolve.c:9156 #, no-c-format msgid "Assumed shape array at %L must be a dummy argument" msgstr "" -#: fortran/resolve.c:9082 +#: fortran/resolve.c:9168 #, no-c-format msgid "Symbol at %L is not a DUMMY variable" msgstr "" -#: fortran/resolve.c:9088 +#: fortran/resolve.c:9174 #, no-c-format msgid "" "'%s' at %L cannot have the VALUE attribute because it is not a dummy argument" msgstr "" -#: fortran/resolve.c:9098 +#: fortran/resolve.c:9184 #, no-c-format msgid "" "Character dummy variable '%s' at %L with VALUE attribute must have constant " "length" msgstr "" -#: fortran/resolve.c:9107 +#: fortran/resolve.c:9193 #, no-c-format msgid "" "C interoperable character dummy variable '%s' at %L with VALUE attribute " "must have length one" msgstr "" -#: fortran/resolve.c:9133 +#: fortran/resolve.c:9219 #, no-c-format msgid "" "Variable '%s' at %L cannot be BIND(C) because it is neither a COMMON block " "nor declared at the module level scope" msgstr "" -#: fortran/resolve.c:9186 +#: fortran/resolve.c:9272 #, no-c-format msgid "The derived type '%s' at %L is of type '%s', which has not been defined" msgstr "" -#: fortran/resolve.c:9226 +#: fortran/resolve.c:9313 #, no-c-format msgid "Fortran 2003: PUBLIC %s '%s' at %L of PRIVATE derived type '%s'" msgstr "" -#: fortran/resolve.c:9245 +#: fortran/resolve.c:9332 #, no-c-format msgid "" "The INTENT(OUT) dummy argument '%s' at %L is ASSUMED SIZE and so cannot have " "a default initializer" msgstr "" -#: fortran/resolve.c:9304 +#: fortran/resolve.c:9391 #, no-c-format msgid "Threadprivate at %L isn't SAVEd" msgstr "" -#: fortran/resolve.c:9389 +#: fortran/resolve.c:9476 #, no-c-format msgid "BLOCK DATA element '%s' at %L must be in COMMON" msgstr "" -#: fortran/resolve.c:9395 +#: fortran/resolve.c:9482 #, no-c-format msgid "DATA array '%s' at %L must be specified in a previous declaration" msgstr "" -#: fortran/resolve.c:9440 +#: fortran/resolve.c:9527 #, no-c-format msgid "Nonconstant array section at %L in DATA statement" msgstr "" -#: fortran/resolve.c:9453 +#: fortran/resolve.c:9540 #, no-c-format msgid "DATA statement at %L has more variables than values" msgstr "" -#: fortran/resolve.c:9547 +#: fortran/resolve.c:9634 #, no-c-format msgid "iterator start at %L does not simplify" msgstr "" -#: fortran/resolve.c:9554 +#: fortran/resolve.c:9641 #, no-c-format msgid "iterator end at %L does not simplify" msgstr "" -#: fortran/resolve.c:9561 +#: fortran/resolve.c:9648 #, no-c-format msgid "iterator step at %L does not simplify" msgstr "" -#: fortran/resolve.c:9687 +#: fortran/resolve.c:9774 #, no-c-format msgid "DATA statement at %L has more values than variables" msgstr "" -#: fortran/resolve.c:9778 +#: fortran/resolve.c:9865 #, no-c-format msgid "Label %d at %L defined but not used" msgstr "" -#: fortran/resolve.c:9783 +#: fortran/resolve.c:9870 #, no-c-format msgid "Label %d at %L defined but cannot be used" msgstr "" -#: fortran/resolve.c:9868 +#: fortran/resolve.c:9955 #, no-c-format msgid "" "Derived type variable '%s' at %L must have SEQUENCE attribute to be an " "EQUIVALENCE object" msgstr "" -#: fortran/resolve.c:9877 +#: fortran/resolve.c:9964 #, no-c-format msgid "" "Derived type variable '%s' at %L cannot have ALLOCATABLE components to be an " "EQUIVALENCE object" msgstr "" -#: fortran/resolve.c:9885 +#: fortran/resolve.c:9972 #, no-c-format msgid "" "Derived type variable '%s' at %L with default initialization cannot be in " "EQUIVALENCE with a variable in COMMON" msgstr "" -#: fortran/resolve.c:9902 +#: fortran/resolve.c:9989 #, no-c-format msgid "" "Derived type variable '%s' at %L with pointer component(s) cannot be an " "EQUIVALENCE object" msgstr "" -#: fortran/resolve.c:10007 +#: fortran/resolve.c:10094 #, no-c-format msgid "Syntax error in EQUIVALENCE statement at %L" msgstr "" -#: fortran/resolve.c:10022 +#: fortran/resolve.c:10109 #, no-c-format msgid "" "Either all or none of the objects in the EQUIVALENCE set at %L shall have " "the PROTECTED attribute" msgstr "" -#: fortran/resolve.c:10034 +#: fortran/resolve.c:10121 #, no-c-format msgid "" "Common block member '%s' at %L cannot be an EQUIVALENCE object in the pure " "procedure '%s'" msgstr "" -#: fortran/resolve.c:10043 +#: fortran/resolve.c:10130 #, no-c-format msgid "Named constant '%s' at %L cannot be an EQUIVALENCE object" msgstr "" -#: fortran/resolve.c:10122 +#: fortran/resolve.c:10209 #, no-c-format msgid "" "Array '%s' at %L with non-constant bounds cannot be an EQUIVALENCE object" msgstr "" -#: fortran/resolve.c:10133 +#: fortran/resolve.c:10220 #, no-c-format msgid "Structure component '%s' at %L cannot be an EQUIVALENCE object" msgstr "" -#: fortran/resolve.c:10144 +#: fortran/resolve.c:10231 #, no-c-format msgid "Substring at %L has length zero" msgstr "" -#: fortran/resolve.c:10188 +#: fortran/resolve.c:10275 #, no-c-format msgid "Fortran 2003: PUBLIC function '%s' at %L of PRIVATE type '%s'" msgstr "" -#: fortran/resolve.c:10201 +#: fortran/resolve.c:10288 #, no-c-format msgid "ENTRY '%s' at %L has no IMPLICIT type" msgstr "" -#: fortran/resolve.c:10227 +#: fortran/resolve.c:10314 #, no-c-format msgid "User operator procedure '%s' at %L must be a FUNCTION" msgstr "" -#: fortran/resolve.c:10234 +#: fortran/resolve.c:10321 #, no-c-format msgid "User operator procedure '%s' at %L cannot be assumed character length" msgstr "" -#: fortran/resolve.c:10240 +#: fortran/resolve.c:10327 #, no-c-format msgid "User operator procedure '%s' at %L must have at least one argument" msgstr "" -#: fortran/resolve.c:10250 +#: fortran/resolve.c:10337 #, no-c-format msgid "First argument of operator interface at %L cannot be optional" msgstr "" -#: fortran/resolve.c:10262 +#: fortran/resolve.c:10349 #, no-c-format msgid "Second argument of operator interface at %L cannot be optional" msgstr "" -#: fortran/resolve.c:10266 +#: fortran/resolve.c:10353 #, no-c-format msgid "Operator interface at %L must have, at most, two arguments" msgstr "" -#: fortran/resolve.c:10320 +#: fortran/resolve.c:10407 #, no-c-format msgid "Contained procedure '%s' at %L of a PURE procedure must also be PURE" msgstr "" @@ -10513,17 +10295,17 @@ msgstr "" msgid "Nonconforming tab character in column %d of line %d" msgstr "" -#: fortran/scanner.c:1644 +#: fortran/scanner.c:1647 #, no-c-format msgid "%s:%d: file %s left but not entered" msgstr "" -#: fortran/scanner.c:1678 +#: fortran/scanner.c:1681 #, no-c-format msgid "%s:%d: Illegal preprocessor directive" msgstr "" -#: fortran/scanner.c:1796 +#: fortran/scanner.c:1799 #, no-c-format msgid "Can't open file '%s'" msgstr "" @@ -10706,34 +10488,34 @@ msgstr "" msgid "Argument of KIND at %L is a DERIVED type" msgstr "" -#: fortran/simplify.c:2362 +#: fortran/simplify.c:2383 #, no-c-format msgid "DIM argument at %L is out of bounds" msgstr "" -#: fortran/simplify.c:2534 +#: fortran/simplify.c:2555 #, no-c-format msgid "Argument of LOG at %L cannot be less than or equal to zero" msgstr "" -#: fortran/simplify.c:2547 +#: fortran/simplify.c:2568 #, no-c-format msgid "Complex argument of LOG at %L cannot be zero" msgstr "" -#: fortran/simplify.c:2588 +#: fortran/simplify.c:2609 #, no-c-format msgid "Argument of LOG10 at %L cannot be less than or equal to zero" msgstr "" #. Result is processor-dependent. -#: fortran/simplify.c:2869 +#: fortran/simplify.c:2902 #, no-c-format msgid "Second argument MOD at %L is zero" msgstr "" #. Result is processor-dependent. -#: fortran/simplify.c:2880 +#: fortran/simplify.c:2913 #, no-c-format msgid "Second argument of MOD at %L is zero" msgstr "" @@ -10741,95 +10523,95 @@ msgstr "" #. Result is processor-dependent. This processor just opts #. to not handle it at all. #. Result is processor-dependent. -#: fortran/simplify.c:2922 fortran/simplify.c:2934 +#: fortran/simplify.c:2955 fortran/simplify.c:2967 #, no-c-format msgid "Second argument of MODULO at %L is zero" msgstr "" -#: fortran/simplify.c:2980 +#: fortran/simplify.c:3013 #, no-c-format msgid "Second argument of NEAREST at %L shall not be zero" msgstr "" -#: fortran/simplify.c:3015 +#: fortran/simplify.c:3049 #, no-c-format msgid "Result of NEAREST is NaN at %L" msgstr "" -#: fortran/simplify.c:3296 +#: fortran/simplify.c:3330 #, no-c-format msgid "Argument NCOPIES of REPEAT intrinsic is negative at %L" msgstr "" -#: fortran/simplify.c:3351 +#: fortran/simplify.c:3385 #, no-c-format msgid "Argument NCOPIES of REPEAT intrinsic is too large at %L" msgstr "" -#: fortran/simplify.c:3465 +#: fortran/simplify.c:3496 #, no-c-format msgid "Integer too large in shape specification at %L" msgstr "" -#: fortran/simplify.c:3473 +#: fortran/simplify.c:3504 #, no-c-format msgid "Too many dimensions in shape specification for RESHAPE at %L" msgstr "" -#: fortran/simplify.c:3481 +#: fortran/simplify.c:3512 #, no-c-format msgid "Shape specification at %L cannot be negative" msgstr "" -#: fortran/simplify.c:3493 +#: fortran/simplify.c:3524 #, no-c-format msgid "Shape specification at %L cannot be the null array" msgstr "" -#: fortran/simplify.c:3514 +#: fortran/simplify.c:3545 #, no-c-format msgid "" "ORDER parameter of RESHAPE at %L is not the same size as SHAPE parameter" msgstr "" -#: fortran/simplify.c:3521 +#: fortran/simplify.c:3552 #, no-c-format msgid "Error in ORDER parameter of RESHAPE at %L" msgstr "" -#: fortran/simplify.c:3529 +#: fortran/simplify.c:3560 #, no-c-format msgid "ORDER parameter of RESHAPE at %L is out of range" msgstr "" -#: fortran/simplify.c:3539 +#: fortran/simplify.c:3570 #, no-c-format msgid "Invalid permutation in ORDER parameter at %L" msgstr "" -#: fortran/simplify.c:3598 +#: fortran/simplify.c:3629 #, no-c-format msgid "PAD parameter required for short SOURCE parameter at %L" msgstr "" -#: fortran/simplify.c:3717 +#: fortran/simplify.c:3748 #, no-c-format msgid "Result of SCALE overflows its kind at %L" msgstr "" -#: fortran/simplify.c:4351 +#: fortran/simplify.c:4382 #, no-c-format msgid "Argument of SQRT at %L has a negative value" msgstr "" -#: fortran/simplify.c:4506 +#: fortran/simplify.c:4537 #, no-c-format msgid "" "Intrinsic TRANSFER at %L has partly undefined result: source size %ld < " "result size %ld" msgstr "" -#: fortran/simplify.c:4871 +#: fortran/simplify.c:4903 #, no-c-format msgid "" "Character '%s' in string at %L cannot be converted into character kind %d" @@ -10896,233 +10678,233 @@ msgstr "" msgid "BIND(C) applied to %s %s at %L" msgstr "" -#: fortran/symbol.c:711 fortran/symbol.c:1364 +#: fortran/symbol.c:716 fortran/symbol.c:1369 #, no-c-format msgid "%s attribute conflicts with %s attribute at %L" msgstr "" -#: fortran/symbol.c:714 +#: fortran/symbol.c:719 #, no-c-format msgid "%s attribute conflicts with %s attribute in '%s' at %L" msgstr "" -#: fortran/symbol.c:722 +#: fortran/symbol.c:727 #, no-c-format msgid "Fortran 2003: %s attribute with %s attribute at %L" msgstr "" -#: fortran/symbol.c:728 +#: fortran/symbol.c:733 #, no-c-format msgid "Fortran 2003: %s attribute with %s attribute in '%s' at %L" msgstr "" -#: fortran/symbol.c:772 +#: fortran/symbol.c:777 #, no-c-format msgid "Cannot change attributes of USE-associated symbol at %L" msgstr "" -#: fortran/symbol.c:775 +#: fortran/symbol.c:780 #, no-c-format msgid "Cannot change attributes of USE-associated symbol %s at %L" msgstr "" -#: fortran/symbol.c:791 +#: fortran/symbol.c:796 #, no-c-format msgid "Duplicate %s attribute specified at %L" msgstr "" -#: fortran/symbol.c:824 +#: fortran/symbol.c:829 #, no-c-format msgid "ALLOCATABLE specified outside of INTERFACE body at %L" msgstr "" -#: fortran/symbol.c:850 +#: fortran/symbol.c:855 #, no-c-format msgid "DIMENSION specified for '%s' outside its INTERFACE body at %L" msgstr "" -#: fortran/symbol.c:968 +#: fortran/symbol.c:973 #, no-c-format msgid "Cray Pointee at %L appears in multiple pointer() statements" msgstr "" -#: fortran/symbol.c:987 +#: fortran/symbol.c:992 #, no-c-format msgid "Duplicate PROTECTED attribute specified at %L" msgstr "" -#: fortran/symbol.c:1020 +#: fortran/symbol.c:1025 #, no-c-format msgid "SAVE attribute at %L cannot be specified in a PURE procedure" msgstr "" -#: fortran/symbol.c:1028 +#: fortran/symbol.c:1033 #, no-c-format msgid "Duplicate SAVE attribute specified at %L" msgstr "" -#: fortran/symbol.c:1049 +#: fortran/symbol.c:1054 #, no-c-format msgid "Duplicate VALUE attribute specified at %L" msgstr "" -#: fortran/symbol.c:1069 +#: fortran/symbol.c:1074 #, no-c-format msgid "Duplicate VOLATILE attribute specified at %L" msgstr "" -#: fortran/symbol.c:1360 +#: fortran/symbol.c:1365 #, no-c-format msgid "%s attribute of '%s' conflicts with %s attribute at %L" msgstr "" -#: fortran/symbol.c:1394 +#: fortran/symbol.c:1399 #, no-c-format msgid "%s procedure at %L is already declared as %s procedure" msgstr "" -#: fortran/symbol.c:1429 +#: fortran/symbol.c:1434 #, no-c-format msgid "INTENT (%s) conflicts with INTENT(%s) at %L" msgstr "" -#: fortran/symbol.c:1453 +#: fortran/symbol.c:1458 #, no-c-format msgid "ACCESS specification at %L was already specified" msgstr "" -#: fortran/symbol.c:1470 +#: fortran/symbol.c:1475 #, no-c-format msgid "Duplicate BIND attribute specified at %L" msgstr "" -#: fortran/symbol.c:1477 +#: fortran/symbol.c:1482 #, no-c-format msgid "Fortran 2003: BIND(C) at %L" msgstr "" -#: fortran/symbol.c:1494 +#: fortran/symbol.c:1499 #, no-c-format msgid "Duplicate EXTENDS attribute specified at %L" msgstr "" -#: fortran/symbol.c:1498 +#: fortran/symbol.c:1503 #, no-c-format msgid "Fortran 2003: EXTENDS at %L" msgstr "" -#: fortran/symbol.c:1520 +#: fortran/symbol.c:1525 #, no-c-format msgid "Symbol '%s' at %L already has an explicit interface" msgstr "" -#: fortran/symbol.c:1527 +#: fortran/symbol.c:1532 #, no-c-format msgid "'%s' at %L has attributes specified outside its INTERFACE body" msgstr "" -#: fortran/symbol.c:1574 +#: fortran/symbol.c:1579 #, no-c-format msgid "Symbol '%s' at %L cannot have a type" msgstr "" -#: fortran/symbol.c:1733 +#: fortran/symbol.c:1738 #, no-c-format msgid "Component '%s' at %C already declared at %L" msgstr "" -#: fortran/symbol.c:1744 +#: fortran/symbol.c:1749 #, no-c-format msgid "Component '%s' at %C already in the parent type at %L" msgstr "" -#: fortran/symbol.c:1819 +#: fortran/symbol.c:1824 #, no-c-format msgid "Symbol '%s' at %C is ambiguous" msgstr "" -#: fortran/symbol.c:1851 +#: fortran/symbol.c:1856 #, no-c-format msgid "Derived type '%s' at %C is being used before it is defined" msgstr "" -#: fortran/symbol.c:1892 +#: fortran/symbol.c:1897 #, no-c-format msgid "'%s' at %C is not a member of the '%s' structure" msgstr "" -#: fortran/symbol.c:1900 +#: fortran/symbol.c:1905 #, no-c-format msgid "Component '%s' at %C is a PRIVATE component of '%s'" msgstr "" -#: fortran/symbol.c:1910 +#: fortran/symbol.c:1915 #, no-c-format msgid "All components of '%s' are PRIVATE in structure constructor at %C" msgstr "" -#: fortran/symbol.c:2039 +#: fortran/symbol.c:2044 #, no-c-format msgid "Duplicate statement label %d at %L and %L" msgstr "" -#: fortran/symbol.c:2049 +#: fortran/symbol.c:2054 #, no-c-format msgid "Label %d at %C already referenced as branch target" msgstr "" -#: fortran/symbol.c:2058 +#: fortran/symbol.c:2063 #, no-c-format msgid "Label %d at %C already referenced as a format label" msgstr "" -#: fortran/symbol.c:2100 +#: fortran/symbol.c:2105 #, no-c-format msgid "Label %d at %C previously used as a FORMAT label" msgstr "" -#: fortran/symbol.c:2108 +#: fortran/symbol.c:2113 #, no-c-format msgid "Label %d at %C previously used as branch target" msgstr "" -#: fortran/symbol.c:2420 +#: fortran/symbol.c:2425 #, no-c-format msgid "Name '%s' at %C is an ambiguous reference to '%s' from module '%s'" msgstr "" -#: fortran/symbol.c:2423 +#: fortran/symbol.c:2428 #, no-c-format msgid "" "Name '%s' at %C is an ambiguous reference to '%s' from current program unit" msgstr "" #. Symbol is from another namespace. -#: fortran/symbol.c:2567 +#: fortran/symbol.c:2572 #, no-c-format msgid "Symbol '%s' at %C has already been host associated" msgstr "" -#: fortran/symbol.c:3336 +#: fortran/symbol.c:3342 #, no-c-format msgid "" "Derived type '%s' declared at %L must have the BIND attribute to be C " "interoperable" msgstr "" -#: fortran/symbol.c:3347 +#: fortran/symbol.c:3353 #, no-c-format msgid "Derived type '%s' at %L is empty" msgstr "" -#: fortran/symbol.c:3364 +#: fortran/symbol.c:3370 #, no-c-format msgid "" "Component '%s' at %L cannot have the POINTER attribute because it is a " "member of the BIND(C) derived type '%s' at %L" msgstr "" -#: fortran/symbol.c:3376 +#: fortran/symbol.c:3382 #, no-c-format msgid "" "Component '%s' at %L cannot have the ALLOCATABLE attribute because it is a " @@ -11131,7 +10913,7 @@ msgstr "" #. If the derived type is bind(c), all fields must be #. interop. -#: fortran/symbol.c:3415 +#: fortran/symbol.c:3420 #, no-c-format msgid "" "Component '%s' in derived type '%s' at %L may not be C interoperable, even " @@ -11141,66 +10923,66 @@ msgstr "" #. If derived type is param to bind(c) routine, or to one #. of the iso_c_binding procs, it must be interoperable, so #. all fields must interop too. -#: fortran/symbol.c:3424 +#: fortran/symbol.c:3429 #, no-c-format msgid "Component '%s' in derived type '%s' at %L may not be C interoperable" msgstr "" -#: fortran/symbol.c:3438 +#: fortran/symbol.c:3443 #, no-c-format msgid "" "Derived type '%s' at %L cannot be declared with both PRIVATE and BIND(C) " "attributes" msgstr "" -#: fortran/symbol.c:3446 +#: fortran/symbol.c:3451 #, no-c-format msgid "" "Derived type '%s' at %L cannot have the SEQUENCE attribute because it is BIND" "(C)" msgstr "" -#: fortran/symbol.c:4261 +#: fortran/symbol.c:4267 #, no-c-format msgid "Symbol '%s' is used before it is typed at %L" msgstr "" -#: fortran/symbol.c:4267 +#: fortran/symbol.c:4273 #, no-c-format msgid "Extension: Symbol '%s' is used before it is typed at %L" msgstr "" -#: fortran/symbol.c:4318 +#: fortran/symbol.c:4324 #, no-c-format msgid "'%s' of '%s' is PRIVATE at %C" msgstr "" -#: fortran/target-memory.c:610 +#: fortran/target-memory.c:615 #, no-c-format msgid "Overlapping unequal initializers in EQUIVALENCE at %L" msgstr "" -#: fortran/target-memory.c:697 +#: fortran/target-memory.c:702 #, no-c-format msgid "BOZ constant at %L is too large (%ld vs %ld bits)" msgstr "" -#: fortran/trans-array.c:641 fortran/trans-array.c:4368 -#: fortran/trans-array.c:5299 fortran/trans-intrinsic.c:3635 +#: fortran/trans-array.c:641 fortran/trans-array.c:4384 +#: fortran/trans-array.c:5315 fortran/trans-intrinsic.c:3719 #, no-c-format msgid "Creating array temporary at %L" msgstr "" #. Problems occur when we get something like #. integer :: a(lots) = (/(i, i=1, lots)/) -#: fortran/trans-array.c:3951 +#: fortran/trans-array.c:3954 #, no-c-format msgid "" "The number of elements in the array constructor at %L requires an increase " "of the allowed %d upper limit. See -fmax-array-constructor option" msgstr "" -#: fortran/trans-array.c:5296 +#: fortran/trans-array.c:5312 #, no-c-format msgid "Creating array temporary at %L for argument '%s'" msgstr "" @@ -11277,57 +11059,57 @@ msgid "" "fno-align-commons" msgstr "" -#: fortran/trans-const.c:290 +#: fortran/trans-const.c:294 #, no-c-format msgid "Assigning value other than 0 or 1 to LOGICAL has undefined result at %L" msgstr "" -#: fortran/trans-decl.c:2835 fortran/trans-decl.c:3858 +#: fortran/trans-decl.c:2868 fortran/trans-decl.c:3906 #, no-c-format msgid "Return value of function '%s' at %L not set" msgstr "" -#: fortran/trans-decl.c:3493 +#: fortran/trans-decl.c:3527 #, no-c-format msgid "Dummy argument '%s' at %L was declared INTENT(OUT) but was not set" msgstr "" -#: fortran/trans-decl.c:3497 +#: fortran/trans-decl.c:3531 #, no-c-format msgid "Unused dummy argument '%s' at %L" msgstr "" -#: fortran/trans-decl.c:3503 +#: fortran/trans-decl.c:3537 #, no-c-format msgid "Unused variable '%s' declared at %L" msgstr "" -#: fortran/trans-decl.c:3535 +#: fortran/trans-decl.c:3583 #, no-c-format msgid "Unused parameter '%s' declared at %L" msgstr "" -#: fortran/trans-decl.c:3549 +#: fortran/trans-decl.c:3597 #, no-c-format msgid "Return value '%s' of function '%s' declared at %L not set" msgstr "" -#: fortran/trans-expr.c:2391 +#: fortran/trans-expr.c:2399 #, no-c-format msgid "Unknown argument list function at %L" msgstr "" -#: fortran/trans-intrinsic.c:853 +#: fortran/trans-intrinsic.c:882 #, no-c-format msgid "'dim' argument of %s intrinsic at %L is not a valid dimension index" msgstr "" -#: fortran/trans-io.c:2006 +#: fortran/trans-io.c:2004 #, no-c-format msgid "Derived type '%s' at %L has PRIVATE components" msgstr "" -#: fortran/trans-stmt.c:462 +#: fortran/trans-stmt.c:471 #, no-c-format msgid "An alternate return at %L without a * dummy argument" msgstr "" @@ -11344,33 +11126,33 @@ msgstr "" msgid "Incorrect function return value" msgstr "" -#: fortran/trans.c:515 fortran/trans.c:935 +#: fortran/trans.c:516 fortran/trans.c:936 msgid "Attempt to allocate a negative amount of memory." msgstr "" -#: fortran/trans.c:533 +#: fortran/trans.c:534 msgid "Memory allocation failed" msgstr "" -#: fortran/trans.c:615 +#: fortran/trans.c:616 msgid "" "Attempt to allocate negative amount of memory. Possible integer overflow" msgstr "" -#: fortran/trans.c:646 fortran/trans.c:952 +#: fortran/trans.c:647 fortran/trans.c:953 msgid "Out of memory" msgstr "" -#: fortran/trans.c:737 +#: fortran/trans.c:738 #, c-format msgid "Attempting to allocate already allocated array '%s'" msgstr "" -#: fortran/trans.c:743 +#: fortran/trans.c:744 msgid "Attempting to allocate already allocatedarray" msgstr "" -#: fortran/trans.c:852 +#: fortran/trans.c:853 #, c-format msgid "Attempt to DEALLOCATE unallocated '%s'" msgstr "" @@ -11551,118 +11333,80 @@ msgstr "" msgid "cannot specify 'main' class when not linking" msgstr "" -#: java/jvspec.c:80 gcc.c:828 -msgid "-pg and -fomit-frame-pointer are incompatible" -msgstr "" - -#: config/linux.h:106 config/linux.h:108 config/rs6000/sysv4.h:902 -#: config/rs6000/sysv4.h:904 config/rs6000/linux64.h:345 -#: config/rs6000/linux64.h:347 config/alpha/linux-elf.h:33 -#: config/alpha/linux-elf.h:35 -msgid "-mglibc and -muclibc used together" -msgstr "" - -#: config/lynx.h:70 -msgid "cannot use mthreads and mlegacy-threads together" -msgstr "" - -#: config/lynx.h:95 -msgid "cannot use mshared and static together" -msgstr "" - -#: config/sparc/linux64.h:165 config/sparc/linux64.h:176 -#: config/sparc/netbsd-elf.h:125 config/sparc/netbsd-elf.h:144 -#: config/sparc/sol2-bi.h:217 config/sparc/sol2-bi.h:227 -msgid "may not use both -m32 and -m64" +#: config/i386/nwld.h:34 +msgid "Static linking is not supported.\n" msgstr "" -#: config/sparc/sol2-bi.h:189 config/sparc/sol2-bi.h:194 -#: config/sparc/sol2-gld-bi.h:17 config/sparc/sol2-gld-bi.h:22 -msgid "does not support multilib" +#: fortran/lang-specs.h:55 fortran/lang-specs.h:69 +msgid "gfortran does not support -E without -cpp" msgstr "" -#: config/mips/mips.h:1171 config/arc/arc.h:61 -msgid "may not use both -EB and -EL" +#: config/vxworks.h:71 +msgid "-Xbind-now and -Xbind-lazy are incompatible" msgstr "" -#: config/mips/r3900.h:34 -msgid "-mhard-float not supported" +#: config/darwin.h:270 +msgid "-current_version only allowed with -dynamiclib" msgstr "" -#: config/mips/r3900.h:36 -msgid "-msingle-float and -msoft-float cannot both be specified" +#: config/darwin.h:272 +msgid "-install_name only allowed with -dynamiclib" msgstr "" -#: config/i386/mingw32.h:85 config/i386/cygwin.h:74 -msgid "shared and mdll are not compatible" +#: config/darwin.h:277 +msgid "-bundle not allowed with -dynamiclib" msgstr "" -#: gcc.c:800 -msgid "GCC does not support -C or -CC without -E" +#: config/darwin.h:278 +msgid "-bundle_loader not allowed with -dynamiclib" msgstr "" -#: gcc.c:1013 -msgid "-E or -x required when input is from standard input" +#: config/darwin.h:279 +msgid "-client_name not allowed with -dynamiclib" msgstr "" -#: fortran/lang-specs.h:45 fortran/lang-specs.h:58 -msgid "gfortran does not support -E without -cpp" +#: config/darwin.h:284 +msgid "-force_flat_namespace not allowed with -dynamiclib" msgstr "" -#: config/bfin/elf.h:31 -msgid "no processor type specified for linking" +#: config/darwin.h:286 +msgid "-keep_private_externs not allowed with -dynamiclib" msgstr "" -#: config/vxworks.h:71 -msgid "-Xbind-now and -Xbind-lazy are incompatible" +#: config/darwin.h:287 +msgid "-private_bundle not allowed with -dynamiclib" msgstr "" #: config/vax/netbsd-elf.h:41 msgid "the -shared option is not currently supported for VAX ELF" msgstr "" -#: config/i386/cygwin.h:28 -msgid "mno-cygwin and mno-win32 are not compatible" -msgstr "" - -#: config/i386/nwld.h:34 -msgid "Static linking is not supported.\n" -msgstr "" - -#: config/darwin.h:269 -msgid "-current_version only allowed with -dynamiclib" -msgstr "" - -#: config/darwin.h:271 -msgid "-install_name only allowed with -dynamiclib" -msgstr "" - -#: config/darwin.h:276 -msgid "-bundle not allowed with -dynamiclib" +#: config/vax/vax.h:50 config/vax/vax.h:51 +msgid "profiling not supported with -mg\n" msgstr "" -#: config/darwin.h:277 -msgid "-bundle_loader not allowed with -dynamiclib" +#: config/bfin/elf.h:31 +msgid "no processor type specified for linking" msgstr "" -#: config/darwin.h:278 -msgid "-client_name not allowed with -dynamiclib" +#: gcc.c:800 +msgid "GCC does not support -C or -CC without -E" msgstr "" -#: config/darwin.h:283 -msgid "-force_flat_namespace not allowed with -dynamiclib" +#: gcc.c:828 java/jvspec.c:80 +msgid "-pg and -fomit-frame-pointer are incompatible" msgstr "" -#: config/darwin.h:285 -msgid "-keep_private_externs not allowed with -dynamiclib" +#: gcc.c:1013 +msgid "-E or -x required when input is from standard input" msgstr "" -#: config/darwin.h:286 -msgid "-private_bundle not allowed with -dynamiclib" +#: config/i386/cygwin.h:28 +msgid "mno-cygwin and mno-win32 are not compatible" msgstr "" -#: config/mcore/mcore.h:56 -msgid "the m210 does not have little endian support" +#: config/i386/cygwin.h:91 config/i386/mingw32.h:85 +msgid "shared and mdll are not compatible" msgstr "" #: java/lang-specs.h:33 @@ -11677,10 +11421,20 @@ msgstr "" msgid "-femit-class-file should used along with -fsyntax-only" msgstr "" +#: config/mcore/mcore.h:54 +msgid "the m210 does not have little endian support" +msgstr "" + #: config/sh/sh.h:461 msgid "SH2a does not support little-endian" msgstr "" +#: config/rs6000/sysv4.h:902 config/rs6000/sysv4.h:904 config/linux.h:106 +#: config/linux.h:108 config/alpha/linux-elf.h:33 config/alpha/linux-elf.h:35 +#: config/rs6000/linux64.h:345 config/rs6000/linux64.h:347 +msgid "-mglibc and -muclibc used together" +msgstr "" + #: config/arm/arm.h:148 msgid "-msoft-float and -mhard_float may not be used together" msgstr "" @@ -11693,8 +11447,18 @@ msgstr "" msgid "Do not specify both -march=... and -mcpu=..." msgstr "" -#: config/vax/vax.h:49 config/vax/vax.h:50 -msgid "profiling not supported with -mg\n" +#: config/lynx.h:70 +msgid "cannot use mthreads and mlegacy-threads together" +msgstr "" + +#: config/lynx.h:95 +msgid "cannot use mshared and static together" +msgstr "" + +#: config/sparc/linux64.h:165 config/sparc/linux64.h:176 +#: config/sparc/netbsd-elf.h:125 config/sparc/netbsd-elf.h:144 +#: config/sparc/sol2-bi.h:217 config/sparc/sol2-bi.h:227 +msgid "may not use both -m32 and -m64" msgstr "" #: config/s390/tpf.h:119 @@ -11705,8 +11469,21 @@ msgstr "" msgid " conflicting code gen style switches are used" msgstr "" -#: java/lang.opt:65 -msgid "Warn if a deprecated compiler feature, class, method, or field is used" +#: config/mips/mips.h:1182 config/arc/arc.h:61 +msgid "may not use both -EB and -EL" +msgstr "" + +#: config/mips/r3900.h:34 +msgid "-mhard-float not supported" +msgstr "" + +#: config/mips/r3900.h:36 +msgid "-msingle-float and -msoft-float cannot both be specified" +msgstr "" + +#: config/sparc/sol2-bi.h:189 config/sparc/sol2-bi.h:194 +#: config/sparc/sol2-gld-bi.h:17 config/sparc/sol2-gld-bi.h:22 +msgid "does not support multilib" msgstr "" #: java/lang.opt:69 @@ -11819,10 +11596,6 @@ msgstr "" msgid "Specify options to GNAT" msgstr "" -#: fortran/lang.opt:53 -msgid "Add a directory for INCLUDE and MODULE searching" -msgstr "" - #: fortran/lang.opt:57 msgid "Put MODULE files in 'directory'" msgstr "" @@ -11847,10 +11620,6 @@ msgstr "" msgid "Warn about truncated character expressions" msgstr "" -#: fortran/lang.opt:93 -msgid "Warn about implicit conversion" -msgstr "" - #: fortran/lang.opt:97 msgid "Warn about calls with implicit interface" msgstr "" @@ -11887,10 +11656,6 @@ msgstr "" msgid "Disable preprocessing" msgstr "" -#: fortran/lang.opt:137 -msgid "Dump details about macro names and definitions during preprocessing" -msgstr "" - #: fortran/lang.opt:141 msgid "Enable alignment of COMMON blocks" msgstr "" @@ -12072,18 +11837,10 @@ msgstr "" msgid "Set default accessibility of module entities to PRIVATE." msgstr "" -#: fortran/lang.opt:313 -msgid "Enable OpenMP (also sets frecursive)" -msgstr "" - #: fortran/lang.opt:317 msgid "Try to lay out derived types as compactly as possible" msgstr "" -#: fortran/lang.opt:321 -msgid "Treat the input file as preprocessed" -msgstr "" - #: fortran/lang.opt:325 msgid "Enable range checking during compilation" msgstr "" @@ -12108,7 +11865,7 @@ msgstr "" msgid "Append a second underscore if the name already contains an underscore" msgstr "" -#: fortran/lang.opt:349 c.opt:729 +#: fortran/lang.opt:349 c.opt:737 msgid "Use the narrowest integer type possible for enumeration types" msgstr "" @@ -12120,27 +11877,27 @@ msgstr "" msgid "Append underscores to externally visible names" msgstr "" -#: fortran/lang.opt:393 +#: fortran/lang.opt:397 msgid "Statically link the GNU Fortran helper library (libgfortran)" msgstr "" -#: fortran/lang.opt:397 +#: fortran/lang.opt:401 msgid "Conform to the ISO Fortran 2003 standard" msgstr "" -#: fortran/lang.opt:401 +#: fortran/lang.opt:405 msgid "Conform to the ISO Fortran 2008 standard" msgstr "" -#: fortran/lang.opt:405 +#: fortran/lang.opt:409 msgid "Conform to the ISO Fortran 95 standard" msgstr "" -#: fortran/lang.opt:409 +#: fortran/lang.opt:413 msgid "Conform to nothing in particular" msgstr "" -#: fortran/lang.opt:413 +#: fortran/lang.opt:417 msgid "Accept extensions to support legacy code" msgstr "" @@ -12507,7 +12264,7 @@ msgid "" msgstr "" #: config/s390/s390.opt:87 config/ia64/ia64.opt:97 config/sparc/sparc.opt:95 -#: config/i386/i386.opt:229 config/rs6000/rs6000.opt:226 config/spu/spu.opt:84 +#: config/i386/i386.opt:229 config/rs6000/rs6000.opt:230 config/spu/spu.opt:84 msgid "Schedule code for given CPU" msgstr "" @@ -12793,7 +12550,7 @@ msgstr "" msgid "Optimize tail call instructions in assembler and linker" msgstr "" -#: config/sparc/sparc.opt:91 config/rs6000/rs6000.opt:222 +#: config/sparc/sparc.opt:91 config/rs6000/rs6000.opt:226 msgid "Use features of and schedule code for given CPU" msgstr "" @@ -13174,123 +12931,127 @@ msgstr "" msgid "Use direct references against %gs when accessing tls data" msgstr "" -#: config/i386/i386.opt:233 -msgid "Vector library ABI to use" +#: config/i386/i386.opt:233 config/mips/mips.opt:23 +msgid "Generate code that conforms to the given ABI" msgstr "" #: config/i386/i386.opt:237 -msgid "Generate reciprocals instead of divss and sqrtss." +msgid "Vector library ABI to use" msgstr "" #: config/i386/i386.opt:241 +msgid "Generate reciprocals instead of divss and sqrtss." +msgstr "" + +#: config/i386/i386.opt:245 msgid "Generate cld instruction in the function prologue." msgstr "" -#: config/i386/i386.opt:248 +#: config/i386/i386.opt:252 msgid "" "Enable automatic generation of fused floating point multiply-add instructions" msgstr "" -#: config/i386/i386.opt:256 +#: config/i386/i386.opt:260 msgid "Generate 32bit i386 code" msgstr "" -#: config/i386/i386.opt:260 +#: config/i386/i386.opt:264 msgid "Generate 64bit x86-64 code" msgstr "" -#: config/i386/i386.opt:264 +#: config/i386/i386.opt:268 msgid "Support MMX built-in functions" msgstr "" -#: config/i386/i386.opt:268 +#: config/i386/i386.opt:272 msgid "Support 3DNow! built-in functions" msgstr "" -#: config/i386/i386.opt:272 +#: config/i386/i386.opt:276 msgid "Support Athlon 3Dnow! built-in functions" msgstr "" -#: config/i386/i386.opt:276 +#: config/i386/i386.opt:280 msgid "Support MMX and SSE built-in functions and code generation" msgstr "" -#: config/i386/i386.opt:280 +#: config/i386/i386.opt:284 msgid "Support MMX, SSE and SSE2 built-in functions and code generation" msgstr "" -#: config/i386/i386.opt:284 +#: config/i386/i386.opt:288 msgid "Support MMX, SSE, SSE2 and SSE3 built-in functions and code generation" msgstr "" -#: config/i386/i386.opt:288 +#: config/i386/i386.opt:292 msgid "" "Support MMX, SSE, SSE2, SSE3 and SSSE3 built-in functions and code generation" msgstr "" -#: config/i386/i386.opt:292 +#: config/i386/i386.opt:296 msgid "" "Support MMX, SSE, SSE2, SSE3, SSSE3 and SSE4.1 built-in functions and code " "generation" msgstr "" -#: config/i386/i386.opt:296 config/i386/i386.opt:300 +#: config/i386/i386.opt:300 config/i386/i386.opt:304 msgid "" "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1 and SSE4.2 built-in functions " "and code generation" msgstr "" -#: config/i386/i386.opt:304 +#: config/i386/i386.opt:308 msgid "Do not support SSE4.1 and SSE4.2 built-in functions and code generation" msgstr "" -#: config/i386/i386.opt:308 +#: config/i386/i386.opt:312 msgid "" "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2 and AVX built-in " "functions and code generation" msgstr "" -#: config/i386/i386.opt:312 +#: config/i386/i386.opt:316 msgid "" "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX and FMA built-in " "functions and code generation" msgstr "" -#: config/i386/i386.opt:316 +#: config/i386/i386.opt:320 msgid "" "Support MMX, SSE, SSE2, SSE3 and SSE4A built-in functions and code generation" msgstr "" -#: config/i386/i386.opt:320 +#: config/i386/i386.opt:324 msgid "Support SSE5 built-in functions and code generation" msgstr "" -#: config/i386/i386.opt:324 +#: config/i386/i386.opt:328 msgid "" "Support code generation of Advanced Bit Manipulation (ABM) instructions." msgstr "" -#: config/i386/i386.opt:328 +#: config/i386/i386.opt:332 msgid "Support code generation of popcnt instruction." msgstr "" -#: config/i386/i386.opt:332 +#: config/i386/i386.opt:336 msgid "Support code generation of cmpxchg16b instruction." msgstr "" -#: config/i386/i386.opt:336 +#: config/i386/i386.opt:340 msgid "Support code generation of sahf instruction in 64bit x86-64 code." msgstr "" -#: config/i386/i386.opt:340 +#: config/i386/i386.opt:344 msgid "Support AES built-in functions and code generation" msgstr "" -#: config/i386/i386.opt:344 +#: config/i386/i386.opt:348 msgid "Support PCLMUL built-in functions and code generation" msgstr "" -#: config/i386/i386.opt:348 +#: config/i386/i386.opt:352 msgid "Encode SSE instructions with VEX prefix" msgstr "" @@ -13322,11 +13083,7 @@ msgstr "" msgid "Create GUI application" msgstr "" -#: config/rs6000/aix41.opt:24 config/rs6000/aix64.opt:32 -msgid "Support message passing with the Parallel Environment" -msgstr "" - -#: config/rs6000/aix.opt:24 config/rs6000/rs6000.opt:147 +#: config/rs6000/aix.opt:24 config/rs6000/rs6000.opt:151 msgid "Conform more closely to IBM XLC semantics" msgstr "" @@ -13439,150 +13196,154 @@ msgid "Generate load/store with update instructions" msgstr "" #: config/rs6000/rs6000.opt:124 -msgid "Do not generate fused multiply/add instructions" +msgid "Avoid generation of indexed load/store instructions when possible" msgstr "" #: config/rs6000/rs6000.opt:128 -msgid "Generate fused multiply/add instructions" +msgid "Do not generate fused multiply/add instructions" msgstr "" #: config/rs6000/rs6000.opt:132 +msgid "Generate fused multiply/add instructions" +msgstr "" + +#: config/rs6000/rs6000.opt:136 msgid "Schedule the start and end of the procedure" msgstr "" -#: config/rs6000/rs6000.opt:139 +#: config/rs6000/rs6000.opt:143 msgid "Return all structures in memory (AIX default)" msgstr "" -#: config/rs6000/rs6000.opt:143 +#: config/rs6000/rs6000.opt:147 msgid "Return small structures in registers (SVR4 default)" msgstr "" -#: config/rs6000/rs6000.opt:151 +#: config/rs6000/rs6000.opt:155 msgid "Generate software reciprocal sqrt for better throughput" msgstr "" -#: config/rs6000/rs6000.opt:155 +#: config/rs6000/rs6000.opt:159 msgid "Do not place floating point constants in TOC" msgstr "" -#: config/rs6000/rs6000.opt:159 +#: config/rs6000/rs6000.opt:163 msgid "Place floating point constants in TOC" msgstr "" -#: config/rs6000/rs6000.opt:163 +#: config/rs6000/rs6000.opt:167 msgid "Do not place symbol+offset constants in TOC" msgstr "" -#: config/rs6000/rs6000.opt:167 +#: config/rs6000/rs6000.opt:171 msgid "Place symbol+offset constants in TOC" msgstr "" -#: config/rs6000/rs6000.opt:178 +#: config/rs6000/rs6000.opt:182 msgid "Use only one TOC entry per procedure" msgstr "" -#: config/rs6000/rs6000.opt:182 +#: config/rs6000/rs6000.opt:186 msgid "Put everything in the regular TOC" msgstr "" -#: config/rs6000/rs6000.opt:186 +#: config/rs6000/rs6000.opt:190 msgid "Generate VRSAVE instructions when generating AltiVec code" msgstr "" -#: config/rs6000/rs6000.opt:190 +#: config/rs6000/rs6000.opt:194 msgid "Deprecated option. Use -mvrsave/-mno-vrsave instead" msgstr "" -#: config/rs6000/rs6000.opt:194 +#: config/rs6000/rs6000.opt:198 msgid "Generate isel instructions" msgstr "" -#: config/rs6000/rs6000.opt:198 +#: config/rs6000/rs6000.opt:202 msgid "Deprecated option. Use -misel/-mno-isel instead" msgstr "" -#: config/rs6000/rs6000.opt:202 +#: config/rs6000/rs6000.opt:206 msgid "Generate SPE SIMD instructions on E500" msgstr "" -#: config/rs6000/rs6000.opt:206 +#: config/rs6000/rs6000.opt:210 msgid "Generate PPC750CL paired-single instructions" msgstr "" -#: config/rs6000/rs6000.opt:210 +#: config/rs6000/rs6000.opt:214 msgid "Deprecated option. Use -mspe/-mno-spe instead" msgstr "" -#: config/rs6000/rs6000.opt:214 +#: config/rs6000/rs6000.opt:218 msgid "Enable debug output" msgstr "" -#: config/rs6000/rs6000.opt:218 +#: config/rs6000/rs6000.opt:222 msgid "Specify ABI to use" msgstr "" -#: config/rs6000/rs6000.opt:230 +#: config/rs6000/rs6000.opt:234 msgid "Select full, part, or no traceback table" msgstr "" -#: config/rs6000/rs6000.opt:234 +#: config/rs6000/rs6000.opt:238 msgid "Avoid all range limits on call instructions" msgstr "" -#: config/rs6000/rs6000.opt:238 +#: config/rs6000/rs6000.opt:242 msgid "Generate Cell microcode" msgstr "" -#: config/rs6000/rs6000.opt:242 +#: config/rs6000/rs6000.opt:246 msgid "Warn when a Cell microcoded instruction is emitted" msgstr "" -#: config/rs6000/rs6000.opt:246 +#: config/rs6000/rs6000.opt:250 msgid "Warn about deprecated 'vector long ...' AltiVec type usage" msgstr "" -#: config/rs6000/rs6000.opt:250 +#: config/rs6000/rs6000.opt:254 msgid "Select GPR floating point method" msgstr "" -#: config/rs6000/rs6000.opt:254 +#: config/rs6000/rs6000.opt:258 msgid "Specify size of long double (64 or 128 bits)" msgstr "" -#: config/rs6000/rs6000.opt:258 +#: config/rs6000/rs6000.opt:262 msgid "Determine which dependences between insns are considered costly" msgstr "" -#: config/rs6000/rs6000.opt:262 +#: config/rs6000/rs6000.opt:266 msgid "Specify which post scheduling nop insertion scheme to apply" msgstr "" -#: config/rs6000/rs6000.opt:266 +#: config/rs6000/rs6000.opt:270 msgid "Specify alignment of structure fields default/natural" msgstr "" -#: config/rs6000/rs6000.opt:270 +#: config/rs6000/rs6000.opt:274 msgid "Specify scheduling priority for dispatch slot restricted insns" msgstr "" -#: config/rs6000/rs6000.opt:274 +#: config/rs6000/rs6000.opt:278 msgid "Single-precision floating point unit" msgstr "" -#: config/rs6000/rs6000.opt:278 +#: config/rs6000/rs6000.opt:282 msgid "Double-precision floating point unit" msgstr "" -#: config/rs6000/rs6000.opt:282 +#: config/rs6000/rs6000.opt:286 msgid "Floating point unit does not support divide & sqrt" msgstr "" -#: config/rs6000/rs6000.opt:286 +#: config/rs6000/rs6000.opt:290 msgid "Specify FP (sp, dp, sp-lite, dp-lite) (implies -mxilinx-fpu)" msgstr "" -#: config/rs6000/rs6000.opt:290 +#: config/rs6000/rs6000.opt:294 msgid "Specify Xilinx FPU." msgstr "" @@ -13594,6 +13355,10 @@ msgstr "" msgid "Compile for 32-bit pointers" msgstr "" +#: config/rs6000/aix64.opt:32 +msgid "Support message passing with the Parallel Environment" +msgstr "" + #: config/rs6000/linux64.opt:24 msgid "Call mcount for profiling before a function prologue" msgstr "" @@ -13739,50 +13504,48 @@ msgid "Generate code for the M*Core M340" msgstr "" #: config/mcore/mcore.opt:31 -msgid "Set maximum alignment to 4" -msgstr "" - -#: config/mcore/mcore.opt:35 msgid "Force functions to be aligned to a 4 byte boundary" msgstr "" -#: config/mcore/mcore.opt:39 -msgid "Set maximum alignment to 8" -msgstr "" - -#: config/mcore/mcore.opt:43 config/score/score.opt:23 +#: config/mcore/mcore.opt:35 config/score/score.opt:23 msgid "Generate big-endian code" msgstr "" -#: config/mcore/mcore.opt:47 +#: config/mcore/mcore.opt:39 msgid "Emit call graph information" msgstr "" -#: config/mcore/mcore.opt:51 +#: config/mcore/mcore.opt:43 msgid "Use the divide instruction" msgstr "" -#: config/mcore/mcore.opt:55 +#: config/mcore/mcore.opt:47 msgid "Inline constants if it can be done in 2 insns or less" msgstr "" -#: config/mcore/mcore.opt:59 config/score/score.opt:27 +#: config/mcore/mcore.opt:51 config/score/score.opt:27 msgid "Generate little-endian code" msgstr "" -#: config/mcore/mcore.opt:67 +#: config/mcore/mcore.opt:56 config/fr30/fr30.opt:27 +msgid "" +"Assume that run-time support has been provided, so omit -lsim from the " +"linker command line" +msgstr "" + +#: config/mcore/mcore.opt:60 msgid "Use arbitrary sized immediates in bit operations" msgstr "" -#: config/mcore/mcore.opt:71 +#: config/mcore/mcore.opt:64 msgid "Prefer word accesses over byte accesses" msgstr "" -#: config/mcore/mcore.opt:75 +#: config/mcore/mcore.opt:68 msgid "Set the maximum amount for a single stack increment operation" msgstr "" -#: config/mcore/mcore.opt:79 +#: config/mcore/mcore.opt:72 msgid "Always treat bitfields as int-sized" msgstr "" @@ -14468,10 +14231,6 @@ msgstr "" msgid "Provide libraries for the simulator" msgstr "" -#: config/mips/mips.opt:23 -msgid "Generate code that conforms to the given ABI" -msgstr "" - #: config/mips/mips.opt:27 msgid "Generate code that can be used in SVR4-style dynamic objects" msgstr "" @@ -15142,29 +14901,36 @@ msgstr "" msgid "Build for SDRAM" msgstr "" +#: config/bfin/bfin.opt:101 +msgid "Assume ICPLBs are enabled at runtime." +msgstr "" + #: config/picochip/picochip.opt:23 -msgid "Specify which type of AE to target. This option sets the mul-type" +msgid "" +"Specify which type of AE to target. This option sets the mul-type and byte-" +"access." msgstr "" -#: config/picochip/picochip.opt:28 +#: config/picochip/picochip.opt:27 msgid "Specify which type of multiplication to use. Can be mem, mac or none." msgstr "" -#: config/picochip/picochip.opt:32 +#: config/picochip/picochip.opt:31 msgid "" "Specify whether the byte access instructions should be used. Enabled by " "default." msgstr "" -#: config/picochip/picochip.opt:36 +#: config/picochip/picochip.opt:35 msgid "Enable debug output to be generated." msgstr "" -#: config/picochip/picochip.opt:40 -msgid "Allow a symbol value to be used as an immediate value in an" +#: config/picochip/picochip.opt:39 +msgid "" +"Allow a symbol value to be used as an immediate value in an instruction." msgstr "" -#: config/picochip/picochip.opt:45 +#: config/picochip/picochip.opt:43 msgid "Generate warnings when inefficient code is known to be generated." msgstr "" @@ -15252,877 +15018,877 @@ msgstr "" msgid "Use GNU libc instead of uClibc" msgstr "" -#: c.opt:41 +#: c.opt:42 msgid "" "Assert the <answer> to <question>. Putting '-' before <question> disables " "the <answer> to <question>" msgstr "" -#: c.opt:45 +#: c.opt:46 msgid "Do not discard comments" msgstr "" -#: c.opt:49 +#: c.opt:50 msgid "Do not discard comments in macro expansions" msgstr "" -#: c.opt:53 +#: c.opt:54 msgid "" "Define a <macro> with <val> as its value. If just <macro> is given, <val> " "is taken to be 1" msgstr "" -#: c.opt:60 +#: c.opt:61 msgid "Add <dir> to the end of the main framework include path" msgstr "" -#: c.opt:64 +#: c.opt:65 msgid "Print the name of header files as they are used" msgstr "" -#: c.opt:68 c.opt:874 +#: c.opt:69 c.opt:882 msgid "Add <dir> to the end of the main include path" msgstr "" -#: c.opt:72 +#: c.opt:73 msgid "Generate make dependencies" msgstr "" -#: c.opt:76 +#: c.opt:77 msgid "Generate make dependencies and compile" msgstr "" -#: c.opt:80 +#: c.opt:81 msgid "Write dependency output to the given file" msgstr "" -#: c.opt:84 +#: c.opt:85 msgid "Treat missing header files as generated files" msgstr "" -#: c.opt:88 +#: c.opt:89 msgid "Like -M but ignore system header files" msgstr "" -#: c.opt:92 +#: c.opt:93 msgid "Like -MD but ignore system header files" msgstr "" -#: c.opt:96 +#: c.opt:97 msgid "Generate phony targets for all headers" msgstr "" -#: c.opt:100 +#: c.opt:101 msgid "Add a MAKE-quoted target" msgstr "" -#: c.opt:104 +#: c.opt:105 msgid "Add an unquoted target" msgstr "" -#: c.opt:108 +#: c.opt:109 msgid "Do not generate #line directives" msgstr "" -#: c.opt:112 +#: c.opt:113 msgid "Undefine <macro>" msgstr "" -#: c.opt:116 +#: c.opt:117 msgid "" "Warn about things that will change when compiling with an ABI-compliant " "compiler" msgstr "" -#: c.opt:120 +#: c.opt:124 msgid "Warn about suspicious uses of memory addresses" msgstr "" -#: c.opt:124 +#: c.opt:128 msgid "Enable most warning messages" msgstr "" -#: c.opt:128 +#: c.opt:132 msgid "" "Warn whenever an Objective-C assignment is being intercepted by the garbage " "collector" msgstr "" -#: c.opt:132 +#: c.opt:136 msgid "Warn about casting functions to incompatible types" msgstr "" -#: c.opt:136 +#: c.opt:140 msgid "Warn when a built-in preprocessor macro is undefined or redefined" msgstr "" -#: c.opt:140 +#: c.opt:144 msgid "Warn about C constructs that are not in the common subset of C and C++" msgstr "" -#: c.opt:144 +#: c.opt:148 msgid "" "Warn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO " "C++ 200x" msgstr "" -#: c.opt:148 +#: c.opt:152 msgid "Warn about casts which discard qualifiers" msgstr "" -#: c.opt:152 +#: c.opt:156 msgid "Warn about subscripts whose type is \"char\"" msgstr "" -#: c.opt:156 +#: c.opt:160 msgid "Warn about variables that might be changed by \"longjmp\" or \"vfork\"" msgstr "" -#: c.opt:160 +#: c.opt:164 msgid "" "Warn about possibly nested block comments, and C++ comments spanning more " "than one physical line" msgstr "" -#: c.opt:164 +#: c.opt:168 msgid "Synonym for -Wcomment" msgstr "" -#: c.opt:168 +#: c.opt:172 msgid "Warn for implicit type conversions that may change a value" msgstr "" -#: c.opt:172 +#: c.opt:176 msgid "Warn for implicit type conversions between signed and unsigned integers" msgstr "" -#: c.opt:176 +#: c.opt:180 msgid "Warn when all constructors and destructors are private" msgstr "" -#: c.opt:180 +#: c.opt:184 msgid "Warn when a declaration is found after a statement" msgstr "" -#: c.opt:184 -msgid "Warn about deprecated compiler features" +#: c.opt:188 +msgid "Warn if a deprecated compiler feature, class, method, or field is used" msgstr "" -#: c.opt:188 +#: c.opt:192 msgid "Warn about compile-time integer division by zero" msgstr "" -#: c.opt:192 +#: c.opt:196 msgid "Warn about violations of Effective C++ style rules" msgstr "" -#: c.opt:196 +#: c.opt:200 msgid "Warn about an empty body in an if or else statement" msgstr "" -#: c.opt:200 +#: c.opt:204 msgid "Warn about stray tokens after #elif and #endif" msgstr "" -#: c.opt:204 +#: c.opt:208 msgid "Warn about comparison of different enum types" msgstr "" -#: c.opt:212 +#: c.opt:216 msgid "" "This switch is deprecated; use -Werror=implicit-function-declaration instead" msgstr "" -#: c.opt:216 +#: c.opt:220 msgid "Warn if testing floating point numbers for equality" msgstr "" -#: c.opt:220 +#: c.opt:224 msgid "Warn about printf/scanf/strftime/strfmon format string anomalies" msgstr "" -#: c.opt:224 +#: c.opt:228 msgid "Warn if passing too many arguments to a function for its format string" msgstr "" -#: c.opt:228 +#: c.opt:232 msgid "Warn about format strings that are not literals" msgstr "" -#: c.opt:232 +#: c.opt:236 msgid "Warn about format strings that contain NUL bytes" msgstr "" -#: c.opt:236 +#: c.opt:240 msgid "Warn about possible security problems with format functions" msgstr "" -#: c.opt:240 +#: c.opt:244 msgid "Warn about strftime formats yielding 2-digit years" msgstr "" -#: c.opt:244 +#: c.opt:248 msgid "Warn about zero-length formats" msgstr "" -#: c.opt:251 +#: c.opt:255 msgid "Warn whenever type qualifiers are ignored." msgstr "" -#: c.opt:255 +#: c.opt:259 msgid "Warn about variables which are initialized to themselves" msgstr "" -#: c.opt:262 +#: c.opt:266 msgid "Warn about implicit function declarations" msgstr "" -#: c.opt:266 +#: c.opt:270 msgid "Warn when a declaration does not specify a type" msgstr "" -#: c.opt:273 +#: c.opt:277 msgid "" "Warn when there is a cast to a pointer from an integer of a different size" msgstr "" -#: c.opt:277 +#: c.opt:281 msgid "Warn about invalid uses of the \"offsetof\" macro" msgstr "" -#: c.opt:281 +#: c.opt:285 msgid "Warn about PCH files that are found but not used" msgstr "" -#: c.opt:285 +#: c.opt:289 msgid "Do not warn about using \"long long\" when -pedantic" msgstr "" -#: c.opt:289 +#: c.opt:293 msgid "Warn about suspicious declarations of \"main\"" msgstr "" -#: c.opt:293 +#: c.opt:297 msgid "Warn about possibly missing braces around initializers" msgstr "" -#: c.opt:297 +#: c.opt:301 msgid "Warn about global functions without previous declarations" msgstr "" -#: c.opt:301 +#: c.opt:305 msgid "Warn about missing fields in struct initializers" msgstr "" -#: c.opt:305 +#: c.opt:309 msgid "Warn about functions which might be candidates for format attributes" msgstr "" -#: c.opt:309 +#: c.opt:313 msgid "Warn about user-specified include directories that do not exist" msgstr "" -#: c.opt:313 +#: c.opt:317 msgid "" "Warn about function parameters declared without a type specifier in K&R-" "style functions" msgstr "" -#: c.opt:317 +#: c.opt:321 msgid "Warn about global functions without prototypes" msgstr "" -#: c.opt:321 +#: c.opt:325 msgid "Warn about use of multi-character character constants" msgstr "" -#: c.opt:325 +#: c.opt:329 msgid "Warn about \"extern\" declarations not at file scope" msgstr "" -#: c.opt:329 +#: c.opt:333 msgid "" "Warn when non-templatized friend functions are declared within a template" msgstr "" -#: c.opt:333 +#: c.opt:337 msgid "Warn about non-virtual destructors" msgstr "" -#: c.opt:337 +#: c.opt:341 msgid "" "Warn about NULL being passed to argument slots marked as requiring non-NULL" msgstr "" -#: c.opt:341 +#: c.opt:345 msgid "Warn about non-normalised Unicode strings" msgstr "" -#: c.opt:345 +#: c.opt:349 msgid "Warn if a C-style cast is used in a program" msgstr "" -#: c.opt:349 +#: c.opt:353 msgid "Warn for obsolescent usage in a declaration" msgstr "" -#: c.opt:353 +#: c.opt:357 msgid "Warn if an old-style parameter definition is used" msgstr "" -#: c.opt:357 +#: c.opt:361 msgid "" "Warn if a string is longer than the maximum portable length specified by the " "standard" msgstr "" -#: c.opt:361 +#: c.opt:365 msgid "Warn about overloaded virtual function names" msgstr "" -#: c.opt:365 +#: c.opt:369 msgid "Warn about overriding initializers without side effects" msgstr "" -#: c.opt:369 +#: c.opt:373 +msgid "Warn about packed bit-fields whose offset changed in GCC 4.4" +msgstr "" + +#: c.opt:377 msgid "Warn about possibly missing parentheses" msgstr "" -#: c.opt:373 +#: c.opt:381 msgid "Warn when converting the type of pointers to member functions" msgstr "" -#: c.opt:377 +#: c.opt:385 msgid "Warn about function pointer arithmetic" msgstr "" -#: c.opt:381 +#: c.opt:389 msgid "Warn when a pointer is cast to an integer of a different size" msgstr "" -#: c.opt:385 +#: c.opt:393 msgid "Warn about misuses of pragmas" msgstr "" -#: c.opt:389 +#: c.opt:397 msgid "Warn if inherited methods are unimplemented" msgstr "" -#: c.opt:393 +#: c.opt:401 msgid "Warn about multiple declarations of the same object" msgstr "" -#: c.opt:397 +#: c.opt:405 msgid "Warn when the compiler reorders code" msgstr "" -#: c.opt:401 +#: c.opt:409 msgid "" "Warn whenever a function's return type defaults to \"int\" (C), or about " "inconsistent return types (C++)" msgstr "" -#: c.opt:405 +#: c.opt:413 msgid "Warn if a selector has multiple methods" msgstr "" -#: c.opt:409 +#: c.opt:417 msgid "Warn about possible violations of sequence point rules" msgstr "" -#: c.opt:413 +#: c.opt:421 msgid "Warn about signed-unsigned comparisons" msgstr "" -#: c.opt:417 +#: c.opt:425 msgid "Warn when overload promotes from unsigned to signed" msgstr "" -#: c.opt:421 +#: c.opt:429 msgid "Warn about uncasted NULL used as sentinel" msgstr "" -#: c.opt:425 +#: c.opt:433 msgid "Warn about unprototyped function declarations" msgstr "" -#: c.opt:429 +#: c.opt:437 msgid "Warn if type signatures of candidate methods do not match exactly" msgstr "" -#: c.opt:433 +#: c.opt:441 msgid "" "Warn when __sync_fetch_and_nand and __sync_nand_and_fetch built-in functions " "are used" msgstr "" -#: c.opt:437 +#: c.opt:445 msgid "Deprecated. This switch has no effect" msgstr "" -#: c.opt:441 common.opt:198 -msgid "Do not suppress warnings from system headers" -msgstr "" - -#: c.opt:445 +#: c.opt:453 msgid "Warn about features not present in traditional C" msgstr "" -#: c.opt:449 +#: c.opt:457 msgid "" "Warn of prototypes causing type conversions different from what would happen " "in the absence of prototype" msgstr "" -#: c.opt:453 +#: c.opt:461 msgid "" "Warn if trigraphs are encountered that might affect the meaning of the " "program" msgstr "" -#: c.opt:457 +#: c.opt:465 msgid "Warn about @selector()s without previously declared methods" msgstr "" -#: c.opt:461 +#: c.opt:469 msgid "Warn if an undefined macro is used in an #if directive" msgstr "" -#: c.opt:465 +#: c.opt:473 msgid "Warn about unrecognized pragmas" msgstr "" -#: c.opt:469 +#: c.opt:477 msgid "Warn about macros defined in the main file that are not used" msgstr "" -#: c.opt:473 +#: c.opt:481 msgid "Do not warn about using variadic macros when -pedantic" msgstr "" -#: c.opt:477 +#: c.opt:485 msgid "Warn if a variable length array is used" msgstr "" -#: c.opt:481 +#: c.opt:489 msgid "Warn when a register variable is declared volatile" msgstr "" -#: c.opt:485 +#: c.opt:493 msgid "" "In C++, nonzero means warn about deprecated conversion from string literals " "to `char *'. In C, similar warning, except that the conversion is of course " "not deprecated by the ISO C standard." msgstr "" -#: c.opt:489 +#: c.opt:497 msgid "Warn when a pointer differs in signedness in an assignment" msgstr "" -#: c.opt:493 +#: c.opt:501 msgid "A synonym for -std=c89 (for C) or -std=c++98 (for C++)" msgstr "" -#: c.opt:501 +#: c.opt:509 msgid "Enforce class member access control semantics" msgstr "" -#: c.opt:508 +#: c.opt:516 msgid "Change when template instances are emitted" msgstr "" -#: c.opt:512 +#: c.opt:520 msgid "Recognize the \"asm\" keyword" msgstr "" -#: c.opt:516 +#: c.opt:524 msgid "Recognize built-in functions" msgstr "" -#: c.opt:523 +#: c.opt:531 msgid "Check the return value of new" msgstr "" -#: c.opt:527 +#: c.opt:535 msgid "Allow the arguments of the '?' operator to have different types" msgstr "" -#: c.opt:531 +#: c.opt:539 msgid "Reduce the size of object files" msgstr "" -#: c.opt:535 +#: c.opt:543 msgid "Use class <name> for constant strings" msgstr "" -#: c.opt:539 +#: c.opt:547 msgid "Inline member functions by default" msgstr "" -#: c.opt:543 +#: c.opt:551 msgid "Preprocess directives only." msgstr "" -#: c.opt:547 +#: c.opt:555 msgid "Permit '$' as an identifier character" msgstr "" -#: c.opt:554 +#: c.opt:562 msgid "Generate code to check exception specifications" msgstr "" -#: c.opt:561 +#: c.opt:569 msgid "Convert all strings and character constants to character set <cset>" msgstr "" -#: c.opt:565 +#: c.opt:573 msgid "Permit universal character names (\\u and \\U) in identifiers" msgstr "" -#: c.opt:569 +#: c.opt:577 msgid "Specify the default character set for source files" msgstr "" -#: c.opt:577 +#: c.opt:585 msgid "Scope of for-init-statement variables is local to the loop" msgstr "" -#: c.opt:581 +#: c.opt:589 msgid "Do not assume that standard C libraries and \"main\" exist" msgstr "" -#: c.opt:585 +#: c.opt:593 msgid "Recognize GNU-defined keywords" msgstr "" -#: c.opt:589 +#: c.opt:597 msgid "Generate code for GNU runtime environment" msgstr "" -#: c.opt:593 +#: c.opt:601 msgid "Use traditional GNU semantics for inline functions" msgstr "" -#: c.opt:606 +#: c.opt:614 msgid "Assume normal C execution environment" msgstr "" -#: c.opt:610 +#: c.opt:618 msgid "Enable support for huge objects" msgstr "" -#: c.opt:614 +#: c.opt:622 msgid "Export functions even if they can be inlined" msgstr "" -#: c.opt:618 +#: c.opt:626 msgid "Emit implicit instantiations of inline templates" msgstr "" -#: c.opt:622 +#: c.opt:630 msgid "Emit implicit instantiations of templates" msgstr "" -#: c.opt:626 +#: c.opt:634 msgid "Inject friend functions into enclosing namespace" msgstr "" -#: c.opt:633 +#: c.opt:641 msgid "" "Allow implicit conversions between vectors with differing numbers of " "subparts and/or differing element types." msgstr "" -#: c.opt:637 +#: c.opt:645 msgid "Don't warn about uses of Microsoft extensions" msgstr "" -#: c.opt:647 +#: c.opt:655 msgid "Generate code for NeXT (Apple Mac OS X) runtime environment" msgstr "" -#: c.opt:651 +#: c.opt:659 msgid "Assume that receivers of Objective-C messages may be nil" msgstr "" -#: c.opt:663 +#: c.opt:671 msgid "" "Generate special Objective-C methods to initialize/destroy non-POD C++ " "ivars, if needed" msgstr "" -#: c.opt:667 +#: c.opt:675 msgid "Allow fast jumps to the message dispatcher" msgstr "" -#: c.opt:673 +#: c.opt:681 msgid "Enable Objective-C exception and synchronization syntax" msgstr "" -#: c.opt:677 +#: c.opt:685 msgid "Enable garbage collection (GC) in Objective-C/Objective-C++ programs" msgstr "" -#: c.opt:682 +#: c.opt:690 msgid "Enable Objective-C setjmp exception handling runtime" msgstr "" -#: c.opt:686 -msgid "Enable OpenMP" +#: c.opt:694 +msgid "Enable OpenMP (implies -frecursive in Fortran)" msgstr "" -#: c.opt:690 +#: c.opt:698 msgid "Recognize C++ keywords like \"compl\" and \"xor\"" msgstr "" -#: c.opt:694 +#: c.opt:702 msgid "Enable optional diagnostics" msgstr "" -#: c.opt:701 +#: c.opt:709 msgid "Look for and use PCH files even when preprocessing" msgstr "" -#: c.opt:705 +#: c.opt:713 msgid "Downgrade conformance errors to warnings" msgstr "" -#: c.opt:709 +#: c.opt:717 msgid "Treat the input file as already preprocessed" msgstr "" -#: c.opt:713 +#: c.opt:721 msgid "" "Used in Fix-and-Continue mode to indicate that object files may be swapped " "in at runtime" msgstr "" -#: c.opt:717 +#: c.opt:725 msgid "Enable automatic template instantiation" msgstr "" -#: c.opt:721 +#: c.opt:729 msgid "Generate run time type descriptor information" msgstr "" -#: c.opt:725 +#: c.opt:733 msgid "Use the same size for double as for float" msgstr "" -#: c.opt:733 +#: c.opt:741 msgid "Force the underlying type for \"wchar_t\" to be \"unsigned short\"" msgstr "" -#: c.opt:737 +#: c.opt:745 msgid "When \"signed\" or \"unsigned\" is not given make the bitfield signed" msgstr "" -#: c.opt:741 +#: c.opt:749 msgid "Make \"char\" signed by default" msgstr "" -#: c.opt:748 +#: c.opt:756 msgid "Display statistics accumulated during compilation" msgstr "" -#: c.opt:755 +#: c.opt:763 msgid "Distance between tab stops for column reporting" msgstr "" -#: c.opt:759 +#: c.opt:767 msgid "Specify maximum template instantiation depth" msgstr "" -#: c.opt:766 +#: c.opt:774 msgid "Do not generate thread-safe code for initializing local statics" msgstr "" -#: c.opt:770 +#: c.opt:778 msgid "When \"signed\" or \"unsigned\" is not given make the bitfield unsigned" msgstr "" -#: c.opt:774 +#: c.opt:782 msgid "Make \"char\" unsigned by default" msgstr "" -#: c.opt:778 +#: c.opt:786 msgid "Use __cxa_atexit to register destructors" msgstr "" -#: c.opt:782 +#: c.opt:790 msgid "Use __cxa_get_exception_ptr in exception handling" msgstr "" -#: c.opt:786 +#: c.opt:794 msgid "Marks all inlined methods as having hidden visibility" msgstr "" -#: c.opt:790 +#: c.opt:798 msgid "Changes visibility to match Microsoft Visual Studio by default" msgstr "" -#: c.opt:794 +#: c.opt:802 msgid "Discard unused virtual functions" msgstr "" -#: c.opt:798 +#: c.opt:806 msgid "Implement vtables using thunks" msgstr "" -#: c.opt:802 +#: c.opt:810 msgid "Emit common-like symbols as weak symbols" msgstr "" -#: c.opt:806 +#: c.opt:814 msgid "" "Convert all wide strings and character constants to character set <cset>" msgstr "" -#: c.opt:810 +#: c.opt:818 msgid "Generate a #line directive pointing at the current working directory" msgstr "" -#: c.opt:814 +#: c.opt:822 msgid "Emit cross referencing information" msgstr "" -#: c.opt:818 +#: c.opt:826 msgid "" "Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode" msgstr "" -#: c.opt:822 +#: c.opt:830 msgid "Dump declarations to a .decl file" msgstr "" -#: c.opt:826 +#: c.opt:834 msgid "Aggressive reduced debug info for structs" msgstr "" -#: c.opt:830 +#: c.opt:838 msgid "Conservative reduced debug info for structs" msgstr "" -#: c.opt:834 +#: c.opt:842 msgid "Detailed reduced debug info for structs" msgstr "" -#: c.opt:838 c.opt:870 +#: c.opt:846 c.opt:878 msgid "Add <dir> to the end of the system include path" msgstr "" -#: c.opt:842 +#: c.opt:850 msgid "Accept definition of macros in <file>" msgstr "" -#: c.opt:846 +#: c.opt:854 msgid "-imultilib <dir> Set <dir> to be the multilib include subdirectory" msgstr "" -#: c.opt:850 +#: c.opt:858 msgid "Include the contents of <file> before other files" msgstr "" -#: c.opt:854 +#: c.opt:862 msgid "Specify <path> as a prefix for next two options" msgstr "" -#: c.opt:858 +#: c.opt:866 msgid "Set <dir> to be the system root directory" msgstr "" -#: c.opt:862 +#: c.opt:870 msgid "Add <dir> to the start of the system include path" msgstr "" -#: c.opt:866 +#: c.opt:874 msgid "Add <dir> to the end of the quote include path" msgstr "" -#: c.opt:884 +#: c.opt:892 msgid "" "Do not search standard system include directories (those specified with -" "isystem will still be used)" msgstr "" -#: c.opt:888 +#: c.opt:896 msgid "Do not search standard system include directories for C++" msgstr "" -#: c.opt:904 +#: c.opt:912 msgid "Generate C header of platform-specific features" msgstr "" -#: c.opt:908 +#: c.opt:916 msgid "Print a checksum of the executable for PCH validity checking, and stop" msgstr "" -#: c.opt:912 +#: c.opt:920 msgid "Remap file names when including files" msgstr "" -#: c.opt:916 +#: c.opt:924 msgid "Conform to the ISO 1998 C++ standard" msgstr "" -#: c.opt:920 +#: c.opt:928 msgid "" "Conform to the ISO 1998 C++ standard, with extensions that are likely to" msgstr "" -#: c.opt:927 c.opt:962 +#: c.opt:935 c.opt:970 msgid "Conform to the ISO 1990 C standard" msgstr "" -#: c.opt:931 c.opt:970 +#: c.opt:939 c.opt:978 msgid "Conform to the ISO 1999 C standard" msgstr "" -#: c.opt:935 +#: c.opt:943 msgid "Deprecated in favor of -std=c99" msgstr "" -#: c.opt:939 +#: c.opt:947 msgid "Conform to the ISO 1998 C++ standard with GNU extensions" msgstr "" -#: c.opt:943 +#: c.opt:951 msgid "Conform to the ISO 1998 C++ standard, with GNU extensions and" msgstr "" -#: c.opt:950 +#: c.opt:958 msgid "Conform to the ISO 1990 C standard with GNU extensions" msgstr "" -#: c.opt:954 +#: c.opt:962 msgid "Conform to the ISO 1999 C standard with GNU extensions" msgstr "" -#: c.opt:958 +#: c.opt:966 msgid "Deprecated in favor of -std=gnu99" msgstr "" -#: c.opt:966 +#: c.opt:974 msgid "Conform to the ISO 1990 C standard as amended in 1994" msgstr "" -#: c.opt:974 +#: c.opt:982 msgid "Deprecated in favor of -std=iso9899:1999" msgstr "" -#: c.opt:978 +#: c.opt:986 msgid "Enable traditional preprocessing" msgstr "" -#: c.opt:982 +#: c.opt:990 msgid "Support ISO C trigraphs" msgstr "" -#: c.opt:986 +#: c.opt:994 msgid "Do not predefine system-specific and GCC-specific macros" msgstr "" -#: c.opt:990 +#: c.opt:998 msgid "Enable verbose output" msgstr "" @@ -16280,6 +16046,10 @@ msgstr "" msgid "Warn about all enumerated switches missing a specific case" msgstr "" +#: common.opt:198 +msgid "Do not suppress warnings from system headers" +msgstr "" + #: common.opt:202 msgid "" "Warn if a comparison is always true or always false due to the limited range " @@ -16545,8 +16315,8 @@ msgstr "" msgid "Don't allocate floats and doubles in extended-precision registers" msgstr "" -#: common.opt:515 common.opt:726 common.opt:947 common.opt:1103 -#: common.opt:1162 common.opt:1178 common.opt:1238 +#: common.opt:515 common.opt:728 common.opt:949 common.opt:1105 +#: common.opt:1164 common.opt:1180 common.opt:1240 msgid "Does nothing. Preserved for backward compatibility." msgstr "" @@ -16585,817 +16355,817 @@ msgid "" "Perform global common subexpression elimination after register allocation" msgstr "" -#: common.opt:556 +#: common.opt:557 msgid "Enable in and out of Graphite representation" msgstr "" -#: common.opt:560 +#: common.opt:561 msgid "Enable Loop Strip Mining transformation" msgstr "" -#: common.opt:564 +#: common.opt:565 msgid "Enable Loop Interchange transformation" msgstr "" -#: common.opt:568 +#: common.opt:569 msgid "Enable Loop Blocking transformation" msgstr "" -#: common.opt:572 +#: common.opt:574 msgid "Enable Graphite Identity transformation" msgstr "" -#: common.opt:576 +#: common.opt:578 msgid "Enable guessing of branch probabilities" msgstr "" -#: common.opt:584 +#: common.opt:586 msgid "Process #ident directives" msgstr "" -#: common.opt:588 +#: common.opt:590 msgid "Perform conversion of conditional jumps to branchless equivalents" msgstr "" -#: common.opt:592 +#: common.opt:594 msgid "Perform conversion of conditional jumps to conditional execution" msgstr "" -#: common.opt:600 +#: common.opt:602 msgid "Do not generate .size directives" msgstr "" -#: common.opt:604 +#: common.opt:606 msgid "Perform indirect inlining" msgstr "" -#: common.opt:613 +#: common.opt:615 msgid "Pay attention to the \"inline\" keyword" msgstr "" -#: common.opt:617 +#: common.opt:619 msgid "" "Integrate simple functions into their callers when code size is known to not " "growth" msgstr "" -#: common.opt:621 +#: common.opt:623 msgid "Integrate simple functions into their callers" msgstr "" -#: common.opt:625 +#: common.opt:627 msgid "Integrate functions called once into their callers" msgstr "" -#: common.opt:632 +#: common.opt:634 msgid "Limit the size of inlined functions to <number>" msgstr "" -#: common.opt:636 +#: common.opt:638 msgid "Instrument function entry and exit with profiling calls" msgstr "" -#: common.opt:640 +#: common.opt:642 msgid "" "-finstrument-functions-exclude-function-list=name,... Do not instrument " "listed functions" msgstr "" -#: common.opt:644 +#: common.opt:646 msgid "" "-finstrument-functions-exclude-file-list=filename,... Do not instrument " "functions listed in files" msgstr "" -#: common.opt:648 +#: common.opt:650 msgid "Perform Interprocedural constant propagation" msgstr "" -#: common.opt:652 +#: common.opt:654 msgid "Perform cloning to make Interprocedural constant propagation stronger" msgstr "" -#: common.opt:656 +#: common.opt:658 msgid "Discover pure and const functions" msgstr "" -#: common.opt:660 +#: common.opt:662 msgid "Perform interprocedural points-to analysis" msgstr "" -#: common.opt:664 +#: common.opt:666 msgid "Discover readonly and non addressable static variables" msgstr "" -#: common.opt:668 +#: common.opt:670 msgid "Type based escape and alias analysis" msgstr "" -#: common.opt:672 +#: common.opt:674 msgid "Perform matrix layout flattening and transposing based" msgstr "" -#: common.opt:677 +#: common.opt:679 msgid "Perform structure layout optimizations based" msgstr "" -#: common.opt:682 -msgid "Use integrated register allocator." +#: common.opt:684 +msgid "-fira-algorithm=[CB|priority] Set the used IRA algorithm" msgstr "" -#: common.opt:686 -msgid "-fira-algorithm=[regional|CB|mixed] Set the used IRA algorithm" +#: common.opt:688 +msgid "-fira-region=[one|all|mixed] Set regions for IRA" msgstr "" -#: common.opt:690 +#: common.opt:692 msgid "Do optimistic coalescing." msgstr "" -#: common.opt:694 +#: common.opt:696 msgid "Share slots for saving different hard registers." msgstr "" -#: common.opt:698 +#: common.opt:700 msgid "Share stack slots for spilled pseudo-registers." msgstr "" -#: common.opt:702 +#: common.opt:704 msgid "-fira-verbose=<number> Control IRA's level of diagnostic messages." msgstr "" -#: common.opt:706 +#: common.opt:708 msgid "Optimize induction variables on trees" msgstr "" -#: common.opt:710 +#: common.opt:712 msgid "Use jump tables for sufficiently large switch statements" msgstr "" -#: common.opt:714 +#: common.opt:716 msgid "Generate code for functions even if they are fully inlined" msgstr "" -#: common.opt:718 +#: common.opt:720 msgid "Emit static const variables even if they are not used" msgstr "" -#: common.opt:722 +#: common.opt:724 msgid "Give external symbols a leading underscore" msgstr "" -#: common.opt:730 +#: common.opt:732 msgid "Set errno after built-in math functions" msgstr "" -#: common.opt:734 +#: common.opt:736 msgid "Report on permanent memory allocation" msgstr "" -#: common.opt:741 +#: common.opt:743 msgid "Attempt to merge identical constants and constant variables" msgstr "" -#: common.opt:745 +#: common.opt:747 msgid "Attempt to merge identical constants across compilation units" msgstr "" -#: common.opt:749 +#: common.opt:751 msgid "Attempt to merge identical debug strings across compilation units" msgstr "" -#: common.opt:753 +#: common.opt:755 msgid "" "Limit diagnostics to <number> characters per line. 0 suppresses line-" "wrapping" msgstr "" -#: common.opt:757 +#: common.opt:759 msgid "Perform SMS based modulo scheduling before the first scheduling pass" msgstr "" -#: common.opt:761 +#: common.opt:763 msgid "Perform SMS based modulo scheduling with register moves allowed" msgstr "" -#: common.opt:765 +#: common.opt:767 msgid "Move loop invariant computations out of loops" msgstr "" -#: common.opt:769 +#: common.opt:771 msgid "Add mudflap bounds-checking instrumentation for single-threaded program" msgstr "" -#: common.opt:773 +#: common.opt:775 msgid "Add mudflap bounds-checking instrumentation for multi-threaded program" msgstr "" -#: common.opt:777 +#: common.opt:779 msgid "Ignore read operations when inserting mudflap instrumentation" msgstr "" -#: common.opt:781 +#: common.opt:783 msgid "Use the RTL dead code elimination pass" msgstr "" -#: common.opt:785 +#: common.opt:787 msgid "Use the RTL dead store elimination pass" msgstr "" -#: common.opt:789 +#: common.opt:791 msgid "" "Enable/Disable the traditional scheduling in loops that already passed " "modulo scheduling" msgstr "" -#: common.opt:793 +#: common.opt:795 msgid "Support synchronous non-call exceptions" msgstr "" -#: common.opt:797 +#: common.opt:799 msgid "When possible do not generate stack frames" msgstr "" -#: common.opt:801 +#: common.opt:803 msgid "Do the full register move optimization pass" msgstr "" -#: common.opt:805 +#: common.opt:807 msgid "Optimize sibling and tail recursive calls" msgstr "" -#: common.opt:809 common.opt:813 +#: common.opt:811 common.opt:815 msgid "Report on memory allocation before interprocedural optimization" msgstr "" -#: common.opt:817 +#: common.opt:819 msgid "Pack structure members together without holes" msgstr "" -#: common.opt:821 +#: common.opt:823 msgid "Set initial maximum structure member alignment" msgstr "" -#: common.opt:825 +#: common.opt:827 msgid "Return small aggregates in memory, not registers" msgstr "" -#: common.opt:829 +#: common.opt:831 msgid "Perform loop peeling" msgstr "" -#: common.opt:833 +#: common.opt:835 msgid "Enable machine specific peephole optimizations" msgstr "" -#: common.opt:837 +#: common.opt:839 msgid "Enable an RTL peephole pass before sched2" msgstr "" -#: common.opt:841 +#: common.opt:843 msgid "Generate position-independent code if possible (large mode)" msgstr "" -#: common.opt:845 +#: common.opt:847 msgid "" "Generate position-independent code for executables if possible (large mode)" msgstr "" -#: common.opt:849 +#: common.opt:851 msgid "Generate position-independent code if possible (small mode)" msgstr "" -#: common.opt:853 +#: common.opt:855 msgid "" "Generate position-independent code for executables if possible (small mode)" msgstr "" -#: common.opt:857 +#: common.opt:859 msgid "Run predictive commoning optimization." msgstr "" -#: common.opt:861 +#: common.opt:863 msgid "Generate prefetch instructions, if available, for arrays in loops" msgstr "" -#: common.opt:865 +#: common.opt:867 msgid "Enable basic program profiling code" msgstr "" -#: common.opt:869 +#: common.opt:871 msgid "Insert arc-based program profiling code" msgstr "" -#: common.opt:873 +#: common.opt:875 msgid "Set the top-level directory for storing the profile data." msgstr "" -#: common.opt:878 +#: common.opt:880 msgid "Enable correction of flow inconsistent profile data input" msgstr "" -#: common.opt:882 +#: common.opt:884 msgid "" "Enable common options for generating profile info for profile feedback " "directed optimizations" msgstr "" -#: common.opt:886 +#: common.opt:888 msgid "" "Enable common options for generating profile info for profile feedback " "directed optimizations, and set -fprofile-dir=" msgstr "" -#: common.opt:890 +#: common.opt:892 msgid "" "Enable common options for performing profile feedback directed optimizations" msgstr "" -#: common.opt:894 +#: common.opt:896 msgid "" "Enable common options for performing profile feedback directed " "optimizations, and set -fprofile-dir=" msgstr "" -#: common.opt:898 +#: common.opt:900 msgid "Insert code to profile values of expressions" msgstr "" -#: common.opt:905 +#: common.opt:907 msgid "Make compile reproducible using <string>" msgstr "" -#: common.opt:915 +#: common.opt:917 msgid "Record gcc command line switches in the object file." msgstr "" -#: common.opt:919 +#: common.opt:921 msgid "Return small aggregates in registers" msgstr "" -#: common.opt:923 +#: common.opt:925 msgid "Enables a register move optimization" msgstr "" -#: common.opt:927 +#: common.opt:929 msgid "Perform a register renaming optimization pass" msgstr "" -#: common.opt:931 +#: common.opt:933 msgid "Reorder basic blocks to improve code placement" msgstr "" -#: common.opt:935 +#: common.opt:937 msgid "Reorder basic blocks and partition into hot and cold sections" msgstr "" -#: common.opt:939 +#: common.opt:941 msgid "Reorder functions to improve code placement" msgstr "" -#: common.opt:943 +#: common.opt:945 msgid "Add a common subexpression elimination pass after loop optimizations" msgstr "" -#: common.opt:951 +#: common.opt:953 msgid "Disable optimizations that assume default FP rounding behavior" msgstr "" -#: common.opt:955 +#: common.opt:957 msgid "Enable scheduling across basic blocks" msgstr "" -#: common.opt:959 +#: common.opt:961 msgid "Allow speculative motion of non-loads" msgstr "" -#: common.opt:963 +#: common.opt:965 msgid "Allow speculative motion of some loads" msgstr "" -#: common.opt:967 +#: common.opt:969 msgid "Allow speculative motion of more loads" msgstr "" -#: common.opt:971 +#: common.opt:973 msgid "Set the verbosity level of the scheduler" msgstr "" -#: common.opt:975 +#: common.opt:977 msgid "If scheduling post reload, do superblock scheduling" msgstr "" -#: common.opt:979 +#: common.opt:981 msgid "If scheduling post reload, do trace scheduling" msgstr "" -#: common.opt:983 +#: common.opt:985 msgid "Reschedule instructions before register allocation" msgstr "" -#: common.opt:987 +#: common.opt:989 msgid "Reschedule instructions after register allocation" msgstr "" -#: common.opt:994 +#: common.opt:996 msgid "Schedule instructions using selective scheduling algorithm" msgstr "" -#: common.opt:998 +#: common.opt:1000 msgid "Run selective scheduling after reload" msgstr "" -#: common.opt:1002 +#: common.opt:1004 msgid "Perform software pipelining of inner loops during selective scheduling" msgstr "" -#: common.opt:1006 +#: common.opt:1008 msgid "Perform software pipelining of outer loops during selective scheduling" msgstr "" -#: common.opt:1010 +#: common.opt:1012 msgid "Reschedule pipelined regions without pipelining" msgstr "" -#: common.opt:1016 +#: common.opt:1018 msgid "Allow premature scheduling of queued insns" msgstr "" -#: common.opt:1020 +#: common.opt:1022 msgid "Set number of queued insns that can be prematurely scheduled" msgstr "" -#: common.opt:1028 common.opt:1032 +#: common.opt:1030 common.opt:1034 msgid "" "Set dependence distance checking in premature scheduling of queued insns" msgstr "" -#: common.opt:1036 +#: common.opt:1038 msgid "Access data in the same section from shared anchor points" msgstr "" -#: common.opt:1040 +#: common.opt:1042 msgid "Perform sequence abstraction optimization on RTL" msgstr "" -#: common.opt:1044 +#: common.opt:1046 msgid "Eliminate redundant sign extensions using LCM." msgstr "" -#: common.opt:1048 +#: common.opt:1050 msgid "Show column numbers in diagnostics, when available. Default off" msgstr "" -#: common.opt:1052 +#: common.opt:1054 msgid "Disable optimizations observable by IEEE signaling NaNs" msgstr "" -#: common.opt:1056 +#: common.opt:1058 msgid "" "Disable floating point optimizations that ignore the IEEE signedness of zero" msgstr "" -#: common.opt:1060 +#: common.opt:1062 msgid "Convert floating point constants to single precision constants" msgstr "" -#: common.opt:1064 +#: common.opt:1066 msgid "Split lifetimes of induction variables when loops are unrolled" msgstr "" -#: common.opt:1068 +#: common.opt:1070 msgid "Split wide types into independent registers" msgstr "" -#: common.opt:1072 +#: common.opt:1074 msgid "Apply variable expansion when loops are unrolled" msgstr "" -#: common.opt:1076 +#: common.opt:1078 msgid "Insert stack checking code into the program" msgstr "" -#: common.opt:1080 +#: common.opt:1082 msgid "" "Insert stack checking code into the program. Same as -fstack-check=specific" msgstr "" -#: common.opt:1087 +#: common.opt:1089 msgid "Trap if the stack goes past <register>" msgstr "" -#: common.opt:1091 +#: common.opt:1093 msgid "Trap if the stack goes past symbol <name>" msgstr "" -#: common.opt:1095 +#: common.opt:1097 msgid "Use propolice as a stack protection method" msgstr "" -#: common.opt:1099 +#: common.opt:1101 msgid "Use a stack protection method for every function" msgstr "" -#: common.opt:1111 +#: common.opt:1113 msgid "Assume strict aliasing rules apply" msgstr "" -#: common.opt:1115 +#: common.opt:1117 msgid "Treat signed overflow as undefined" msgstr "" -#: common.opt:1119 +#: common.opt:1121 msgid "Check for syntax errors, then stop" msgstr "" -#: common.opt:1123 +#: common.opt:1125 msgid "Create data files needed by \"gcov\"" msgstr "" -#: common.opt:1127 +#: common.opt:1129 msgid "Perform jump threading optimizations" msgstr "" -#: common.opt:1131 +#: common.opt:1133 msgid "Report the time taken by each compiler pass" msgstr "" -#: common.opt:1135 +#: common.opt:1137 msgid "Set the default thread-local storage code generation model" msgstr "" -#: common.opt:1139 +#: common.opt:1141 msgid "Reorder top level functions, variables, and asms" msgstr "" -#: common.opt:1143 +#: common.opt:1145 msgid "Perform superblock formation via tail duplication" msgstr "" -#: common.opt:1150 +#: common.opt:1152 msgid "Assume floating-point operations can trap" msgstr "" -#: common.opt:1154 +#: common.opt:1156 msgid "Trap for signed overflow in addition, subtraction and multiplication" msgstr "" -#: common.opt:1158 +#: common.opt:1160 msgid "Enable SSA-CCP optimization on trees" msgstr "" -#: common.opt:1166 +#: common.opt:1168 msgid "Enable loop header copying on trees" msgstr "" -#: common.opt:1170 +#: common.opt:1172 msgid "Replace SSA temporaries with better names in copies" msgstr "" -#: common.opt:1174 +#: common.opt:1176 msgid "Enable copy propagation on trees" msgstr "" -#: common.opt:1182 +#: common.opt:1184 msgid "Transform condition stores into unconditional ones" msgstr "" -#: common.opt:1186 +#: common.opt:1188 msgid "Perform conversions of switch initializations." msgstr "" -#: common.opt:1190 +#: common.opt:1192 msgid "Enable SSA dead code elimination optimization on trees" msgstr "" -#: common.opt:1194 +#: common.opt:1196 msgid "Enable dominator optimizations" msgstr "" -#: common.opt:1198 +#: common.opt:1200 msgid "Enable dead store elimination" msgstr "" -#: common.opt:1202 +#: common.opt:1204 msgid "Enable Full Redundancy Elimination (FRE) on trees" msgstr "" -#: common.opt:1206 +#: common.opt:1208 msgid "Enable loop distribution on trees" msgstr "" -#: common.opt:1210 +#: common.opt:1212 msgid "Enable loop invariant motion on trees" msgstr "" -#: common.opt:1214 +#: common.opt:1216 msgid "Enable linear loop transforms on trees" msgstr "" -#: common.opt:1218 +#: common.opt:1220 msgid "Create canonical induction variables in loops" msgstr "" -#: common.opt:1222 +#: common.opt:1224 msgid "Enable loop optimizations on tree level" msgstr "" -#: common.opt:1226 +#: common.opt:1228 msgid "Enable automatic parallelization of loops" msgstr "" -#: common.opt:1230 +#: common.opt:1232 msgid "Enable SSA-PRE optimization on trees" msgstr "" -#: common.opt:1234 +#: common.opt:1236 msgid "Enable reassociation on tree level" msgstr "" -#: common.opt:1242 +#: common.opt:1244 msgid "Enable SSA code sinking on trees" msgstr "" -#: common.opt:1246 +#: common.opt:1248 msgid "Perform scalar replacement of aggregates" msgstr "" -#: common.opt:1250 +#: common.opt:1252 msgid "Replace temporary expressions in the SSA->normal pass" msgstr "" -#: common.opt:1254 +#: common.opt:1256 msgid "Perform live range splitting during the SSA->normal pass" msgstr "" -#: common.opt:1258 +#: common.opt:1260 msgid "Perform Value Range Propagation on trees" msgstr "" -#: common.opt:1262 +#: common.opt:1264 msgid "Compile whole compilation unit at a time" msgstr "" -#: common.opt:1266 +#: common.opt:1268 msgid "Perform loop unrolling when iteration count is known" msgstr "" -#: common.opt:1270 +#: common.opt:1272 msgid "Perform loop unrolling for all loops" msgstr "" -#: common.opt:1277 +#: common.opt:1279 msgid "Allow loop optimizations to assume that the loops behave in normal way" msgstr "" -#: common.opt:1281 +#: common.opt:1283 msgid "Allow optimization for floating-point arithmetic which may change the" msgstr "" -#: common.opt:1286 +#: common.opt:1288 msgid "Same as -fassociative-math for expressions which include division." msgstr "" -#: common.opt:1294 +#: common.opt:1296 msgid "Allow math optimizations that may violate IEEE or ISO standards" msgstr "" -#: common.opt:1298 +#: common.opt:1300 msgid "Perform loop unswitching" msgstr "" -#: common.opt:1302 +#: common.opt:1304 msgid "Just generate unwind tables for exception handling" msgstr "" -#: common.opt:1306 +#: common.opt:1308 msgid "Perform variable tracking" msgstr "" -#: common.opt:1310 +#: common.opt:1312 msgid "Perform variable tracking and also tag variables that are uninitialized" msgstr "" -#: common.opt:1314 +#: common.opt:1316 msgid "Enable loop vectorization on trees" msgstr "" -#: common.opt:1318 +#: common.opt:1320 msgid "Enable use of cost model in vectorization" msgstr "" -#: common.opt:1322 +#: common.opt:1324 msgid "Enable loop versioning when doing loop vectorization on trees" msgstr "" -#: common.opt:1326 +#: common.opt:1328 msgid "Set the verbosity level of the vectorizer" msgstr "" -#: common.opt:1330 +#: common.opt:1332 msgid "Enable copy propagation of scalar-evolution information." msgstr "" -#: common.opt:1340 +#: common.opt:1342 msgid "Add extra commentary to assembler output" msgstr "" -#: common.opt:1344 +#: common.opt:1346 msgid "Set the default symbol visibility" msgstr "" -#: common.opt:1349 +#: common.opt:1351 msgid "Use expression value profiles in optimizations" msgstr "" -#: common.opt:1353 +#: common.opt:1355 msgid "Construct webs and split unrelated uses of single variable" msgstr "" -#: common.opt:1357 +#: common.opt:1359 msgid "Enable conditional dead code elimination for builtin calls" msgstr "" -#: common.opt:1361 +#: common.opt:1363 msgid "Perform whole program optimizations" msgstr "" -#: common.opt:1365 +#: common.opt:1367 msgid "Assume signed arithmetic overflow wraps around" msgstr "" -#: common.opt:1369 +#: common.opt:1371 msgid "Put zero initialized data in the bss section" msgstr "" -#: common.opt:1373 +#: common.opt:1375 msgid "Generate debug information in default format" msgstr "" -#: common.opt:1377 +#: common.opt:1379 msgid "Generate debug information in COFF format" msgstr "" -#: common.opt:1381 +#: common.opt:1383 msgid "Generate debug information in DWARF v2 format" msgstr "" -#: common.opt:1385 +#: common.opt:1387 msgid "Generate debug information in default extended format" msgstr "" -#: common.opt:1389 +#: common.opt:1391 msgid "Generate debug information in STABS format" msgstr "" -#: common.opt:1393 +#: common.opt:1395 msgid "Generate debug information in extended STABS format" msgstr "" -#: common.opt:1397 +#: common.opt:1399 msgid "Generate debug information in VMS format" msgstr "" -#: common.opt:1401 +#: common.opt:1403 msgid "Generate debug information in XCOFF format" msgstr "" -#: common.opt:1405 +#: common.opt:1407 msgid "Generate debug information in extended XCOFF format" msgstr "" -#: common.opt:1409 +#: common.opt:1411 msgid "Place output into <file>" msgstr "" -#: common.opt:1413 +#: common.opt:1415 msgid "Enable function profiling" msgstr "" -#: common.opt:1417 +#: common.opt:1419 msgid "Issue warnings needed for strict compliance to the standard" msgstr "" -#: common.opt:1421 +#: common.opt:1423 msgid "Like -pedantic but issue them as errors" msgstr "" -#: common.opt:1425 +#: common.opt:1427 msgid "Do not display functions compiled or elapsed time" msgstr "" -#: common.opt:1429 +#: common.opt:1431 msgid "Display the compiler's version" msgstr "" -#: common.opt:1433 +#: common.opt:1435 msgid "Suppress warnings" msgstr "" -#: common.opt:1437 +#: common.opt:1439 msgid "Create a shared library" msgstr "" -#: common.opt:1441 +#: common.opt:1443 msgid "Create a position independent executable" msgstr "" @@ -17435,52 +17205,47 @@ msgid "" "branch target register load optimization is not intended to be run twice" msgstr "" -#: builtins.c:475 -#, gcc-internal-format -msgid "offset outside bounds of constant string" -msgstr "" - -#: builtins.c:1038 +#: builtins.c:1039 #, gcc-internal-format msgid "second argument to %<__builtin_prefetch%> must be a constant" msgstr "" -#: builtins.c:1045 +#: builtins.c:1046 #, gcc-internal-format msgid "invalid second argument to %<__builtin_prefetch%>; using zero" msgstr "" -#: builtins.c:1053 +#: builtins.c:1054 #, gcc-internal-format msgid "third argument to %<__builtin_prefetch%> must be a constant" msgstr "" -#: builtins.c:1060 +#: builtins.c:1061 #, gcc-internal-format msgid "invalid third argument to %<__builtin_prefetch%>; using zero" msgstr "" -#: builtins.c:4632 +#: builtins.c:4665 #, gcc-internal-format msgid "argument of %<__builtin_args_info%> must be constant" msgstr "" -#: builtins.c:4638 +#: builtins.c:4671 #, gcc-internal-format msgid "argument of %<__builtin_args_info%> out of range" msgstr "" -#: builtins.c:4644 +#: builtins.c:4677 #, gcc-internal-format msgid "missing argument in %<__builtin_args_info%>" msgstr "" -#: builtins.c:4780 gimplify.c:2326 +#: builtins.c:4813 gimplify.c:2326 #, gcc-internal-format msgid "too few arguments to function %<va_start%>" msgstr "" -#: builtins.c:4938 +#: builtins.c:4971 #, gcc-internal-format msgid "first argument to %<va_arg%> not of type %<va_list%>" msgstr "" @@ -17488,93 +17253,93 @@ msgstr "" #. Unfortunately, this is merely undefined, rather than a constraint #. violation, so we cannot make this an error. If this call is never #. executed, the program is still strictly conforming. -#: builtins.c:4953 +#: builtins.c:4986 #, gcc-internal-format msgid "%qT is promoted to %qT when passed through %<...%>" msgstr "" -#: builtins.c:4958 +#: builtins.c:4991 #, gcc-internal-format msgid "(so you should pass %qT not %qT to %<va_arg%>)" msgstr "" #. We can, however, treat "undefined" any way we please. #. Call abort to encourage the user to fix the program. -#: builtins.c:4965 c-typeck.c:2427 +#: builtins.c:4998 c-typeck.c:2451 #, gcc-internal-format msgid "if this code is reached, the program will abort" msgstr "" -#: builtins.c:5086 +#: builtins.c:5122 #, gcc-internal-format msgid "invalid argument to %<__builtin_frame_address%>" msgstr "" -#: builtins.c:5088 +#: builtins.c:5124 #, gcc-internal-format msgid "invalid argument to %<__builtin_return_address%>" msgstr "" -#: builtins.c:5101 +#: builtins.c:5137 #, gcc-internal-format msgid "unsupported argument to %<__builtin_frame_address%>" msgstr "" -#: builtins.c:5103 +#: builtins.c:5139 #, gcc-internal-format msgid "unsupported argument to %<__builtin_return_address%>" msgstr "" -#: builtins.c:5649 +#: builtins.c:5685 #, gcc-internal-format msgid "both arguments to %<__builtin___clear_cache%> must be pointers" msgstr "" -#: builtins.c:6011 builtins.c:6026 +#: builtins.c:6047 builtins.c:6062 #, gcc-internal-format msgid "%qD changed semantics in GCC 4.4" msgstr "" #. All valid uses of __builtin_va_arg_pack () are removed during #. inlining. -#: builtins.c:6412 expr.c:8051 +#: builtins.c:6448 expr.c:8051 msgid "%Kinvalid use of %<__builtin_va_arg_pack ()%>" msgstr "" #. All valid uses of __builtin_va_arg_pack_len () are removed during #. inlining. -#: builtins.c:6418 +#: builtins.c:6454 msgid "%Kinvalid use of %<__builtin_va_arg_pack_len ()%>" msgstr "" -#: builtins.c:6714 +#: builtins.c:6750 #, gcc-internal-format msgid "%<__builtin_longjmp%> second argument must be 1" msgstr "" -#: builtins.c:7348 +#: builtins.c:7386 #, gcc-internal-format msgid "target format does not support infinity" msgstr "" -#: builtins.c:11598 +#: builtins.c:11763 #, gcc-internal-format msgid "%<va_start%> used in function with fixed args" msgstr "" -#: builtins.c:11606 +#: builtins.c:11771 #, gcc-internal-format msgid "wrong number of arguments to function %<va_start%>" msgstr "" #. Evidently an out of date version of <stdarg.h>; can't validate #. va_start's second argument, but can still work as intended. -#: builtins.c:11619 +#: builtins.c:11784 #, gcc-internal-format msgid "%<__builtin_next_arg%> called without an argument" msgstr "" -#: builtins.c:11624 +#: builtins.c:11789 #, gcc-internal-format msgid "wrong number of arguments to function %<__builtin_next_arg%>" msgstr "" @@ -17584,931 +17349,936 @@ msgstr "" #. argument. We just warn and set the arg to be the last #. argument so that we will get wrong-code because of #. it. -#: builtins.c:11651 +#: builtins.c:11816 #, gcc-internal-format msgid "second parameter of %<va_start%> not last named argument" msgstr "" -#: builtins.c:11661 +#: builtins.c:11826 #, gcc-internal-format msgid "" "undefined behaviour when second parameter of %<va_start%> is declared with %" "<register%> storage" msgstr "" -#: builtins.c:11776 +#: builtins.c:11941 msgid "%Kfirst argument of %D must be a pointer, second integer constant" msgstr "" -#: builtins.c:11789 +#: builtins.c:11954 msgid "%Klast argument of %D is not integer constant between 0 and 3" msgstr "" -#: builtins.c:11833 builtins.c:11997 builtins.c:12056 +#: builtins.c:11999 builtins.c:12164 builtins.c:12223 msgid "%Kcall to %D will always overflow destination buffer" msgstr "" -#: builtins.c:11987 +#: builtins.c:12154 msgid "%Kcall to %D might overflow destination buffer" msgstr "" -#: builtins.c:12077 +#: builtins.c:12244 msgid "%Kattempt to free a non-heap object %qD" msgstr "" -#: builtins.c:12079 +#: builtins.c:12247 msgid "%Kattempt to free a non-heap object" msgstr "" -#: c-common.c:1026 +#: c-common.c:1028 #, gcc-internal-format msgid "%qD is not defined outside of function scope" msgstr "" -#: c-common.c:1076 +#: c-common.c:1078 #, gcc-internal-format msgid "" "string length %qd is greater than the length %qd ISO C%d compilers are " "required to support" msgstr "" -#: c-common.c:1123 c-common.c:1135 +#: c-common.c:1125 c-common.c:1137 #, gcc-internal-format msgid "overflow in constant expression" msgstr "" -#: c-common.c:1157 +#: c-common.c:1159 #, gcc-internal-format msgid "integer overflow in expression" msgstr "" -#: c-common.c:1161 +#: c-common.c:1163 #, gcc-internal-format msgid "floating point overflow in expression" msgstr "" -#: c-common.c:1165 +#: c-common.c:1167 #, gcc-internal-format msgid "fixed-point overflow in expression" msgstr "" -#: c-common.c:1169 +#: c-common.c:1171 #, gcc-internal-format msgid "vector overflow in expression" msgstr "" -#: c-common.c:1174 +#: c-common.c:1176 #, gcc-internal-format msgid "complex integer overflow in expression" msgstr "" -#: c-common.c:1176 +#: c-common.c:1178 #, gcc-internal-format msgid "complex floating point overflow in expression" msgstr "" -#: c-common.c:1207 +#: c-common.c:1209 #, gcc-internal-format msgid "logical %<%s%> with non-zero constant will always evaluate as true" msgstr "" -#: c-common.c:1245 +#: c-common.c:1247 #, gcc-internal-format msgid "type-punning to incomplete type might break strict-aliasing rules" msgstr "" -#: c-common.c:1260 +#: c-common.c:1262 #, gcc-internal-format msgid "dereferencing type-punned pointer will break strict-aliasing rules" msgstr "" -#: c-common.c:1267 c-common.c:1285 +#: c-common.c:1269 c-common.c:1287 #, gcc-internal-format msgid "dereferencing type-punned pointer might break strict-aliasing rules" msgstr "" -#: c-common.c:1316 +#: c-common.c:1318 #, gcc-internal-format msgid "first argument of %q+D should be %<int%>" msgstr "" -#: c-common.c:1325 +#: c-common.c:1327 #, gcc-internal-format msgid "second argument of %q+D should be %<char **%>" msgstr "" -#: c-common.c:1334 +#: c-common.c:1336 #, gcc-internal-format msgid "third argument of %q+D should probably be %<char **%>" msgstr "" -#: c-common.c:1344 +#: c-common.c:1346 #, gcc-internal-format msgid "%q+D takes only zero or two arguments" msgstr "" -#: c-common.c:1393 +#: c-common.c:1395 #, gcc-internal-format msgid "" "use -flax-vector-conversions to permit conversions between vectors with " "differing element types or numbers of subparts" msgstr "" -#: c-common.c:1548 +#: c-common.c:1550 #, gcc-internal-format msgid "conversion to %qT from boolean expression" msgstr "" -#: c-common.c:1570 +#: c-common.c:1572 #, gcc-internal-format msgid "negative integer implicitly converted to unsigned type" msgstr "" -#: c-common.c:1572 +#: c-common.c:1574 #, gcc-internal-format msgid "conversion of unsigned constant value to negative integer" msgstr "" -#: c-common.c:1599 +#: c-common.c:1601 #, gcc-internal-format msgid "conversion to %qT alters %qT constant value" msgstr "" -#: c-common.c:1691 +#: c-common.c:1693 #, gcc-internal-format msgid "conversion to %qT from %qT may change the sign of the result" msgstr "" -#: c-common.c:1723 +#: c-common.c:1725 #, gcc-internal-format msgid "conversion to %qT from %qT may alter its value" msgstr "" -#: c-common.c:1751 +#: c-common.c:1753 #, gcc-internal-format msgid "large integer implicitly truncated to unsigned type" msgstr "" -#: c-common.c:1757 c-common.c:1764 c-common.c:1772 +#: c-common.c:1759 c-common.c:1766 c-common.c:1774 #, gcc-internal-format msgid "overflow in implicit constant conversion" msgstr "" -#: c-common.c:1928 +#: c-common.c:1930 #, gcc-internal-format msgid "operation on %qE may be undefined" msgstr "" -#: c-common.c:2229 +#: c-common.c:2231 #, gcc-internal-format msgid "case label does not reduce to an integer constant" msgstr "" -#: c-common.c:2269 +#: c-common.c:2271 #, gcc-internal-format msgid "case label value is less than minimum value for type" msgstr "" -#: c-common.c:2277 +#: c-common.c:2279 #, gcc-internal-format msgid "case label value exceeds maximum value for type" msgstr "" -#: c-common.c:2285 +#: c-common.c:2287 #, gcc-internal-format msgid "lower value in case label range less than minimum value for type" msgstr "" -#: c-common.c:2294 +#: c-common.c:2296 #, gcc-internal-format msgid "upper value in case label range exceeds maximum value for type" msgstr "" -#: c-common.c:2368 +#: c-common.c:2370 #, gcc-internal-format msgid "" "GCC cannot support operators with integer types and fixed-point types that " "have too many integral and fractional bits together" msgstr "" -#: c-common.c:2854 +#: c-common.c:2856 #, gcc-internal-format msgid "invalid operands to binary %s (have %qT and %qT)" msgstr "" -#: c-common.c:3090 +#: c-common.c:3092 #, gcc-internal-format msgid "comparison is always false due to limited range of data type" msgstr "" -#: c-common.c:3092 +#: c-common.c:3094 #, gcc-internal-format msgid "comparison is always true due to limited range of data type" msgstr "" -#: c-common.c:3171 +#: c-common.c:3173 #, gcc-internal-format msgid "comparison of unsigned expression >= 0 is always true" msgstr "" -#: c-common.c:3181 +#: c-common.c:3183 #, gcc-internal-format msgid "comparison of unsigned expression < 0 is always false" msgstr "" -#: c-common.c:3222 +#: c-common.c:3225 #, gcc-internal-format msgid "pointer of type %<void *%> used in arithmetic" msgstr "" -#: c-common.c:3228 +#: c-common.c:3231 #, gcc-internal-format msgid "pointer to a function used in arithmetic" msgstr "" -#: c-common.c:3234 +#: c-common.c:3237 #, gcc-internal-format msgid "pointer to member function used in arithmetic" msgstr "" -#: c-common.c:3394 +#: c-common.c:3319 +#, gcc-internal-format +msgid "offset %<%wd%> outside bounds of constant string" +msgstr "" + +#: c-common.c:3422 #, gcc-internal-format msgid "the address of %qD will always evaluate as %<true%>" msgstr "" -#: c-common.c:3470 cp/semantics.c:589 cp/typeck.c:6575 +#: c-common.c:3498 cp/semantics.c:594 cp/typeck.c:6638 #, gcc-internal-format msgid "suggest parentheses around assignment used as truth value" msgstr "" -#: c-common.c:3549 c-typeck.c:8925 +#: c-common.c:3577 c-typeck.c:8970 #, gcc-internal-format msgid "invalid use of %<restrict%>" msgstr "" -#: c-common.c:3766 +#: c-common.c:3794 #, gcc-internal-format msgid "invalid application of %<sizeof%> to a function type" msgstr "" -#: c-common.c:3779 +#: c-common.c:3807 #, gcc-internal-format msgid "invalid application of %qs to a void type" msgstr "" -#: c-common.c:3787 +#: c-common.c:3815 #, gcc-internal-format msgid "invalid application of %qs to incomplete type %qT " msgstr "" -#: c-common.c:3828 +#: c-common.c:3856 #, gcc-internal-format msgid "%<__alignof%> applied to a bit-field" msgstr "" -#: c-common.c:4449 +#: c-common.c:4495 #, gcc-internal-format msgid "cannot disable built-in function %qs" msgstr "" -#: c-common.c:4640 +#: c-common.c:4686 #, gcc-internal-format msgid "pointers are not permitted as case values" msgstr "" -#: c-common.c:4647 +#: c-common.c:4693 #, gcc-internal-format msgid "range expressions in switch statements are non-standard" msgstr "" -#: c-common.c:4673 +#: c-common.c:4719 #, gcc-internal-format msgid "empty range specified" msgstr "" -#: c-common.c:4733 +#: c-common.c:4779 #, gcc-internal-format msgid "duplicate (or overlapping) case value" msgstr "" -#: c-common.c:4734 +#: c-common.c:4780 #, gcc-internal-format msgid "%Jthis is the first entry overlapping that value" msgstr "" -#: c-common.c:4738 +#: c-common.c:4784 #, gcc-internal-format msgid "duplicate case value" msgstr "" -#: c-common.c:4739 +#: c-common.c:4785 #, gcc-internal-format msgid "%Jpreviously used here" msgstr "" -#: c-common.c:4743 +#: c-common.c:4789 #, gcc-internal-format msgid "multiple default labels in one switch" msgstr "" -#: c-common.c:4744 +#: c-common.c:4790 #, gcc-internal-format msgid "%Jthis is the first default label" msgstr "" -#: c-common.c:4795 +#: c-common.c:4841 #, gcc-internal-format msgid "%Jcase value %qs not in enumerated type" msgstr "" -#: c-common.c:4799 +#: c-common.c:4845 #, gcc-internal-format msgid "%Jcase value %qs not in enumerated type %qT" msgstr "" -#: c-common.c:4858 +#: c-common.c:4904 #, gcc-internal-format msgid "%Hswitch missing default case" msgstr "" -#: c-common.c:4929 +#: c-common.c:4975 #, gcc-internal-format msgid "%Henumeration value %qE not handled in switch" msgstr "" -#: c-common.c:4964 +#: c-common.c:5010 #, gcc-internal-format msgid "taking the address of a label is non-standard" msgstr "" -#: c-common.c:5118 +#: c-common.c:5166 #, gcc-internal-format msgid "%qE attribute ignored for field of type %qT" msgstr "" -#: c-common.c:5129 c-common.c:5148 c-common.c:5166 c-common.c:5193 -#: c-common.c:5220 c-common.c:5246 c-common.c:5265 c-common.c:5289 -#: c-common.c:5312 c-common.c:5335 c-common.c:5356 c-common.c:5377 -#: c-common.c:5401 c-common.c:5427 c-common.c:5464 c-common.c:5491 -#: c-common.c:5534 c-common.c:5618 c-common.c:5648 c-common.c:5667 -#: c-common.c:6002 c-common.c:6061 c-common.c:6084 c-common.c:6148 -#: c-common.c:6266 c-common.c:6332 c-common.c:6376 c-common.c:6422 -#: c-common.c:6492 c-common.c:6516 c-common.c:6801 c-common.c:6824 -#: c-common.c:6863 c-common.c:6952 c-common.c:7092 +#: c-common.c:5177 c-common.c:5196 c-common.c:5214 c-common.c:5241 +#: c-common.c:5268 c-common.c:5294 c-common.c:5313 c-common.c:5337 +#: c-common.c:5360 c-common.c:5383 c-common.c:5404 c-common.c:5425 +#: c-common.c:5449 c-common.c:5475 c-common.c:5512 c-common.c:5539 +#: c-common.c:5582 c-common.c:5666 c-common.c:5696 c-common.c:5715 +#: c-common.c:6050 c-common.c:6066 c-common.c:6114 c-common.c:6137 +#: c-common.c:6201 c-common.c:6329 c-common.c:6395 c-common.c:6439 +#: c-common.c:6485 c-common.c:6555 c-common.c:6579 c-common.c:6865 +#: c-common.c:6888 c-common.c:6927 c-common.c:7016 c-common.c:7156 #, gcc-internal-format msgid "%qE attribute ignored" msgstr "" -#: c-common.c:5211 c-common.c:5237 +#: c-common.c:5259 c-common.c:5285 #, gcc-internal-format msgid "%qE attribute conflicts with attribute %s" msgstr "" -#: c-common.c:5458 +#: c-common.c:5506 #, gcc-internal-format msgid "%qE attribute have effect only on public objects" msgstr "" -#: c-common.c:5555 +#: c-common.c:5603 #, gcc-internal-format msgid "destructor priorities are not supported" msgstr "" -#: c-common.c:5557 +#: c-common.c:5605 #, gcc-internal-format msgid "constructor priorities are not supported" msgstr "" -#: c-common.c:5574 +#: c-common.c:5622 #, gcc-internal-format msgid "destructor priorities from 0 to %d are reserved for the implementation" msgstr "" -#: c-common.c:5579 +#: c-common.c:5627 #, gcc-internal-format msgid "constructor priorities from 0 to %d are reserved for the implementation" msgstr "" -#: c-common.c:5587 +#: c-common.c:5635 #, gcc-internal-format msgid "destructor priorities must be integers from 0 to %d inclusive" msgstr "" -#: c-common.c:5590 +#: c-common.c:5638 #, gcc-internal-format msgid "constructor priorities must be integers from 0 to %d inclusive" msgstr "" -#: c-common.c:5711 +#: c-common.c:5759 #, gcc-internal-format msgid "unknown machine mode %qs" msgstr "" -#: c-common.c:5740 +#: c-common.c:5788 #, gcc-internal-format msgid "specifying vector types with __attribute__ ((mode)) is deprecated" msgstr "" -#: c-common.c:5743 +#: c-common.c:5791 #, gcc-internal-format msgid "use __attribute__ ((vector_size)) instead" msgstr "" -#: c-common.c:5752 +#: c-common.c:5800 #, gcc-internal-format msgid "unable to emulate %qs" msgstr "" -#: c-common.c:5762 +#: c-common.c:5810 #, gcc-internal-format msgid "invalid pointer mode %qs" msgstr "" -#: c-common.c:5779 +#: c-common.c:5827 #, gcc-internal-format msgid "signness of type and machine mode %qs don't match" msgstr "" -#: c-common.c:5790 +#: c-common.c:5838 #, gcc-internal-format msgid "no data type for mode %qs" msgstr "" -#: c-common.c:5800 +#: c-common.c:5848 #, gcc-internal-format msgid "cannot use mode %qs for enumeral types" msgstr "" -#: c-common.c:5827 +#: c-common.c:5875 #, gcc-internal-format msgid "mode %qs applied to inappropriate type" msgstr "" -#: c-common.c:5858 +#: c-common.c:5906 #, gcc-internal-format msgid "%Jsection attribute cannot be specified for local variables" msgstr "" -#: c-common.c:5869 config/bfin/bfin.c:5274 config/bfin/bfin.c:5325 +#: c-common.c:5917 config/bfin/bfin.c:5329 config/bfin/bfin.c:5380 #, gcc-internal-format msgid "section of %q+D conflicts with previous declaration" msgstr "" -#: c-common.c:5877 +#: c-common.c:5925 #, gcc-internal-format msgid "section of %q+D cannot be overridden" msgstr "" -#: c-common.c:5885 +#: c-common.c:5933 #, gcc-internal-format msgid "section attribute not allowed for %q+D" msgstr "" -#: c-common.c:5891 +#: c-common.c:5939 #, gcc-internal-format msgid "%Jsection attributes are not supported for this target" msgstr "" -#: c-common.c:5923 +#: c-common.c:5971 #, gcc-internal-format msgid "requested alignment is not a constant" msgstr "" -#: c-common.c:5928 +#: c-common.c:5976 #, gcc-internal-format msgid "requested alignment is not a power of 2" msgstr "" -#: c-common.c:5933 +#: c-common.c:5981 #, gcc-internal-format msgid "requested alignment is too large" msgstr "" -#: c-common.c:5959 +#: c-common.c:6007 #, gcc-internal-format msgid "alignment may not be specified for %q+D" msgstr "" -#: c-common.c:5966 +#: c-common.c:6014 #, gcc-internal-format msgid "" "alignment for %q+D was previously specified as %d and may not be decreased" msgstr "" -#: c-common.c:5970 +#: c-common.c:6018 #, gcc-internal-format msgid "alignment for %q+D must be at least %d" msgstr "" -#: c-common.c:5995 +#: c-common.c:6043 #, gcc-internal-format msgid "inline function %q+D cannot be declared weak" msgstr "" -#: c-common.c:6024 +#: c-common.c:6077 #, gcc-internal-format msgid "%q+D defined both normally and as an alias" msgstr "" -#: c-common.c:6040 +#: c-common.c:6093 #, gcc-internal-format msgid "alias argument not a string" msgstr "" -#: c-common.c:6105 +#: c-common.c:6158 #, gcc-internal-format msgid "%Jweakref attribute must appear before alias attribute" msgstr "" -#: c-common.c:6135 +#: c-common.c:6188 #, gcc-internal-format msgid "%qE attribute ignored on non-class types" msgstr "" -#: c-common.c:6141 +#: c-common.c:6194 #, gcc-internal-format msgid "%qE attribute ignored because %qT is already defined" msgstr "" -#: c-common.c:6154 +#: c-common.c:6207 #, gcc-internal-format msgid "visibility argument not a string" msgstr "" -#: c-common.c:6166 +#: c-common.c:6219 #, gcc-internal-format msgid "%qE attribute ignored on types" msgstr "" -#: c-common.c:6182 +#: c-common.c:6235 #, gcc-internal-format msgid "" "visibility argument must be one of \"default\", \"hidden\", \"protected\" or " "\"internal\"" msgstr "" -#: c-common.c:6193 +#: c-common.c:6246 #, gcc-internal-format msgid "%qD redeclared with different visibility" msgstr "" -#: c-common.c:6196 c-common.c:6200 +#: c-common.c:6249 c-common.c:6253 #, gcc-internal-format msgid "%qD was declared %qs which implies default visibility" msgstr "" -#: c-common.c:6274 +#: c-common.c:6337 #, gcc-internal-format msgid "tls_model argument not a string" msgstr "" -#: c-common.c:6287 +#: c-common.c:6350 #, gcc-internal-format msgid "" "tls_model argument must be one of \"local-exec\", \"initial-exec\", \"local-" "dynamic\" or \"global-dynamic\"" msgstr "" -#: c-common.c:6306 c-common.c:6396 +#: c-common.c:6369 c-common.c:6459 #, gcc-internal-format msgid "%J%qE attribute applies only to functions" msgstr "" -#: c-common.c:6311 c-common.c:6401 +#: c-common.c:6374 c-common.c:6464 #, gcc-internal-format msgid "%Jcan%'t set %qE attribute after definition" msgstr "" -#: c-common.c:6357 +#: c-common.c:6420 #, gcc-internal-format msgid "alloc_size parameter outside range" msgstr "" -#: c-common.c:6490 +#: c-common.c:6553 #, gcc-internal-format msgid "%qE attribute ignored for %qE" msgstr "" -#: c-common.c:6549 +#: c-common.c:6613 #, gcc-internal-format msgid "invalid vector type for attribute %qE" msgstr "" -#: c-common.c:6555 +#: c-common.c:6619 #, gcc-internal-format msgid "vector size not an integral multiple of component size" msgstr "" -#: c-common.c:6561 +#: c-common.c:6625 #, gcc-internal-format msgid "zero vector size" msgstr "" -#: c-common.c:6569 +#: c-common.c:6633 #, gcc-internal-format msgid "number of components of the vector not a power of two" msgstr "" -#: c-common.c:6597 +#: c-common.c:6661 #, gcc-internal-format msgid "nonnull attribute without arguments on a non-prototype" msgstr "" -#: c-common.c:6612 +#: c-common.c:6676 #, gcc-internal-format msgid "nonnull argument has invalid operand number (argument %lu)" msgstr "" -#: c-common.c:6631 +#: c-common.c:6695 #, gcc-internal-format msgid "" "nonnull argument with out-of-range operand number (argument %lu, operand %lu)" msgstr "" -#: c-common.c:6639 +#: c-common.c:6703 #, gcc-internal-format msgid "" "nonnull argument references non-pointer operand (argument %lu, operand %lu)" msgstr "" -#: c-common.c:6715 +#: c-common.c:6779 #, gcc-internal-format msgid "not enough variable arguments to fit a sentinel" msgstr "" -#: c-common.c:6729 +#: c-common.c:6793 #, gcc-internal-format msgid "missing sentinel in function call" msgstr "" -#: c-common.c:6770 +#: c-common.c:6834 #, gcc-internal-format msgid "null argument where non-null required (argument %lu)" msgstr "" -#: c-common.c:6835 +#: c-common.c:6899 #, gcc-internal-format msgid "cleanup argument not an identifier" msgstr "" -#: c-common.c:6842 +#: c-common.c:6906 #, gcc-internal-format msgid "cleanup argument not a function" msgstr "" -#: c-common.c:6881 +#: c-common.c:6945 #, gcc-internal-format msgid "%qE attribute requires prototypes with named arguments" msgstr "" -#: c-common.c:6892 +#: c-common.c:6956 #, gcc-internal-format msgid "%qE attribute only applies to variadic functions" msgstr "" -#: c-common.c:6904 +#: c-common.c:6968 #, gcc-internal-format msgid "requested position is not an integer constant" msgstr "" -#: c-common.c:6912 +#: c-common.c:6976 #, gcc-internal-format msgid "requested position is less than zero" msgstr "" -#: c-common.c:7036 +#: c-common.c:7100 #, gcc-internal-format msgid "Bad option %s to optimize attribute." msgstr "" -#: c-common.c:7039 +#: c-common.c:7103 #, gcc-internal-format msgid "Bad option %s to pragma attribute" msgstr "" -#: c-common.c:7232 +#: c-common.c:7296 #, gcc-internal-format msgid "not enough arguments to function %qE" msgstr "" -#: c-common.c:7237 c-typeck.c:2540 +#: c-common.c:7301 c-typeck.c:2558 #, gcc-internal-format msgid "too many arguments to function %qE" msgstr "" -#: c-common.c:7267 c-common.c:7313 +#: c-common.c:7331 c-common.c:7377 #, gcc-internal-format msgid "non-floating-point argument in call to function %qE" msgstr "" -#: c-common.c:7290 +#: c-common.c:7354 #, gcc-internal-format msgid "non-floating-point arguments in call to function %qE" msgstr "" -#: c-common.c:7306 +#: c-common.c:7370 #, gcc-internal-format msgid "non-const integer argument %u in call to function %qE" msgstr "" -#: c-common.c:7532 +#: c-common.c:7596 #, gcc-internal-format msgid "" "%Hignoring return value of %qD, declared with attribute warn_unused_result" msgstr "" -#: c-common.c:7536 +#: c-common.c:7600 #, gcc-internal-format msgid "" "%Hignoring return value of function declared with attribute " "warn_unused_result" msgstr "" -#: c-common.c:7590 +#: c-common.c:7654 #, gcc-internal-format msgid "cannot apply %<offsetof%> to static data member %qD" msgstr "" -#: c-common.c:7595 +#: c-common.c:7659 #, gcc-internal-format msgid "cannot apply %<offsetof%> when %<operator[]%> is overloaded" msgstr "" -#: c-common.c:7616 cp/typeck.c:4622 +#: c-common.c:7680 cp/typeck.c:4685 #, gcc-internal-format msgid "attempt to take address of bit-field structure member %qD" msgstr "" -#: c-common.c:7669 +#: c-common.c:7733 #, gcc-internal-format msgid "lvalue required as left operand of assignment" msgstr "" -#: c-common.c:7672 +#: c-common.c:7736 #, gcc-internal-format msgid "lvalue required as increment operand" msgstr "" -#: c-common.c:7675 +#: c-common.c:7739 #, gcc-internal-format msgid "lvalue required as decrement operand" msgstr "" -#: c-common.c:7678 +#: c-common.c:7742 #, gcc-internal-format msgid "lvalue required as unary %<&%> operand" msgstr "" -#: c-common.c:7681 +#: c-common.c:7745 #, gcc-internal-format msgid "lvalue required in asm statement" msgstr "" -#: c-common.c:7803 +#: c-common.c:7874 #, gcc-internal-format msgid "size of array is too large" msgstr "" -#: c-common.c:7839 c-common.c:7888 c-typeck.c:2730 +#: c-common.c:7910 c-common.c:7959 c-typeck.c:2748 #, gcc-internal-format msgid "too few arguments to function %qE" msgstr "" -#: c-common.c:7856 c-typeck.c:4443 +#: c-common.c:7927 c-typeck.c:4461 #, gcc-internal-format msgid "incompatible type for argument %d of %qE" msgstr "" -#: c-common.c:8048 +#: c-common.c:8119 #, gcc-internal-format msgid "array subscript has type %<char%>" msgstr "" -#: c-common.c:8083 +#: c-common.c:8154 #, gcc-internal-format msgid "suggest parentheses around %<+%> inside %<<<%>" msgstr "" -#: c-common.c:8086 +#: c-common.c:8157 #, gcc-internal-format msgid "suggest parentheses around %<-%> inside %<<<%>" msgstr "" -#: c-common.c:8092 +#: c-common.c:8163 #, gcc-internal-format msgid "suggest parentheses around %<+%> inside %<>>%>" msgstr "" -#: c-common.c:8095 +#: c-common.c:8166 #, gcc-internal-format msgid "suggest parentheses around %<-%> inside %<>>%>" msgstr "" -#: c-common.c:8101 +#: c-common.c:8172 #, gcc-internal-format msgid "suggest parentheses around %<&&%> within %<||%>" msgstr "" -#: c-common.c:8110 +#: c-common.c:8181 #, gcc-internal-format msgid "suggest parentheses around arithmetic in operand of %<|%>" msgstr "" -#: c-common.c:8115 +#: c-common.c:8186 #, gcc-internal-format msgid "suggest parentheses around comparison in operand of %<|%>" msgstr "" -#: c-common.c:8119 +#: c-common.c:8190 #, gcc-internal-format msgid "" "suggest parentheses around operand of %<!%> or change %<|%> to %<||%> or %<!%" "> to %<~%>" msgstr "" -#: c-common.c:8129 +#: c-common.c:8200 #, gcc-internal-format msgid "suggest parentheses around arithmetic in operand of %<^%>" msgstr "" -#: c-common.c:8134 +#: c-common.c:8205 #, gcc-internal-format msgid "suggest parentheses around comparison in operand of %<^%>" msgstr "" -#: c-common.c:8140 +#: c-common.c:8211 #, gcc-internal-format msgid "suggest parentheses around %<+%> in operand of %<&%>" msgstr "" -#: c-common.c:8143 +#: c-common.c:8214 #, gcc-internal-format msgid "suggest parentheses around %<-%> in operand of %<&%>" msgstr "" -#: c-common.c:8148 +#: c-common.c:8219 #, gcc-internal-format msgid "suggest parentheses around comparison in operand of %<&%>" msgstr "" -#: c-common.c:8152 +#: c-common.c:8223 #, gcc-internal-format msgid "" "suggest parentheses around operand of %<!%> or change %<&%> to %<&&%> or %<!%" "> to %<~%>" msgstr "" -#: c-common.c:8160 +#: c-common.c:8231 #, gcc-internal-format msgid "suggest parentheses around comparison in operand of %<==%>" msgstr "" -#: c-common.c:8166 +#: c-common.c:8237 #, gcc-internal-format msgid "suggest parentheses around comparison in operand of %<!=%>" msgstr "" -#: c-common.c:8175 +#: c-common.c:8248 #, gcc-internal-format msgid "comparisons like %<X<=Y<=Z%> do not have their mathematical meaning" msgstr "" -#: c-common.c:8190 +#: c-common.c:8263 #, gcc-internal-format msgid "label %q+D defined but not used" msgstr "" -#: c-common.c:8192 +#: c-common.c:8265 #, gcc-internal-format msgid "label %q+D declared but not defined" msgstr "" -#: c-common.c:8212 +#: c-common.c:8285 #, gcc-internal-format msgid "division by zero" msgstr "" -#: c-common.c:8244 +#: c-common.c:8317 #, gcc-internal-format msgid "comparison between types %qT and %qT" msgstr "" -#: c-common.c:8295 +#: c-common.c:8368 #, gcc-internal-format msgid "comparison between signed and unsigned integer expressions" msgstr "" -#: c-common.c:8346 +#: c-common.c:8419 #, gcc-internal-format msgid "promoted ~unsigned is always non-zero" msgstr "" -#: c-common.c:8349 +#: c-common.c:8422 #, gcc-internal-format msgid "comparison of promoted ~unsigned with constant" msgstr "" -#: c-common.c:8359 +#: c-common.c:8432 #, gcc-internal-format msgid "comparison of promoted ~unsigned with unsigned" msgstr "" @@ -18518,8 +18288,8 @@ msgstr "" #. an unprototyped function, it is compile-time undefined; #. making it a constraint in that case was rejected in #. DR#252. -#: c-convert.c:95 c-typeck.c:1783 c-typeck.c:4078 cp/typeck.c:1605 -#: cp/typeck.c:5873 cp/typeck.c:6483 fortran/convert.c:88 +#: c-convert.c:95 c-typeck.c:1796 c-typeck.c:4096 cp/typeck.c:1619 +#: cp/typeck.c:5936 cp/typeck.c:6546 fortran/convert.c:88 #, gcc-internal-format msgid "void value not ignored as it ought to be" msgstr "" @@ -18539,7 +18309,7 @@ msgstr "" msgid "GCC supports only %u nested scopes" msgstr "" -#: c-decl.c:740 cp/decl.c:358 +#: c-decl.c:740 cp/decl.c:357 #, gcc-internal-format msgid "label %q+D used but not defined" msgstr "" @@ -18549,91 +18319,91 @@ msgstr "" msgid "nested function %q+D declared but never defined" msgstr "" -#: c-decl.c:791 +#: c-decl.c:793 #, gcc-internal-format msgid "inline function %q+D declared but never defined" msgstr "" -#: c-decl.c:804 cp/decl.c:603 +#: c-decl.c:808 cp/decl.c:602 #, gcc-internal-format msgid "unused variable %q+D" msgstr "" -#: c-decl.c:808 +#: c-decl.c:812 #, gcc-internal-format msgid "type of array %q+D completed incompatibly with implicit initialization" msgstr "" -#: c-decl.c:1032 +#: c-decl.c:1036 #, gcc-internal-format msgid "" "a parameter list with an ellipsis can%'t match an empty parameter name list " "declaration" msgstr "" -#: c-decl.c:1039 +#: c-decl.c:1043 #, gcc-internal-format msgid "" "an argument type that has a default promotion can%'t match an empty " "parameter name list declaration" msgstr "" -#: c-decl.c:1080 +#: c-decl.c:1084 #, gcc-internal-format msgid "" "prototype for %q+D declares more arguments than previous old-style definition" msgstr "" -#: c-decl.c:1086 +#: c-decl.c:1090 #, gcc-internal-format msgid "" "prototype for %q+D declares fewer arguments than previous old-style " "definition" msgstr "" -#: c-decl.c:1095 +#: c-decl.c:1099 #, gcc-internal-format msgid "prototype for %q+D declares argument %d with incompatible type" msgstr "" #. If we get here, no errors were found, but do issue a warning #. for this poor-style construct. -#: c-decl.c:1108 +#: c-decl.c:1112 #, gcc-internal-format msgid "prototype for %q+D follows non-prototype definition" msgstr "" -#: c-decl.c:1123 +#: c-decl.c:1127 #, gcc-internal-format msgid "previous definition of %q+D was here" msgstr "" -#: c-decl.c:1125 +#: c-decl.c:1129 #, gcc-internal-format msgid "previous implicit declaration of %q+D was here" msgstr "" -#: c-decl.c:1127 +#: c-decl.c:1131 #, gcc-internal-format msgid "previous declaration of %q+D was here" msgstr "" -#: c-decl.c:1167 +#: c-decl.c:1171 #, gcc-internal-format msgid "%q+D redeclared as different kind of symbol" msgstr "" -#: c-decl.c:1171 +#: c-decl.c:1175 #, gcc-internal-format msgid "built-in function %q+D declared as non-function" msgstr "" -#: c-decl.c:1174 c-decl.c:1294 c-decl.c:1960 +#: c-decl.c:1178 c-decl.c:1298 c-decl.c:1964 #, gcc-internal-format msgid "declaration of %q+D shadows a built-in function" msgstr "" -#: c-decl.c:1183 +#: c-decl.c:1187 #, gcc-internal-format msgid "redeclaration of enumerator %q+D" msgstr "" @@ -18641,269 +18411,269 @@ msgstr "" #. If types don't match for a built-in, throw away the #. built-in. No point in calling locate_old_decl here, it #. won't print anything. -#: c-decl.c:1204 +#: c-decl.c:1208 #, gcc-internal-format msgid "conflicting types for built-in function %q+D" msgstr "" -#: c-decl.c:1229 c-decl.c:1242 c-decl.c:1251 +#: c-decl.c:1233 c-decl.c:1246 c-decl.c:1255 #, gcc-internal-format msgid "conflicting types for %q+D" msgstr "" -#: c-decl.c:1249 +#: c-decl.c:1253 #, gcc-internal-format msgid "conflicting type qualifiers for %q+D" msgstr "" #. Allow OLDDECL to continue in use. -#: c-decl.c:1269 +#: c-decl.c:1273 #, gcc-internal-format msgid "redefinition of typedef %q+D" msgstr "" -#: c-decl.c:1320 c-decl.c:1422 +#: c-decl.c:1324 c-decl.c:1426 #, gcc-internal-format msgid "redefinition of %q+D" msgstr "" -#: c-decl.c:1355 c-decl.c:1460 +#: c-decl.c:1359 c-decl.c:1464 #, gcc-internal-format msgid "static declaration of %q+D follows non-static declaration" msgstr "" -#: c-decl.c:1365 c-decl.c:1373 c-decl.c:1450 c-decl.c:1457 +#: c-decl.c:1369 c-decl.c:1377 c-decl.c:1454 c-decl.c:1461 #, gcc-internal-format msgid "non-static declaration of %q+D follows static declaration" msgstr "" -#: c-decl.c:1389 +#: c-decl.c:1393 #, gcc-internal-format msgid "%<gnu_inline%> attribute present on %q+D" msgstr "" -#: c-decl.c:1391 +#: c-decl.c:1395 #, gcc-internal-format msgid "%Jbut not here" msgstr "" -#: c-decl.c:1409 +#: c-decl.c:1413 #, gcc-internal-format msgid "thread-local declaration of %q+D follows non-thread-local declaration" msgstr "" -#: c-decl.c:1412 +#: c-decl.c:1416 #, gcc-internal-format msgid "non-thread-local declaration of %q+D follows thread-local declaration" msgstr "" -#: c-decl.c:1442 +#: c-decl.c:1446 #, gcc-internal-format msgid "extern declaration of %q+D follows declaration with no linkage" msgstr "" -#: c-decl.c:1478 +#: c-decl.c:1482 #, gcc-internal-format msgid "declaration of %q+D with no linkage follows extern declaration" msgstr "" -#: c-decl.c:1484 +#: c-decl.c:1488 #, gcc-internal-format msgid "redeclaration of %q+D with no linkage" msgstr "" -#: c-decl.c:1498 +#: c-decl.c:1502 #, gcc-internal-format msgid "" "redeclaration of %q+D with different visibility (old visibility preserved)" msgstr "" -#: c-decl.c:1509 +#: c-decl.c:1513 #, gcc-internal-format msgid "inline declaration of %qD follows declaration with attribute noinline" msgstr "" -#: c-decl.c:1516 +#: c-decl.c:1520 #, gcc-internal-format msgid "declaration of %q+D with attribute noinline follows inline declaration " msgstr "" -#: c-decl.c:1534 +#: c-decl.c:1538 #, gcc-internal-format msgid "redefinition of parameter %q+D" msgstr "" -#: c-decl.c:1561 +#: c-decl.c:1565 #, gcc-internal-format msgid "redundant redeclaration of %q+D" msgstr "" -#: c-decl.c:1947 +#: c-decl.c:1951 #, gcc-internal-format msgid "declaration of %q+D shadows previous non-variable" msgstr "" -#: c-decl.c:1952 +#: c-decl.c:1956 #, gcc-internal-format msgid "declaration of %q+D shadows a parameter" msgstr "" -#: c-decl.c:1955 +#: c-decl.c:1959 #, gcc-internal-format msgid "declaration of %q+D shadows a global declaration" msgstr "" -#: c-decl.c:1965 +#: c-decl.c:1969 #, gcc-internal-format msgid "declaration of %q+D shadows a previous local" msgstr "" -#: c-decl.c:1968 cp/name-lookup.c:1037 cp/name-lookup.c:1068 -#: cp/name-lookup.c:1076 +#: c-decl.c:1972 cp/name-lookup.c:1041 cp/name-lookup.c:1072 +#: cp/name-lookup.c:1080 #, gcc-internal-format msgid "%Jshadowed declaration is here" msgstr "" -#: c-decl.c:2160 +#: c-decl.c:2164 #, gcc-internal-format msgid "nested extern declaration of %qD" msgstr "" -#: c-decl.c:2326 c-decl.c:2329 +#: c-decl.c:2330 c-decl.c:2333 #, gcc-internal-format msgid "implicit declaration of function %qE" msgstr "" -#: c-decl.c:2391 +#: c-decl.c:2395 #, gcc-internal-format msgid "incompatible implicit declaration of built-in function %qD" msgstr "" -#: c-decl.c:2400 +#: c-decl.c:2404 #, gcc-internal-format msgid "incompatible implicit declaration of function %qD" msgstr "" -#: c-decl.c:2453 +#: c-decl.c:2457 #, gcc-internal-format msgid "%H%qE undeclared here (not in a function)" msgstr "" -#: c-decl.c:2458 +#: c-decl.c:2462 #, gcc-internal-format msgid "%H%qE undeclared (first use in this function)" msgstr "" -#: c-decl.c:2462 +#: c-decl.c:2466 #, gcc-internal-format msgid "%H(Each undeclared identifier is reported only once" msgstr "" -#: c-decl.c:2463 +#: c-decl.c:2467 #, gcc-internal-format msgid "%Hfor each function it appears in.)" msgstr "" -#: c-decl.c:2501 cp/decl.c:2404 +#: c-decl.c:2505 cp/decl.c:2417 #, gcc-internal-format msgid "label %qE referenced outside of any function" msgstr "" -#: c-decl.c:2543 +#: c-decl.c:2547 #, gcc-internal-format msgid "duplicate label declaration %qE" msgstr "" -#: c-decl.c:2579 +#: c-decl.c:2583 #, gcc-internal-format msgid "%Hduplicate label %qD" msgstr "" -#: c-decl.c:2589 +#: c-decl.c:2593 #, gcc-internal-format msgid "%Jjump into statement expression" msgstr "" -#: c-decl.c:2591 +#: c-decl.c:2595 #, gcc-internal-format msgid "%Jjump into scope of identifier with variably modified type" msgstr "" -#: c-decl.c:2606 +#: c-decl.c:2610 #, gcc-internal-format msgid "" "%Htraditional C lacks a separate namespace for labels, identifier %qE " "conflicts" msgstr "" -#: c-decl.c:2681 +#: c-decl.c:2685 #, gcc-internal-format msgid "%H%qE defined as wrong kind of tag" msgstr "" -#: c-decl.c:2904 +#: c-decl.c:2908 #, gcc-internal-format msgid "unnamed struct/union that defines no instances" msgstr "" -#: c-decl.c:2913 +#: c-decl.c:2917 #, gcc-internal-format msgid "empty declaration with storage class specifier does not redeclare tag" msgstr "" -#: c-decl.c:2925 +#: c-decl.c:2929 #, gcc-internal-format msgid "empty declaration with type qualifier does not redeclare tag" msgstr "" -#: c-decl.c:2947 c-decl.c:2954 +#: c-decl.c:2951 c-decl.c:2958 #, gcc-internal-format msgid "useless type name in empty declaration" msgstr "" -#: c-decl.c:2962 +#: c-decl.c:2966 #, gcc-internal-format msgid "%<inline%> in empty declaration" msgstr "" -#: c-decl.c:2968 +#: c-decl.c:2972 #, gcc-internal-format msgid "%<auto%> in file-scope empty declaration" msgstr "" -#: c-decl.c:2974 +#: c-decl.c:2978 #, gcc-internal-format msgid "%<register%> in file-scope empty declaration" msgstr "" -#: c-decl.c:2980 +#: c-decl.c:2984 #, gcc-internal-format msgid "useless storage class specifier in empty declaration" msgstr "" -#: c-decl.c:2986 +#: c-decl.c:2990 #, gcc-internal-format msgid "useless %<__thread%> in empty declaration" msgstr "" -#: c-decl.c:2994 +#: c-decl.c:2998 #, gcc-internal-format msgid "useless type qualifier in empty declaration" msgstr "" -#: c-decl.c:3001 c-parser.c:1170 +#: c-decl.c:3005 c-parser.c:1170 #, gcc-internal-format msgid "empty declaration" msgstr "" -#: c-decl.c:3068 +#: c-decl.c:3072 #, gcc-internal-format msgid "" "ISO C90 does not support %<static%> or type qualifiers in parameter array " "declarators" msgstr "" -#: c-decl.c:3072 +#: c-decl.c:3076 #, gcc-internal-format msgid "ISO C90 does not support %<[*]%> array declarators" msgstr "" @@ -18911,248 +18681,248 @@ msgstr "" #. C99 6.7.5.2p4 #. A function definition isn't function prototype scope C99 6.2.1p4. #. C99 6.7.5.2p4 -#: c-decl.c:3079 c-decl.c:5006 +#: c-decl.c:3083 c-decl.c:5024 #, gcc-internal-format msgid "%<[*]%> not allowed in other than function prototype scope" msgstr "" -#: c-decl.c:3181 +#: c-decl.c:3185 #, gcc-internal-format msgid "%q+D is usually a function" msgstr "" -#: c-decl.c:3190 cp/decl2.c:776 +#: c-decl.c:3194 cp/decl2.c:781 #, gcc-internal-format msgid "typedef %qD is initialized (use __typeof__ instead)" msgstr "" -#: c-decl.c:3195 +#: c-decl.c:3199 #, gcc-internal-format msgid "function %qD is initialized like a variable" msgstr "" #. DECL_INITIAL in a PARM_DECL is really DECL_ARG_TYPE. -#: c-decl.c:3201 +#: c-decl.c:3205 #, gcc-internal-format msgid "parameter %qD is initialized" msgstr "" -#: c-decl.c:3226 +#: c-decl.c:3230 #, gcc-internal-format msgid "variable %qD has initializer but incomplete type" msgstr "" -#: c-decl.c:3315 c-decl.c:6116 cp/decl.c:4086 cp/decl.c:11420 +#: c-decl.c:3319 c-decl.c:6138 cp/decl.c:4114 cp/decl.c:11484 #, gcc-internal-format msgid "inline function %q+D given attribute noinline" msgstr "" -#: c-decl.c:3328 +#: c-decl.c:3332 #, gcc-internal-format msgid "%q+D is static but declared in inline function %qD which is not static" msgstr "" -#: c-decl.c:3419 +#: c-decl.c:3423 #, gcc-internal-format msgid "initializer fails to determine size of %q+D" msgstr "" -#: c-decl.c:3424 +#: c-decl.c:3428 #, gcc-internal-format msgid "array size missing in %q+D" msgstr "" -#: c-decl.c:3436 +#: c-decl.c:3440 #, gcc-internal-format msgid "zero or negative size array %q+D" msgstr "" -#: c-decl.c:3491 varasm.c:2111 +#: c-decl.c:3495 varasm.c:2111 #, gcc-internal-format msgid "storage size of %q+D isn%'t known" msgstr "" -#: c-decl.c:3502 +#: c-decl.c:3506 #, gcc-internal-format msgid "storage size of %q+D isn%'t constant" msgstr "" -#: c-decl.c:3549 +#: c-decl.c:3553 #, gcc-internal-format msgid "ignoring asm-specifier for non-static local variable %q+D" msgstr "" -#: c-decl.c:3577 fortran/f95-lang.c:624 +#: c-decl.c:3581 fortran/f95-lang.c:624 #, gcc-internal-format msgid "cannot put object with volatile field into register" msgstr "" -#: c-decl.c:3703 +#: c-decl.c:3707 #, gcc-internal-format msgid "ISO C forbids forward parameter declarations" msgstr "" -#: c-decl.c:3822 +#: c-decl.c:3826 #, gcc-internal-format msgid "bit-field %qs width not an integer constant" msgstr "" -#: c-decl.c:3830 +#: c-decl.c:3834 #, gcc-internal-format msgid "negative width in bit-field %qs" msgstr "" -#: c-decl.c:3835 +#: c-decl.c:3839 #, gcc-internal-format msgid "zero width for bit-field %qs" msgstr "" -#: c-decl.c:3845 +#: c-decl.c:3849 #, gcc-internal-format msgid "bit-field %qs has invalid type" msgstr "" -#: c-decl.c:3855 +#: c-decl.c:3859 #, gcc-internal-format msgid "type of bit-field %qs is a GCC extension" msgstr "" -#: c-decl.c:3861 +#: c-decl.c:3865 #, gcc-internal-format msgid "width of %qs exceeds its type" msgstr "" -#: c-decl.c:3874 +#: c-decl.c:3878 #, gcc-internal-format msgid "%qs is narrower than values of its type" msgstr "" -#: c-decl.c:3892 +#: c-decl.c:3896 #, gcc-internal-format msgid "ISO C90 forbids array %qs whose size can%'t be evaluated" msgstr "" -#: c-decl.c:3896 +#: c-decl.c:3900 #, gcc-internal-format msgid "ISO C90 forbids array whose size can%'t be evaluated" msgstr "" -#: c-decl.c:3902 +#: c-decl.c:3906 #, gcc-internal-format msgid "ISO C90 forbids variable length array %qs" msgstr "" -#: c-decl.c:3905 +#: c-decl.c:3909 #, gcc-internal-format msgid "ISO C90 forbids variable length array" msgstr "" -#: c-decl.c:3914 +#: c-decl.c:3918 #, gcc-internal-format msgid "the size of array %qs can%'t be evaluated" msgstr "" -#: c-decl.c:3918 +#: c-decl.c:3922 #, gcc-internal-format msgid "the size of array can %'t be evaluated" msgstr "" -#: c-decl.c:3924 +#: c-decl.c:3928 #, gcc-internal-format msgid "variable length array %qs is used" msgstr "" -#: c-decl.c:3928 cp/decl.c:7220 +#: c-decl.c:3932 cp/decl.c:7274 #, gcc-internal-format msgid "variable length array is used" msgstr "" -#: c-decl.c:4050 c-decl.c:4331 +#: c-decl.c:4054 c-decl.c:4335 #, gcc-internal-format msgid "variably modified %qs at file scope" msgstr "" -#: c-decl.c:4068 +#: c-decl.c:4072 #, gcc-internal-format msgid "type defaults to %<int%> in declaration of %qs" msgstr "" -#: c-decl.c:4096 +#: c-decl.c:4100 #, gcc-internal-format msgid "duplicate %<const%>" msgstr "" -#: c-decl.c:4098 +#: c-decl.c:4102 #, gcc-internal-format msgid "duplicate %<restrict%>" msgstr "" -#: c-decl.c:4100 +#: c-decl.c:4104 #, gcc-internal-format msgid "duplicate %<volatile%>" msgstr "" -#: c-decl.c:4120 +#: c-decl.c:4124 #, gcc-internal-format msgid "function definition declared %<auto%>" msgstr "" -#: c-decl.c:4122 +#: c-decl.c:4126 #, gcc-internal-format msgid "function definition declared %<register%>" msgstr "" -#: c-decl.c:4124 +#: c-decl.c:4128 #, gcc-internal-format msgid "function definition declared %<typedef%>" msgstr "" -#: c-decl.c:4126 +#: c-decl.c:4130 #, gcc-internal-format msgid "function definition declared %<__thread%>" msgstr "" -#: c-decl.c:4142 +#: c-decl.c:4146 #, gcc-internal-format msgid "storage class specified for structure field %qs" msgstr "" -#: c-decl.c:4146 cp/decl.c:8113 +#: c-decl.c:4150 cp/decl.c:8169 #, gcc-internal-format msgid "storage class specified for parameter %qs" msgstr "" -#: c-decl.c:4149 cp/decl.c:8115 +#: c-decl.c:4153 cp/decl.c:8171 #, gcc-internal-format msgid "storage class specified for typename" msgstr "" -#: c-decl.c:4166 cp/decl.c:9393 +#: c-decl.c:4170 cp/decl.c:9450 #, gcc-internal-format msgid "%qs initialized and declared %<extern%>" msgstr "" -#: c-decl.c:4169 cp/decl.c:9397 +#: c-decl.c:4173 cp/decl.c:9454 #, gcc-internal-format msgid "%qs has both %<extern%> and initializer" msgstr "" -#: c-decl.c:4174 +#: c-decl.c:4178 #, gcc-internal-format msgid "file-scope declaration of %qs specifies %<auto%>" msgstr "" -#: c-decl.c:4177 +#: c-decl.c:4181 #, gcc-internal-format msgid "file-scope declaration of %qs specifies %<register%>" msgstr "" -#: c-decl.c:4182 cp/decl.c:8126 +#: c-decl.c:4186 cp/decl.c:8182 #, gcc-internal-format msgid "nested function %qs declared %<extern%>" msgstr "" -#: c-decl.c:4185 cp/decl.c:8136 +#: c-decl.c:4189 cp/decl.c:8192 #, gcc-internal-format msgid "function-scope %qs implicitly auto and declared %<__thread%>" msgstr "" @@ -19160,474 +18930,474 @@ msgstr "" #. Only the innermost declarator (making a parameter be of #. array type which is converted to pointer type) #. may have static or type qualifiers. -#: c-decl.c:4232 c-decl.c:4476 +#: c-decl.c:4236 c-decl.c:4494 #, gcc-internal-format msgid "static or type qualifiers in non-parameter array declarator" msgstr "" -#: c-decl.c:4279 +#: c-decl.c:4283 #, gcc-internal-format msgid "declaration of %qs as array of voids" msgstr "" -#: c-decl.c:4285 +#: c-decl.c:4289 #, gcc-internal-format msgid "declaration of %qs as array of functions" msgstr "" -#: c-decl.c:4291 +#: c-decl.c:4295 #, gcc-internal-format msgid "invalid use of structure with flexible array member" msgstr "" -#: c-decl.c:4311 +#: c-decl.c:4315 #, gcc-internal-format msgid "size of array %qs has non-integer type" msgstr "" -#: c-decl.c:4317 +#: c-decl.c:4321 #, gcc-internal-format msgid "ISO C forbids zero-size array %qs" msgstr "" -#: c-decl.c:4324 +#: c-decl.c:4328 #, gcc-internal-format msgid "size of array %qs is negative" msgstr "" -#: c-decl.c:4378 c-decl.c:4637 cp/decl.c:8642 +#: c-decl.c:4382 c-decl.c:4655 cp/decl.c:8694 #, gcc-internal-format msgid "size of array %qs is too large" msgstr "" -#: c-decl.c:4390 +#: c-decl.c:4410 #, gcc-internal-format msgid "ISO C90 does not support flexible array members" msgstr "" #. C99 6.7.5.2p4 -#: c-decl.c:4403 c-parser.c:4957 +#: c-decl.c:4431 #, gcc-internal-format -msgid "%<[*]%> not allowed in other than a declaration" +msgid "%<[*]%> not in a declaration" msgstr "" -#: c-decl.c:4426 +#: c-decl.c:4444 #, gcc-internal-format msgid "array type has incomplete element type" msgstr "" -#: c-decl.c:4508 cp/decl.c:8231 +#: c-decl.c:4526 cp/decl.c:8288 #, gcc-internal-format msgid "%qs declared as function returning a function" msgstr "" -#: c-decl.c:4513 cp/decl.c:8236 +#: c-decl.c:4531 cp/decl.c:8293 #, gcc-internal-format msgid "%qs declared as function returning an array" msgstr "" -#: c-decl.c:4536 +#: c-decl.c:4554 #, gcc-internal-format msgid "function definition has qualified void return type" msgstr "" -#: c-decl.c:4539 cp/decl.c:8220 +#: c-decl.c:4557 cp/decl.c:8277 #, gcc-internal-format msgid "type qualifiers ignored on function return type" msgstr "" -#: c-decl.c:4569 c-decl.c:4651 c-decl.c:4741 c-decl.c:4830 +#: c-decl.c:4587 c-decl.c:4669 c-decl.c:4759 c-decl.c:4848 #, gcc-internal-format msgid "ISO C forbids qualified function types" msgstr "" -#: c-decl.c:4659 +#: c-decl.c:4677 #, gcc-internal-format msgid "typedef %q+D declared %<inline%>" msgstr "" -#: c-decl.c:4675 +#: c-decl.c:4693 #, gcc-internal-format msgid "ISO C forbids const or volatile function types" msgstr "" -#: c-decl.c:4686 +#: c-decl.c:4704 #, gcc-internal-format msgid "a member of a structure or union cannot have a variably modified type" msgstr "" -#: c-decl.c:4702 +#: c-decl.c:4720 #, gcc-internal-format msgid "variable or field %qs declared void" msgstr "" -#: c-decl.c:4733 +#: c-decl.c:4751 #, gcc-internal-format msgid "attributes in parameter array declarator ignored" msgstr "" -#: c-decl.c:4767 +#: c-decl.c:4785 #, gcc-internal-format msgid "parameter %q+D declared %<inline%>" msgstr "" -#: c-decl.c:4780 +#: c-decl.c:4798 #, gcc-internal-format msgid "field %qs declared as a function" msgstr "" -#: c-decl.c:4786 +#: c-decl.c:4804 #, gcc-internal-format msgid "field %qs has incomplete type" msgstr "" -#: c-decl.c:4803 c-decl.c:4813 c-decl.c:4816 +#: c-decl.c:4821 c-decl.c:4831 c-decl.c:4834 #, gcc-internal-format msgid "invalid storage class for function %qs" msgstr "" -#: c-decl.c:4836 +#: c-decl.c:4854 #, gcc-internal-format msgid "%<noreturn%> function returns non-void value" msgstr "" -#: c-decl.c:4872 +#: c-decl.c:4890 #, gcc-internal-format msgid "cannot inline function %<main%>" msgstr "" -#: c-decl.c:4901 +#: c-decl.c:4919 #, gcc-internal-format msgid "variable previously declared %<static%> redeclared %<extern%>" msgstr "" -#: c-decl.c:4911 +#: c-decl.c:4929 #, gcc-internal-format msgid "variable %q+D declared %<inline%>" msgstr "" #. C99 6.7.5.2p2 -#: c-decl.c:4942 +#: c-decl.c:4960 #, gcc-internal-format msgid "object with variably modified type must have no linkage" msgstr "" -#: c-decl.c:5011 c-decl.c:6210 +#: c-decl.c:5029 c-decl.c:6232 #, gcc-internal-format msgid "function declaration isn%'t a prototype" msgstr "" -#: c-decl.c:5019 +#: c-decl.c:5037 #, gcc-internal-format msgid "parameter names (without types) in function declaration" msgstr "" -#: c-decl.c:5052 +#: c-decl.c:5070 #, gcc-internal-format msgid "parameter %u (%q+D) has incomplete type" msgstr "" -#: c-decl.c:5055 +#: c-decl.c:5073 #, gcc-internal-format msgid "%Jparameter %u has incomplete type" msgstr "" -#: c-decl.c:5064 +#: c-decl.c:5082 #, gcc-internal-format msgid "parameter %u (%q+D) has void type" msgstr "" -#: c-decl.c:5067 +#: c-decl.c:5085 #, gcc-internal-format msgid "%Jparameter %u has void type" msgstr "" -#: c-decl.c:5129 +#: c-decl.c:5147 #, gcc-internal-format msgid "%<void%> as only parameter may not be qualified" msgstr "" -#: c-decl.c:5133 c-decl.c:5167 +#: c-decl.c:5151 c-decl.c:5185 #, gcc-internal-format msgid "%<void%> must be the only parameter" msgstr "" -#: c-decl.c:5161 +#: c-decl.c:5179 #, gcc-internal-format msgid "parameter %q+D has just a forward declaration" msgstr "" #. The %s will be one of 'struct', 'union', or 'enum'. -#: c-decl.c:5206 +#: c-decl.c:5224 #, gcc-internal-format msgid "%<%s %E%> declared inside parameter list" msgstr "" #. The %s will be one of 'struct', 'union', or 'enum'. -#: c-decl.c:5210 +#: c-decl.c:5228 #, gcc-internal-format msgid "anonymous %s declared inside parameter list" msgstr "" -#: c-decl.c:5215 +#: c-decl.c:5233 #, gcc-internal-format msgid "" "its scope is only this definition or declaration, which is probably not what " "you want" msgstr "" -#: c-decl.c:5349 +#: c-decl.c:5367 #, gcc-internal-format msgid "redefinition of %<union %E%>" msgstr "" -#: c-decl.c:5351 +#: c-decl.c:5369 #, gcc-internal-format msgid "redefinition of %<struct %E%>" msgstr "" -#: c-decl.c:5356 +#: c-decl.c:5376 #, gcc-internal-format msgid "nested redefinition of %<union %E%>" msgstr "" -#: c-decl.c:5358 +#: c-decl.c:5378 #, gcc-internal-format msgid "nested redefinition of %<struct %E%>" msgstr "" -#: c-decl.c:5436 cp/decl.c:3824 +#: c-decl.c:5456 cp/decl.c:3852 #, gcc-internal-format msgid "declaration does not declare anything" msgstr "" -#: c-decl.c:5439 +#: c-decl.c:5459 #, gcc-internal-format msgid "ISO C doesn%'t support unnamed structs/unions" msgstr "" -#: c-decl.c:5483 c-decl.c:5499 +#: c-decl.c:5503 c-decl.c:5519 #, gcc-internal-format msgid "duplicate member %q+D" msgstr "" -#: c-decl.c:5538 +#: c-decl.c:5558 #, gcc-internal-format msgid "union has no named members" msgstr "" -#: c-decl.c:5540 +#: c-decl.c:5560 #, gcc-internal-format msgid "union has no members" msgstr "" -#: c-decl.c:5545 +#: c-decl.c:5565 #, gcc-internal-format msgid "struct has no named members" msgstr "" -#: c-decl.c:5547 +#: c-decl.c:5567 #, gcc-internal-format msgid "struct has no members" msgstr "" -#: c-decl.c:5609 +#: c-decl.c:5631 #, gcc-internal-format msgid "%Jflexible array member in union" msgstr "" -#: c-decl.c:5614 +#: c-decl.c:5636 #, gcc-internal-format msgid "%Jflexible array member not at end of struct" msgstr "" -#: c-decl.c:5619 +#: c-decl.c:5641 #, gcc-internal-format msgid "%Jflexible array member in otherwise empty struct" msgstr "" -#: c-decl.c:5627 +#: c-decl.c:5649 #, gcc-internal-format msgid "%Jinvalid use of structure with flexible array member" msgstr "" -#: c-decl.c:5736 +#: c-decl.c:5758 #, gcc-internal-format msgid "union cannot be made transparent" msgstr "" -#: c-decl.c:5807 +#: c-decl.c:5829 #, gcc-internal-format msgid "nested redefinition of %<enum %E%>" msgstr "" #. This enum is a named one that has been declared already. -#: c-decl.c:5814 +#: c-decl.c:5836 #, gcc-internal-format msgid "redeclaration of %<enum %E%>" msgstr "" -#: c-decl.c:5877 +#: c-decl.c:5899 #, gcc-internal-format msgid "enumeration values exceed range of largest integer" msgstr "" -#: c-decl.c:5894 +#: c-decl.c:5916 #, gcc-internal-format msgid "specified mode too small for enumeral values" msgstr "" -#: c-decl.c:5991 +#: c-decl.c:6013 #, gcc-internal-format msgid "enumerator value for %qE is not an integer constant" msgstr "" -#: c-decl.c:6008 +#: c-decl.c:6030 #, gcc-internal-format msgid "overflow in enumeration values" msgstr "" -#: c-decl.c:6016 +#: c-decl.c:6038 #, gcc-internal-format msgid "ISO C restricts enumerator values to range of %<int%>" msgstr "" -#: c-decl.c:6134 +#: c-decl.c:6156 #, gcc-internal-format msgid "return type is an incomplete type" msgstr "" -#: c-decl.c:6144 +#: c-decl.c:6166 #, gcc-internal-format msgid "return type defaults to %<int%>" msgstr "" -#: c-decl.c:6217 +#: c-decl.c:6239 #, gcc-internal-format msgid "no previous prototype for %q+D" msgstr "" -#: c-decl.c:6226 +#: c-decl.c:6248 #, gcc-internal-format msgid "%q+D was used with no prototype before its definition" msgstr "" -#: c-decl.c:6232 cp/decl.c:11561 +#: c-decl.c:6254 cp/decl.c:11625 #, gcc-internal-format msgid "no previous declaration for %q+D" msgstr "" -#: c-decl.c:6242 +#: c-decl.c:6264 #, gcc-internal-format msgid "%q+D was used with no declaration before its definition" msgstr "" -#: c-decl.c:6265 +#: c-decl.c:6287 #, gcc-internal-format msgid "return type of %q+D is not %<int%>" msgstr "" -#: c-decl.c:6270 +#: c-decl.c:6292 #, gcc-internal-format msgid "%q+D is normally a non-static function" msgstr "" -#: c-decl.c:6304 +#: c-decl.c:6326 #, gcc-internal-format msgid "%Jold-style parameter declarations in prototyped function definition" msgstr "" -#: c-decl.c:6318 +#: c-decl.c:6340 #, gcc-internal-format msgid "%Jtraditional C rejects ISO C style function definitions" msgstr "" -#: c-decl.c:6334 +#: c-decl.c:6356 #, gcc-internal-format msgid "%Jparameter name omitted" msgstr "" -#: c-decl.c:6368 +#: c-decl.c:6390 #, gcc-internal-format msgid "%Jold-style function definition" msgstr "" -#: c-decl.c:6377 +#: c-decl.c:6399 #, gcc-internal-format msgid "%Jparameter name missing from parameter list" msgstr "" -#: c-decl.c:6388 +#: c-decl.c:6410 #, gcc-internal-format msgid "%q+D declared as a non-parameter" msgstr "" -#: c-decl.c:6393 +#: c-decl.c:6415 #, gcc-internal-format msgid "multiple parameters named %q+D" msgstr "" -#: c-decl.c:6401 +#: c-decl.c:6423 #, gcc-internal-format msgid "parameter %q+D declared with void type" msgstr "" -#: c-decl.c:6418 c-decl.c:6420 +#: c-decl.c:6440 c-decl.c:6442 #, gcc-internal-format msgid "type of %q+D defaults to %<int%>" msgstr "" -#: c-decl.c:6439 +#: c-decl.c:6461 #, gcc-internal-format msgid "parameter %q+D has incomplete type" msgstr "" -#: c-decl.c:6445 +#: c-decl.c:6467 #, gcc-internal-format msgid "declaration for parameter %q+D but no such parameter" msgstr "" -#: c-decl.c:6495 +#: c-decl.c:6517 #, gcc-internal-format msgid "number of arguments doesn%'t match built-in prototype" msgstr "" -#: c-decl.c:6499 +#: c-decl.c:6521 #, gcc-internal-format msgid "number of arguments doesn%'t match prototype" msgstr "" -#: c-decl.c:6500 c-decl.c:6552 +#: c-decl.c:6522 c-decl.c:6574 #, gcc-internal-format msgid "%Hprototype declaration" msgstr "" -#: c-decl.c:6534 +#: c-decl.c:6556 #, gcc-internal-format msgid "promoted argument %qD doesn%'t match built-in prototype" msgstr "" -#: c-decl.c:6538 +#: c-decl.c:6560 #, gcc-internal-format msgid "promoted argument %qD doesn%'t match prototype" msgstr "" -#: c-decl.c:6541 +#: c-decl.c:6563 #, gcc-internal-format msgid "prototype declaration" msgstr "" -#: c-decl.c:6547 +#: c-decl.c:6569 #, gcc-internal-format msgid "argument %qD doesn%'t match built-in prototype" msgstr "" -#: c-decl.c:6551 +#: c-decl.c:6573 #, gcc-internal-format msgid "argument %qD doesn%'t match prototype" msgstr "" -#: c-decl.c:6760 cp/decl.c:12260 +#: c-decl.c:6782 cp/decl.c:12329 #, gcc-internal-format msgid "no return statement in function returning non-void" msgstr "" @@ -19635,443 +19405,443 @@ msgstr "" #. If we get here, declarations have been used in a for loop without #. the C99 for loop scope. This doesn't make much sense, so don't #. allow it. -#: c-decl.c:6833 +#: c-decl.c:6855 #, gcc-internal-format msgid "%<for%> loop initial declarations are only allowed in C99 mode" msgstr "" -#: c-decl.c:6837 +#: c-decl.c:6859 #, gcc-internal-format msgid "use option -std=c99 or -std=gnu99 to compile your code" msgstr "" -#: c-decl.c:6868 +#: c-decl.c:6890 #, gcc-internal-format msgid "declaration of static variable %q+D in %<for%> loop initial declaration" msgstr "" -#: c-decl.c:6871 +#: c-decl.c:6893 #, gcc-internal-format msgid "" "declaration of %<extern%> variable %q+D in %<for%> loop initial declaration" msgstr "" -#: c-decl.c:6876 +#: c-decl.c:6898 #, gcc-internal-format msgid "%<struct %E%> declared in %<for%> loop initial declaration" msgstr "" -#: c-decl.c:6880 +#: c-decl.c:6902 #, gcc-internal-format msgid "%<union %E%> declared in %<for%> loop initial declaration" msgstr "" -#: c-decl.c:6884 +#: c-decl.c:6906 #, gcc-internal-format msgid "%<enum %E%> declared in %<for%> loop initial declaration" msgstr "" -#: c-decl.c:6888 +#: c-decl.c:6910 #, gcc-internal-format msgid "declaration of non-variable %q+D in %<for%> loop initial declaration" msgstr "" -#: c-decl.c:7171 c-decl.c:7413 c-decl.c:7709 +#: c-decl.c:7193 c-decl.c:7435 c-decl.c:7731 #, gcc-internal-format msgid "duplicate %qE" msgstr "" -#: c-decl.c:7196 c-decl.c:7423 c-decl.c:7610 +#: c-decl.c:7218 c-decl.c:7445 c-decl.c:7632 #, gcc-internal-format msgid "two or more data types in declaration specifiers" msgstr "" -#: c-decl.c:7208 +#: c-decl.c:7230 #, gcc-internal-format msgid "%<long long long%> is too long for GCC" msgstr "" -#: c-decl.c:7215 c-decl.c:7513 +#: c-decl.c:7237 c-decl.c:7535 #, gcc-internal-format msgid "both %<long long%> and %<double%> in declaration specifiers" msgstr "" -#: c-decl.c:7220 +#: c-decl.c:7242 #, gcc-internal-format msgid "ISO C90 does not support %<long long%>" msgstr "" -#: c-decl.c:7225 c-decl.c:7254 +#: c-decl.c:7247 c-decl.c:7276 #, gcc-internal-format msgid "both %<long%> and %<short%> in declaration specifiers" msgstr "" -#: c-decl.c:7228 c-decl.c:7430 +#: c-decl.c:7250 c-decl.c:7452 #, gcc-internal-format msgid "both %<long%> and %<void%> in declaration specifiers" msgstr "" -#: c-decl.c:7231 c-decl.c:7452 +#: c-decl.c:7253 c-decl.c:7474 #, gcc-internal-format msgid "both %<long%> and %<_Bool%> in declaration specifiers" msgstr "" -#: c-decl.c:7234 c-decl.c:7474 +#: c-decl.c:7256 c-decl.c:7496 #, gcc-internal-format msgid "both %<long%> and %<char%> in declaration specifiers" msgstr "" -#: c-decl.c:7237 c-decl.c:7494 +#: c-decl.c:7259 c-decl.c:7516 #, gcc-internal-format msgid "both %<long%> and %<float%> in declaration specifiers" msgstr "" -#: c-decl.c:7240 +#: c-decl.c:7262 #, gcc-internal-format msgid "both %<long%> and %<_Decimal32%> in declaration specifiers" msgstr "" -#: c-decl.c:7243 +#: c-decl.c:7265 #, gcc-internal-format msgid "both %<long%> and %<_Decimal64%> in declaration specifiers" msgstr "" -#: c-decl.c:7246 +#: c-decl.c:7268 #, gcc-internal-format msgid "both %<long%> and %<_Decimal128%> in declaration specifiers" msgstr "" -#: c-decl.c:7257 c-decl.c:7433 +#: c-decl.c:7279 c-decl.c:7455 #, gcc-internal-format msgid "both %<short%> and %<void%> in declaration specifiers" msgstr "" -#: c-decl.c:7260 c-decl.c:7455 +#: c-decl.c:7282 c-decl.c:7477 #, gcc-internal-format msgid "both %<short%> and %<_Bool%> in declaration specifiers" msgstr "" -#: c-decl.c:7263 c-decl.c:7477 +#: c-decl.c:7285 c-decl.c:7499 #, gcc-internal-format msgid "both %<short%> and %<char%> in declaration specifiers" msgstr "" -#: c-decl.c:7266 c-decl.c:7497 +#: c-decl.c:7288 c-decl.c:7519 #, gcc-internal-format msgid "both %<short%> and %<float%> in declaration specifiers" msgstr "" -#: c-decl.c:7269 c-decl.c:7516 +#: c-decl.c:7291 c-decl.c:7538 #, gcc-internal-format msgid "both %<short%> and %<double%> in declaration specifiers" msgstr "" -#: c-decl.c:7272 +#: c-decl.c:7294 #, gcc-internal-format msgid "both %<short%> and %<_Decimal32%> in declaration specifiers" msgstr "" -#: c-decl.c:7275 +#: c-decl.c:7297 #, gcc-internal-format msgid "both %<short%> and %<_Decimal64%> in declaration specifiers" msgstr "" -#: c-decl.c:7278 +#: c-decl.c:7300 #, gcc-internal-format msgid "both %<short%> and %<_Decimal128%> in declaration specifiers" msgstr "" -#: c-decl.c:7286 c-decl.c:7315 +#: c-decl.c:7308 c-decl.c:7337 #, gcc-internal-format msgid "both %<signed%> and %<unsigned%> in declaration specifiers" msgstr "" -#: c-decl.c:7289 c-decl.c:7436 +#: c-decl.c:7311 c-decl.c:7458 #, gcc-internal-format msgid "both %<signed%> and %<void%> in declaration specifiers" msgstr "" -#: c-decl.c:7292 c-decl.c:7458 +#: c-decl.c:7314 c-decl.c:7480 #, gcc-internal-format msgid "both %<signed%> and %<_Bool%> in declaration specifiers" msgstr "" -#: c-decl.c:7295 c-decl.c:7500 +#: c-decl.c:7317 c-decl.c:7522 #, gcc-internal-format msgid "both %<signed%> and %<float%> in declaration specifiers" msgstr "" -#: c-decl.c:7298 c-decl.c:7519 +#: c-decl.c:7320 c-decl.c:7541 #, gcc-internal-format msgid "both %<signed%> and %<double%> in declaration specifiers" msgstr "" -#: c-decl.c:7301 +#: c-decl.c:7323 #, gcc-internal-format msgid "both %<signed%> and %<_Decimal32%> in declaration specifiers" msgstr "" -#: c-decl.c:7304 +#: c-decl.c:7326 #, gcc-internal-format msgid "both %<signed%> and %<_Decimal64%> in declaration specifiers" msgstr "" -#: c-decl.c:7307 +#: c-decl.c:7329 #, gcc-internal-format msgid "both %<signed%> and %<_Decimal128%> in declaration specifiers" msgstr "" -#: c-decl.c:7318 c-decl.c:7439 +#: c-decl.c:7340 c-decl.c:7461 #, gcc-internal-format msgid "both %<unsigned%> and %<void%> in declaration specifiers" msgstr "" -#: c-decl.c:7321 c-decl.c:7461 +#: c-decl.c:7343 c-decl.c:7483 #, gcc-internal-format msgid "both %<unsigned%> and %<_Bool%> in declaration specifiers" msgstr "" -#: c-decl.c:7324 c-decl.c:7503 +#: c-decl.c:7346 c-decl.c:7525 #, gcc-internal-format msgid "both %<unsigned%> and %<float%> in declaration specifiers" msgstr "" -#: c-decl.c:7327 c-decl.c:7522 +#: c-decl.c:7349 c-decl.c:7544 #, gcc-internal-format msgid "both %<unsigned%> and %<double%> in declaration specifiers" msgstr "" -#: c-decl.c:7330 +#: c-decl.c:7352 #, gcc-internal-format msgid "both %<unsigned%> and %<_Decimal32%> in declaration specifiers" msgstr "" -#: c-decl.c:7333 +#: c-decl.c:7355 #, gcc-internal-format msgid "both %<unsigned%> and %<_Decimal64%> in declaration specifiers" msgstr "" -#: c-decl.c:7336 +#: c-decl.c:7358 #, gcc-internal-format msgid "both %<unsigned%> and %<_Decimal128%> in declaration specifiers" msgstr "" -#: c-decl.c:7344 +#: c-decl.c:7366 #, gcc-internal-format msgid "ISO C90 does not support complex types" msgstr "" -#: c-decl.c:7346 c-decl.c:7442 +#: c-decl.c:7368 c-decl.c:7464 #, gcc-internal-format msgid "both %<complex%> and %<void%> in declaration specifiers" msgstr "" -#: c-decl.c:7349 c-decl.c:7464 +#: c-decl.c:7371 c-decl.c:7486 #, gcc-internal-format msgid "both %<complex%> and %<_Bool%> in declaration specifiers" msgstr "" -#: c-decl.c:7352 +#: c-decl.c:7374 #, gcc-internal-format msgid "both %<complex%> and %<_Decimal32%> in declaration specifiers" msgstr "" -#: c-decl.c:7355 +#: c-decl.c:7377 #, gcc-internal-format msgid "both %<complex%> and %<_Decimal64%> in declaration specifiers" msgstr "" -#: c-decl.c:7358 +#: c-decl.c:7380 #, gcc-internal-format msgid "both %<complex%> and %<_Decimal128%> in declaration specifiers" msgstr "" -#: c-decl.c:7361 +#: c-decl.c:7383 #, gcc-internal-format msgid "both %<complex%> and %<_Fract%> in declaration specifiers" msgstr "" -#: c-decl.c:7364 +#: c-decl.c:7386 #, gcc-internal-format msgid "both %<complex%> and %<_Accum%> in declaration specifiers" msgstr "" -#: c-decl.c:7367 +#: c-decl.c:7389 #, gcc-internal-format msgid "both %<complex%> and %<_Sat%> in declaration specifiers" msgstr "" -#: c-decl.c:7374 +#: c-decl.c:7396 #, gcc-internal-format msgid "ISO C does not support saturating types" msgstr "" -#: c-decl.c:7376 c-decl.c:7445 +#: c-decl.c:7398 c-decl.c:7467 #, gcc-internal-format msgid "both %<_Sat%> and %<void%> in declaration specifiers" msgstr "" -#: c-decl.c:7379 c-decl.c:7467 +#: c-decl.c:7401 c-decl.c:7489 #, gcc-internal-format msgid "both %<_Sat%> and %<_Bool%> in declaration specifiers" msgstr "" -#: c-decl.c:7382 c-decl.c:7480 +#: c-decl.c:7404 c-decl.c:7502 #, gcc-internal-format msgid "both %<_Sat%> and %<char%> in declaration specifiers" msgstr "" -#: c-decl.c:7385 c-decl.c:7487 +#: c-decl.c:7407 c-decl.c:7509 #, gcc-internal-format msgid "both %<_Sat%> and %<int%> in declaration specifiers" msgstr "" -#: c-decl.c:7388 c-decl.c:7506 +#: c-decl.c:7410 c-decl.c:7528 #, gcc-internal-format msgid "both %<_Sat%> and %<float%> in declaration specifiers" msgstr "" -#: c-decl.c:7391 c-decl.c:7525 +#: c-decl.c:7413 c-decl.c:7547 #, gcc-internal-format msgid "both %<_Sat%> and %<double%> in declaration specifiers" msgstr "" -#: c-decl.c:7394 +#: c-decl.c:7416 #, gcc-internal-format msgid "both %<_Sat%> and %<_Decimal32%> in declaration specifiers" msgstr "" -#: c-decl.c:7397 +#: c-decl.c:7419 #, gcc-internal-format msgid "both %<_Sat%> and %<_Decimal64%> in declaration specifiers" msgstr "" -#: c-decl.c:7400 +#: c-decl.c:7422 #, gcc-internal-format msgid "both %<_Sat%> and %<_Decimal128%> in declaration specifiers" msgstr "" -#: c-decl.c:7403 +#: c-decl.c:7425 #, gcc-internal-format msgid "both %<_Sat%> and %<complex%> in declaration specifiers" msgstr "" -#: c-decl.c:7542 +#: c-decl.c:7564 #, gcc-internal-format msgid "both %<long long%> and %<%s%> in declaration specifiers" msgstr "" -#: c-decl.c:7545 +#: c-decl.c:7567 #, gcc-internal-format msgid "both %<long%> and %<%s%> in declaration specifiers" msgstr "" -#: c-decl.c:7548 +#: c-decl.c:7570 #, gcc-internal-format msgid "both %<short%> and %<%s%> in declaration specifiers" msgstr "" -#: c-decl.c:7551 +#: c-decl.c:7573 #, gcc-internal-format msgid "both %<signed%> and %<%s%> in declaration specifiers" msgstr "" -#: c-decl.c:7554 +#: c-decl.c:7576 #, gcc-internal-format msgid "both %<unsigned%> and %<%s%> in declaration specifiers" msgstr "" -#: c-decl.c:7557 c-decl.c:7583 +#: c-decl.c:7579 c-decl.c:7605 #, gcc-internal-format msgid "both %<complex%> and %<%s%> in declaration specifiers" msgstr "" -#: c-decl.c:7560 +#: c-decl.c:7582 #, gcc-internal-format msgid "both %<_Sat%> and %<%s%> in declaration specifiers" msgstr "" -#: c-decl.c:7570 +#: c-decl.c:7592 #, gcc-internal-format msgid "decimal floating point not supported for this target" msgstr "" -#: c-decl.c:7572 +#: c-decl.c:7594 #, gcc-internal-format msgid "ISO C does not support decimal floating point" msgstr "" -#: c-decl.c:7591 +#: c-decl.c:7613 c-decl.c:7792 c-parser.c:5101 #, gcc-internal-format msgid "fixed-point types not supported for this target" msgstr "" -#: c-decl.c:7593 +#: c-decl.c:7615 #, gcc-internal-format msgid "ISO C does not support fixed-point types" msgstr "" -#: c-decl.c:7627 +#: c-decl.c:7649 #, gcc-internal-format msgid "%qE fails to be a typedef or built in type" msgstr "" -#: c-decl.c:7660 +#: c-decl.c:7682 #, gcc-internal-format msgid "%qE is not at beginning of declaration" msgstr "" -#: c-decl.c:7674 +#: c-decl.c:7696 #, gcc-internal-format msgid "%<__thread%> used with %<auto%>" msgstr "" -#: c-decl.c:7676 +#: c-decl.c:7698 #, gcc-internal-format msgid "%<__thread%> used with %<register%>" msgstr "" -#: c-decl.c:7678 +#: c-decl.c:7700 #, gcc-internal-format msgid "%<__thread%> used with %<typedef%>" msgstr "" -#: c-decl.c:7689 +#: c-decl.c:7711 #, gcc-internal-format msgid "%<__thread%> before %<extern%>" msgstr "" -#: c-decl.c:7698 +#: c-decl.c:7720 #, gcc-internal-format msgid "%<__thread%> before %<static%>" msgstr "" -#: c-decl.c:7714 +#: c-decl.c:7736 #, gcc-internal-format msgid "multiple storage classes in declaration specifiers" msgstr "" -#: c-decl.c:7721 +#: c-decl.c:7743 #, gcc-internal-format msgid "%<__thread%> used with %qE" msgstr "" -#: c-decl.c:7768 +#: c-decl.c:7790 #, gcc-internal-format msgid "%<_Sat%> is used without %<_Fract%> or %<_Accum%>" msgstr "" -#: c-decl.c:7780 +#: c-decl.c:7804 #, gcc-internal-format msgid "ISO C does not support plain %<complex%> meaning %<double complex%>" msgstr "" -#: c-decl.c:7825 c-decl.c:7851 +#: c-decl.c:7849 c-decl.c:7875 #, gcc-internal-format msgid "ISO C does not support complex integer types" msgstr "" -#: c-decl.c:8001 toplev.c:836 +#: c-decl.c:8029 toplev.c:838 #, gcc-internal-format msgid "%q+F used but never defined" msgstr "" @@ -20503,17 +20273,17 @@ msgstr "" msgid "missing controlling predicate" msgstr "" -#: c-omp.c:331 +#: c-omp.c:348 #, gcc-internal-format msgid "invalid controlling predicate" msgstr "" -#: c-omp.c:338 +#: c-omp.c:355 #, gcc-internal-format msgid "missing increment expression" msgstr "" -#: c-omp.c:404 +#: c-omp.c:422 #, gcc-internal-format msgid "invalid increment expression" msgstr "" @@ -20574,107 +20344,107 @@ msgid "" "-fhandle-exceptions has been renamed -fexceptions (and is now on by default)" msgstr "" -#: c-opts.c:1025 +#: c-opts.c:1029 #, gcc-internal-format msgid "-fno-gnu89-inline is only supported in GNU99 or C99 mode" msgstr "" -#: c-opts.c:1094 +#: c-opts.c:1103 #, gcc-internal-format msgid "-Wformat-y2k ignored without -Wformat" msgstr "" -#: c-opts.c:1096 +#: c-opts.c:1105 #, gcc-internal-format msgid "-Wformat-extra-args ignored without -Wformat" msgstr "" -#: c-opts.c:1098 +#: c-opts.c:1107 #, gcc-internal-format msgid "-Wformat-zero-length ignored without -Wformat" msgstr "" -#: c-opts.c:1100 +#: c-opts.c:1109 #, gcc-internal-format msgid "-Wformat-nonliteral ignored without -Wformat" msgstr "" -#: c-opts.c:1102 +#: c-opts.c:1111 #, gcc-internal-format msgid "-Wformat-contains-nul ignored without -Wformat" msgstr "" -#: c-opts.c:1104 +#: c-opts.c:1113 #, gcc-internal-format msgid "-Wformat-security ignored without -Wformat" msgstr "" -#: c-opts.c:1128 +#: c-opts.c:1137 #, gcc-internal-format msgid "opening output file %s: %m" msgstr "" -#: c-opts.c:1133 +#: c-opts.c:1142 #, gcc-internal-format msgid "too many filenames given. Type %s --help for usage" msgstr "" -#: c-opts.c:1217 +#: c-opts.c:1226 #, gcc-internal-format msgid "The C parser does not support -dy, option ignored" msgstr "" -#: c-opts.c:1221 +#: c-opts.c:1230 #, gcc-internal-format msgid "The Objective-C parser does not support -dy, option ignored" msgstr "" -#: c-opts.c:1224 +#: c-opts.c:1233 #, gcc-internal-format msgid "The C++ parser does not support -dy, option ignored" msgstr "" -#: c-opts.c:1228 +#: c-opts.c:1237 #, gcc-internal-format msgid "The Objective-C++ parser does not support -dy, option ignored" msgstr "" -#: c-opts.c:1278 +#: c-opts.c:1287 #, gcc-internal-format msgid "opening dependency file %s: %m" msgstr "" -#: c-opts.c:1288 +#: c-opts.c:1297 #, gcc-internal-format msgid "closing dependency file %s: %m" msgstr "" -#: c-opts.c:1291 +#: c-opts.c:1300 #, gcc-internal-format msgid "when writing output to %s: %m" msgstr "" -#: c-opts.c:1371 +#: c-opts.c:1380 #, gcc-internal-format msgid "to generate dependencies you must specify either -M or -MM" msgstr "" -#: c-opts.c:1394 +#: c-opts.c:1403 #, gcc-internal-format msgid "-MG may only be used with -M or -MM" msgstr "" -#: c-opts.c:1423 +#: c-opts.c:1432 #, gcc-internal-format msgid "-fdirectives-only is incompatible with -Wunused_macros" msgstr "" -#: c-opts.c:1425 +#: c-opts.c:1434 #, gcc-internal-format msgid "-fdirectives-only is incompatible with -traditional" msgstr "" -#: c-opts.c:1563 +#: c-opts.c:1572 #, gcc-internal-format msgid "too late for # directive to set debug directory" msgstr "" @@ -20689,12 +20459,12 @@ msgstr "" msgid "ISO C forbids an empty translation unit" msgstr "" -#: c-parser.c:1056 c-parser.c:6085 +#: c-parser.c:1056 c-parser.c:6109 #, gcc-internal-format msgid "ISO C does not allow extra %<;%> outside of a function" msgstr "" -#: c-parser.c:1158 c-parser.c:6643 +#: c-parser.c:1158 c-parser.c:6667 #, gcc-internal-format msgid "expected declaration specifiers" msgstr "" @@ -20722,17 +20492,17 @@ msgstr "" msgid "ISO C forbids nested functions" msgstr "" -#: c-parser.c:1641 c-parser.c:2454 c-parser.c:3091 c-parser.c:3343 -#: c-parser.c:4277 c-parser.c:4877 c-parser.c:5284 c-parser.c:5305 -#: c-parser.c:5422 c-parser.c:5574 c-parser.c:5591 c-parser.c:5727 -#: c-parser.c:5739 c-parser.c:5764 c-parser.c:5898 c-parser.c:5927 -#: c-parser.c:5935 c-parser.c:5963 c-parser.c:5977 c-parser.c:6193 -#: c-parser.c:6292 c-parser.c:6813 c-parser.c:7514 +#: c-parser.c:1641 c-parser.c:2454 c-parser.c:3094 c-parser.c:3352 +#: c-parser.c:4286 c-parser.c:4886 c-parser.c:5308 c-parser.c:5329 +#: c-parser.c:5446 c-parser.c:5598 c-parser.c:5615 c-parser.c:5751 +#: c-parser.c:5763 c-parser.c:5788 c-parser.c:5922 c-parser.c:5951 +#: c-parser.c:5959 c-parser.c:5987 c-parser.c:6001 c-parser.c:6217 +#: c-parser.c:6316 c-parser.c:6837 c-parser.c:7538 #, gcc-internal-format msgid "expected identifier" msgstr "" -#: c-parser.c:1674 cp/parser.c:11882 +#: c-parser.c:1674 cp/parser.c:11972 #, gcc-internal-format msgid "comma at end of enumerator list" msgstr "" @@ -20742,7 +20512,7 @@ msgstr "" msgid "expected %<,%> or %<}%>" msgstr "" -#: c-parser.c:1694 c-parser.c:1877 c-parser.c:6052 +#: c-parser.c:1694 c-parser.c:1877 c-parser.c:6076 #, gcc-internal-format msgid "expected %<{%>" msgstr "" @@ -20757,7 +20527,7 @@ msgstr "" msgid "expected class name" msgstr "" -#: c-parser.c:1831 c-parser.c:5831 +#: c-parser.c:1831 c-parser.c:5855 #, gcc-internal-format msgid "extra semicolon in struct or union specified" msgstr "" @@ -20772,7 +20542,7 @@ msgstr "" msgid "expected %<;%>" msgstr "" -#: c-parser.c:1942 c-parser.c:2920 +#: c-parser.c:1942 c-parser.c:2922 #, gcc-internal-format msgid "expected specifier-qualifier-list" msgstr "" @@ -20807,93 +20577,93 @@ msgstr "" msgid "ISO C requires a named argument before %<...%>" msgstr "" -#: c-parser.c:2630 +#: c-parser.c:2632 #, gcc-internal-format msgid "expected declaration specifiers or %<...%>" msgstr "" -#: c-parser.c:2681 +#: c-parser.c:2683 #, gcc-internal-format msgid "wide string literal in %<asm%>" msgstr "" -#: c-parser.c:2687 c-parser.c:6698 +#: c-parser.c:2689 c-parser.c:6722 #, gcc-internal-format msgid "expected string literal" msgstr "" -#: c-parser.c:3012 +#: c-parser.c:3014 #, gcc-internal-format msgid "ISO C forbids empty initializer braces" msgstr "" -#: c-parser.c:3058 +#: c-parser.c:3061 #, gcc-internal-format msgid "obsolete use of designated initializer with %<:%>" msgstr "" -#: c-parser.c:3188 +#: c-parser.c:3191 #, gcc-internal-format msgid "ISO C forbids specifying range of elements to initialize" msgstr "" -#: c-parser.c:3201 +#: c-parser.c:3204 #, gcc-internal-format msgid "ISO C90 forbids specifying subobject to initialize" msgstr "" -#: c-parser.c:3208 +#: c-parser.c:3211 #, gcc-internal-format msgid "obsolete use of designated initializer without %<=%>" msgstr "" -#: c-parser.c:3214 +#: c-parser.c:3217 #, gcc-internal-format msgid "expected %<=%>" msgstr "" -#: c-parser.c:3358 +#: c-parser.c:3367 #, gcc-internal-format msgid "ISO C forbids label declarations" msgstr "" -#: c-parser.c:3363 c-parser.c:3439 +#: c-parser.c:3372 c-parser.c:3448 #, gcc-internal-format msgid "expected declaration or statement" msgstr "" -#: c-parser.c:3393 c-parser.c:3421 +#: c-parser.c:3402 c-parser.c:3430 #, gcc-internal-format msgid "ISO C90 forbids mixed declarations and code" msgstr "" -#: c-parser.c:3446 +#: c-parser.c:3455 #, gcc-internal-format msgid "expected %<}%> before %<else%>" msgstr "" -#: c-parser.c:3451 +#: c-parser.c:3460 #, gcc-internal-format msgid "%<else%> without a previous %<if%>" msgstr "" -#: c-parser.c:3467 +#: c-parser.c:3476 #, gcc-internal-format msgid "label at end of compound statement" msgstr "" -#: c-parser.c:3510 +#: c-parser.c:3519 #, gcc-internal-format msgid "expected %<:%> or %<...%>" msgstr "" -#: c-parser.c:3544 +#: c-parser.c:3553 #, gcc-internal-format msgid "" "a label can only be part of a statement and a declaration is not a statement" msgstr "" -#: c-parser.c:3706 +#: c-parser.c:3715 #, gcc-internal-format msgid "expected identifier or %<*%>" msgstr "" @@ -20902,224 +20672,224 @@ msgstr "" #. c_parser_skip_until_found stops at a closing nesting #. delimiter without consuming it, but here we need to consume #. it to proceed further. -#: c-parser.c:3768 +#: c-parser.c:3777 #, gcc-internal-format msgid "expected statement" msgstr "" -#: c-parser.c:3863 cp/parser.c:7228 +#: c-parser.c:3872 cp/parser.c:7296 #, gcc-internal-format msgid "suggest braces around empty body in an %<if%> statement" msgstr "" -#: c-parser.c:3889 cp/parser.c:7249 +#: c-parser.c:3898 cp/parser.c:7317 #, gcc-internal-format msgid "suggest braces around empty body in an %<else%> statement" msgstr "" -#: c-parser.c:4009 +#: c-parser.c:4018 #, gcc-internal-format msgid "suggest braces around empty body in %<do%> statement" msgstr "" -#: c-parser.c:4162 +#: c-parser.c:4171 #, gcc-internal-format msgid "%E qualifier ignored on asm" msgstr "" -#: c-parser.c:4450 +#: c-parser.c:4459 #, gcc-internal-format msgid "ISO C forbids omitting the middle term of a ?: expression" msgstr "" -#: c-parser.c:4846 +#: c-parser.c:4855 #, gcc-internal-format msgid "traditional C rejects the unary plus operator" msgstr "" -#: c-parser.c:4970 +#: c-parser.c:4972 #, gcc-internal-format msgid "%<sizeof%> applied to a bit-field" msgstr "" -#: c-parser.c:5118 c-parser.c:5464 c-parser.c:5486 +#: c-parser.c:5131 c-parser.c:5488 c-parser.c:5510 #, gcc-internal-format msgid "expected expression" msgstr "" -#: c-parser.c:5145 +#: c-parser.c:5158 #, gcc-internal-format msgid "braced-group within expression allowed only inside a function" msgstr "" -#: c-parser.c:5159 +#: c-parser.c:5172 #, gcc-internal-format msgid "ISO C forbids braced-groups within expressions" msgstr "" -#: c-parser.c:5346 +#: c-parser.c:5370 #, gcc-internal-format msgid "first argument to %<__builtin_choose_expr%> not a constant" msgstr "" -#: c-parser.c:5515 +#: c-parser.c:5539 #, gcc-internal-format msgid "compound literal has variable size" msgstr "" -#: c-parser.c:5523 +#: c-parser.c:5547 #, gcc-internal-format msgid "ISO C90 forbids compound literals" msgstr "" -#: c-parser.c:6048 +#: c-parser.c:6072 #, gcc-internal-format msgid "extra semicolon in method definition specified" msgstr "" -#: c-parser.c:6592 +#: c-parser.c:6616 #, gcc-internal-format msgid "%<#pragma omp barrier%> may only be used in compound statements" msgstr "" -#: c-parser.c:6603 +#: c-parser.c:6627 #, gcc-internal-format msgid "%<#pragma omp flush%> may only be used in compound statements" msgstr "" -#: c-parser.c:6614 +#: c-parser.c:6638 #, gcc-internal-format msgid "%<#pragma omp taskwait%> may only be used in compound statements" msgstr "" -#: c-parser.c:6627 +#: c-parser.c:6651 #, gcc-internal-format msgid "" "%<#pragma omp section%> may only be used in %<#pragma omp sections%> " "construct" msgstr "" -#: c-parser.c:6633 +#: c-parser.c:6657 #, gcc-internal-format msgid "%<#pragma GCC pch_preprocess%> must be first" msgstr "" -#: c-parser.c:6791 +#: c-parser.c:6815 #, gcc-internal-format msgid "too many %qs clauses" msgstr "" -#: c-parser.c:6887 +#: c-parser.c:6911 #, gcc-internal-format msgid "collapse argument needs positive constant integer expression" msgstr "" -#: c-parser.c:6952 +#: c-parser.c:6976 #, gcc-internal-format msgid "expected %<none%> or %<shared%>" msgstr "" -#: c-parser.c:6995 +#: c-parser.c:7019 #, gcc-internal-format msgid "expected %<(%>" msgstr "" -#: c-parser.c:7039 c-parser.c:7223 +#: c-parser.c:7063 c-parser.c:7247 #, gcc-internal-format msgid "expected integer expression" msgstr "" -#: c-parser.c:7049 +#: c-parser.c:7073 #, gcc-internal-format msgid "%<num_threads%> value must be positive" msgstr "" -#: c-parser.c:7129 +#: c-parser.c:7153 #, gcc-internal-format msgid "expected %<+%>, %<*%>, %<-%>, %<&%>, %<^%>, %<|%>, %<&&%>, or %<||%>" msgstr "" -#: c-parser.c:7214 +#: c-parser.c:7238 #, gcc-internal-format msgid "schedule %<runtime%> does not take a %<chunk_size%> parameter" msgstr "" -#: c-parser.c:7218 +#: c-parser.c:7242 #, gcc-internal-format msgid "schedule %<auto%> does not take a %<chunk_size%> parameter" msgstr "" -#: c-parser.c:7236 +#: c-parser.c:7260 #, gcc-internal-format msgid "invalid schedule kind" msgstr "" -#: c-parser.c:7354 +#: c-parser.c:7378 #, gcc-internal-format msgid "expected %<#pragma omp%> clause" msgstr "" -#: c-parser.c:7363 +#: c-parser.c:7387 #, gcc-internal-format msgid "%qs is not valid for %qs" msgstr "" -#: c-parser.c:7464 +#: c-parser.c:7488 #, gcc-internal-format msgid "invalid operator for %<#pragma omp atomic%>" msgstr "" -#: c-parser.c:7517 c-parser.c:7537 +#: c-parser.c:7541 c-parser.c:7561 #, gcc-internal-format msgid "expected %<(%> or end of line" msgstr "" -#: c-parser.c:7569 +#: c-parser.c:7593 #, gcc-internal-format msgid "for statement expected" msgstr "" -#: c-parser.c:7619 +#: c-parser.c:7643 #, gcc-internal-format msgid "expected iteration declaration or initialization" msgstr "" -#: c-parser.c:7684 +#: c-parser.c:7722 #, gcc-internal-format msgid "not enough perfectly nested loops" msgstr "" -#: c-parser.c:7732 +#: c-parser.c:7770 #, gcc-internal-format msgid "collapsed loops not perfectly nested" msgstr "" -#: c-parser.c:7769 cp/pt.c:10362 +#: c-parser.c:7807 cp/pt.c:10533 #, gcc-internal-format msgid "iteration variable %qD should not be firstprivate" msgstr "" -#: c-parser.c:7919 +#: c-parser.c:7957 #, gcc-internal-format msgid "expected %<#pragma omp section%> or %<}%>" msgstr "" -#: c-parser.c:8189 +#: c-parser.c:8227 #, gcc-internal-format msgid "%qD is not a variable" msgstr "" -#: c-parser.c:8191 cp/semantics.c:3787 +#: c-parser.c:8229 cp/semantics.c:3802 #, gcc-internal-format msgid "%qE declared %<threadprivate%> after first use" msgstr "" -#: c-parser.c:8193 cp/semantics.c:3789 +#: c-parser.c:8231 cp/semantics.c:3804 #, gcc-internal-format msgid "automatic variable %qE cannot be %<threadprivate%>" msgstr "" -#: c-parser.c:8197 cp/semantics.c:3791 +#: c-parser.c:8235 cp/semantics.c:3806 #, gcc-internal-format msgid "%<threadprivate%> %qE has incomplete type" msgstr "" @@ -21500,7 +21270,7 @@ msgstr "" msgid "%qD has an incomplete type" msgstr "" -#: c-typeck.c:194 cp/call.c:2914 +#: c-typeck.c:194 cp/call.c:2920 #, gcc-internal-format msgid "invalid use of void expression" msgstr "" @@ -21526,97 +21296,97 @@ msgstr "" msgid "invalid use of incomplete typedef %qD" msgstr "" -#: c-typeck.c:473 c-typeck.c:498 +#: c-typeck.c:486 c-typeck.c:511 #, gcc-internal-format msgid "function types not truly compatible in ISO C" msgstr "" -#: c-typeck.c:626 +#: c-typeck.c:639 #, gcc-internal-format msgid "can%'t mix operands of decimal float and vector types" msgstr "" -#: c-typeck.c:631 +#: c-typeck.c:644 #, gcc-internal-format msgid "can%'t mix operands of decimal float and complex types" msgstr "" -#: c-typeck.c:636 +#: c-typeck.c:649 #, gcc-internal-format msgid "can%'t mix operands of decimal float and other float types" msgstr "" -#: c-typeck.c:1042 +#: c-typeck.c:1055 #, gcc-internal-format msgid "types are not quite compatible" msgstr "" -#: c-typeck.c:1365 +#: c-typeck.c:1378 #, gcc-internal-format msgid "function return types not compatible due to %<volatile%>" msgstr "" -#: c-typeck.c:1524 c-typeck.c:2887 +#: c-typeck.c:1537 c-typeck.c:2905 #, gcc-internal-format msgid "arithmetic on pointer to an incomplete type" msgstr "" -#: c-typeck.c:1920 +#: c-typeck.c:1933 #, gcc-internal-format msgid "%qT has no member named %qE" msgstr "" -#: c-typeck.c:1961 +#: c-typeck.c:1974 #, gcc-internal-format msgid "request for member %qE in something not a structure or union" msgstr "" -#: c-typeck.c:2010 +#: c-typeck.c:2023 #, gcc-internal-format msgid "dereferencing pointer to incomplete type" msgstr "" -#: c-typeck.c:2014 +#: c-typeck.c:2027 #, gcc-internal-format msgid "dereferencing %<void *%> pointer" msgstr "" -#: c-typeck.c:2033 +#: c-typeck.c:2046 #, gcc-internal-format msgid "invalid type argument of %qs (have %qT)" msgstr "" -#: c-typeck.c:2064 cp/typeck.c:2669 +#: c-typeck.c:2077 cp/typeck.c:2697 #, gcc-internal-format msgid "subscripted value is neither array nor pointer" msgstr "" -#: c-typeck.c:2075 cp/typeck.c:2584 cp/typeck.c:2674 +#: c-typeck.c:2088 cp/typeck.c:2612 cp/typeck.c:2702 #, gcc-internal-format msgid "array subscript is not an integer" msgstr "" -#: c-typeck.c:2081 +#: c-typeck.c:2094 #, gcc-internal-format msgid "subscripted value is pointer to function" msgstr "" -#: c-typeck.c:2129 +#: c-typeck.c:2142 #, gcc-internal-format msgid "ISO C forbids subscripting %<register%> array" msgstr "" -#: c-typeck.c:2132 +#: c-typeck.c:2145 #, gcc-internal-format msgid "ISO C90 forbids subscripting non-lvalue array" msgstr "" -#: c-typeck.c:2249 +#: c-typeck.c:2262 #, gcc-internal-format msgid "%qD is static but used in inline function %qD which is not static" msgstr "" -#: c-typeck.c:2397 +#: c-typeck.c:2410 #, gcc-internal-format msgid "called object %qE is not a function" msgstr "" @@ -21624,342 +21394,342 @@ msgstr "" #. This situation leads to run-time undefined behavior. We can't, #. therefore, simply error unless we can prove that all possible #. executions of the program must execute the code. -#: c-typeck.c:2424 +#: c-typeck.c:2448 #, gcc-internal-format msgid "function called through a non-compatible type" msgstr "" -#: c-typeck.c:2561 +#: c-typeck.c:2579 #, gcc-internal-format msgid "type of formal parameter %d is incomplete" msgstr "" -#: c-typeck.c:2574 +#: c-typeck.c:2592 #, gcc-internal-format msgid "" "passing argument %d of %qE as integer rather than floating due to prototype" msgstr "" -#: c-typeck.c:2579 +#: c-typeck.c:2597 #, gcc-internal-format msgid "" "passing argument %d of %qE as integer rather than complex due to prototype" msgstr "" -#: c-typeck.c:2584 +#: c-typeck.c:2602 #, gcc-internal-format msgid "" "passing argument %d of %qE as complex rather than floating due to prototype" msgstr "" -#: c-typeck.c:2589 +#: c-typeck.c:2607 #, gcc-internal-format msgid "" "passing argument %d of %qE as floating rather than integer due to prototype" msgstr "" -#: c-typeck.c:2594 +#: c-typeck.c:2612 #, gcc-internal-format msgid "" "passing argument %d of %qE as complex rather than integer due to prototype" msgstr "" -#: c-typeck.c:2599 +#: c-typeck.c:2617 #, gcc-internal-format msgid "" "passing argument %d of %qE as floating rather than complex due to prototype" msgstr "" -#: c-typeck.c:2612 +#: c-typeck.c:2630 #, gcc-internal-format msgid "" "passing argument %d of %qE as %<float%> rather than %<double%> due to " "prototype" msgstr "" -#: c-typeck.c:2637 +#: c-typeck.c:2655 #, gcc-internal-format msgid "passing argument %d of %qE as %qT rather than %qT due to prototype" msgstr "" -#: c-typeck.c:2658 +#: c-typeck.c:2676 #, gcc-internal-format msgid "passing argument %d of %qE with different width due to prototype" msgstr "" -#: c-typeck.c:2681 +#: c-typeck.c:2699 #, gcc-internal-format msgid "passing argument %d of %qE as unsigned due to prototype" msgstr "" -#: c-typeck.c:2685 +#: c-typeck.c:2703 #, gcc-internal-format msgid "passing argument %d of %qE as signed due to prototype" msgstr "" -#: c-typeck.c:2800 c-typeck.c:2804 +#: c-typeck.c:2818 c-typeck.c:2822 #, gcc-internal-format msgid "comparison with string literal results in unspecified behavior" msgstr "" -#: c-typeck.c:2828 +#: c-typeck.c:2846 #, gcc-internal-format msgid "pointer of type %<void *%> used in subtraction" msgstr "" -#: c-typeck.c:2831 +#: c-typeck.c:2849 #, gcc-internal-format msgid "pointer to a function used in subtraction" msgstr "" -#: c-typeck.c:2946 +#: c-typeck.c:2964 #, gcc-internal-format msgid "wrong type argument to unary plus" msgstr "" -#: c-typeck.c:2959 +#: c-typeck.c:2977 #, gcc-internal-format msgid "wrong type argument to unary minus" msgstr "" -#: c-typeck.c:2979 +#: c-typeck.c:2997 #, gcc-internal-format msgid "ISO C does not support %<~%> for complex conjugation" msgstr "" -#: c-typeck.c:2985 +#: c-typeck.c:3003 #, gcc-internal-format msgid "wrong type argument to bit-complement" msgstr "" -#: c-typeck.c:2993 +#: c-typeck.c:3011 #, gcc-internal-format msgid "wrong type argument to abs" msgstr "" -#: c-typeck.c:3005 +#: c-typeck.c:3023 #, gcc-internal-format msgid "wrong type argument to conjugation" msgstr "" -#: c-typeck.c:3018 +#: c-typeck.c:3036 #, gcc-internal-format msgid "wrong type argument to unary exclamation mark" msgstr "" -#: c-typeck.c:3055 +#: c-typeck.c:3073 #, gcc-internal-format msgid "ISO C does not support %<++%> and %<--%> on complex types" msgstr "" -#: c-typeck.c:3074 c-typeck.c:3106 +#: c-typeck.c:3092 c-typeck.c:3124 #, gcc-internal-format msgid "wrong type argument to increment" msgstr "" -#: c-typeck.c:3076 c-typeck.c:3109 +#: c-typeck.c:3094 c-typeck.c:3127 #, gcc-internal-format msgid "wrong type argument to decrement" msgstr "" -#: c-typeck.c:3096 +#: c-typeck.c:3114 #, gcc-internal-format msgid "increment of pointer to unknown structure" msgstr "" -#: c-typeck.c:3099 +#: c-typeck.c:3117 #, gcc-internal-format msgid "decrement of pointer to unknown structure" msgstr "" -#: c-typeck.c:3308 +#: c-typeck.c:3326 #, gcc-internal-format msgid "assignment of read-only member %qD" msgstr "" -#: c-typeck.c:3309 +#: c-typeck.c:3327 #, gcc-internal-format msgid "increment of read-only member %qD" msgstr "" -#: c-typeck.c:3310 +#: c-typeck.c:3328 #, gcc-internal-format msgid "decrement of read-only member %qD" msgstr "" -#: c-typeck.c:3311 +#: c-typeck.c:3329 #, gcc-internal-format msgid "read-only member %qD used as %<asm%> output" msgstr "" -#: c-typeck.c:3315 +#: c-typeck.c:3333 #, gcc-internal-format msgid "assignment of read-only variable %qD" msgstr "" -#: c-typeck.c:3316 +#: c-typeck.c:3334 #, gcc-internal-format msgid "increment of read-only variable %qD" msgstr "" -#: c-typeck.c:3317 +#: c-typeck.c:3335 #, gcc-internal-format msgid "decrement of read-only variable %qD" msgstr "" -#: c-typeck.c:3318 +#: c-typeck.c:3336 #, gcc-internal-format msgid "read-only variable %qD used as %<asm%> output" msgstr "" -#: c-typeck.c:3321 +#: c-typeck.c:3339 #, gcc-internal-format msgid "assignment of read-only location %qE" msgstr "" -#: c-typeck.c:3322 +#: c-typeck.c:3340 #, gcc-internal-format msgid "increment of read-only location %qE" msgstr "" -#: c-typeck.c:3323 +#: c-typeck.c:3341 #, gcc-internal-format msgid "decrement of read-only location %qE" msgstr "" -#: c-typeck.c:3324 +#: c-typeck.c:3342 #, gcc-internal-format msgid "read-only location %qE used as %<asm%> output" msgstr "" -#: c-typeck.c:3360 +#: c-typeck.c:3378 #, gcc-internal-format msgid "cannot take address of bit-field %qD" msgstr "" -#: c-typeck.c:3388 +#: c-typeck.c:3406 #, gcc-internal-format msgid "global register variable %qD used in nested function" msgstr "" -#: c-typeck.c:3391 +#: c-typeck.c:3409 #, gcc-internal-format msgid "register variable %qD used in nested function" msgstr "" -#: c-typeck.c:3396 +#: c-typeck.c:3414 #, gcc-internal-format msgid "address of global register variable %qD requested" msgstr "" -#: c-typeck.c:3398 +#: c-typeck.c:3416 #, gcc-internal-format msgid "address of register variable %qD requested" msgstr "" -#: c-typeck.c:3444 +#: c-typeck.c:3462 #, gcc-internal-format msgid "non-lvalue array in conditional expression" msgstr "" -#: c-typeck.c:3492 +#: c-typeck.c:3510 #, gcc-internal-format msgid "signed and unsigned type in conditional expression" msgstr "" -#: c-typeck.c:3500 +#: c-typeck.c:3518 #, gcc-internal-format msgid "ISO C forbids conditional expr with only one void side" msgstr "" -#: c-typeck.c:3515 c-typeck.c:3524 +#: c-typeck.c:3533 c-typeck.c:3542 #, gcc-internal-format msgid "ISO C forbids conditional expr between %<void *%> and function pointer" msgstr "" -#: c-typeck.c:3532 +#: c-typeck.c:3550 #, gcc-internal-format msgid "pointer type mismatch in conditional expression" msgstr "" -#: c-typeck.c:3540 c-typeck.c:3551 +#: c-typeck.c:3558 c-typeck.c:3569 #, gcc-internal-format msgid "pointer/integer type mismatch in conditional expression" msgstr "" -#: c-typeck.c:3565 +#: c-typeck.c:3583 #, gcc-internal-format msgid "type mismatch in conditional expression" msgstr "" -#: c-typeck.c:3606 +#: c-typeck.c:3624 #, gcc-internal-format msgid "left-hand operand of comma expression has no effect" msgstr "" -#: c-typeck.c:3643 +#: c-typeck.c:3661 #, gcc-internal-format msgid "cast specifies array type" msgstr "" -#: c-typeck.c:3649 +#: c-typeck.c:3667 #, gcc-internal-format msgid "cast specifies function type" msgstr "" -#: c-typeck.c:3665 +#: c-typeck.c:3683 #, gcc-internal-format msgid "ISO C forbids casting nonscalar to the same type" msgstr "" -#: c-typeck.c:3682 +#: c-typeck.c:3700 #, gcc-internal-format msgid "ISO C forbids casts to union type" msgstr "" -#: c-typeck.c:3689 +#: c-typeck.c:3707 #, gcc-internal-format msgid "cast to union type from type not present in union" msgstr "" -#: c-typeck.c:3735 +#: c-typeck.c:3753 #, gcc-internal-format msgid "cast adds new qualifiers to function type" msgstr "" #. There are qualifiers present in IN_OTYPE that are not #. present in IN_TYPE. -#: c-typeck.c:3740 +#: c-typeck.c:3758 #, gcc-internal-format msgid "cast discards qualifiers from pointer target type" msgstr "" -#: c-typeck.c:3756 +#: c-typeck.c:3774 #, gcc-internal-format msgid "cast increases required alignment of target type" msgstr "" -#: c-typeck.c:3767 +#: c-typeck.c:3785 #, gcc-internal-format msgid "cast from pointer to integer of different size" msgstr "" -#: c-typeck.c:3771 +#: c-typeck.c:3789 #, gcc-internal-format msgid "cast from function call of type %qT to non-matching type %qT" msgstr "" -#: c-typeck.c:3779 +#: c-typeck.c:3797 #, gcc-internal-format msgid "cast to pointer from integer of different size" msgstr "" -#: c-typeck.c:3793 +#: c-typeck.c:3811 #, gcc-internal-format msgid "ISO C forbids conversion of function pointer to object pointer type" msgstr "" -#: c-typeck.c:3802 +#: c-typeck.c:3820 #, gcc-internal-format msgid "ISO C forbids conversion of object pointer to function pointer type" msgstr "" @@ -21967,478 +21737,478 @@ msgstr "" #. This macro is used to emit diagnostics to ensure that all format #. strings are complete sentences, visible to gettext and checked at #. compile time. -#: c-typeck.c:4013 c-typeck.c:4446 +#: c-typeck.c:4031 c-typeck.c:4464 #, gcc-internal-format msgid "expected %qT but argument is of type %qT" msgstr "" -#: c-typeck.c:4092 +#: c-typeck.c:4110 #, gcc-internal-format msgid "cannot pass rvalue to reference parameter" msgstr "" -#: c-typeck.c:4206 c-typeck.c:4375 +#: c-typeck.c:4224 c-typeck.c:4393 #, gcc-internal-format msgid "" "passing argument %d of %qE makes qualified function pointer from unqualified" msgstr "" -#: c-typeck.c:4209 c-typeck.c:4378 +#: c-typeck.c:4227 c-typeck.c:4396 #, gcc-internal-format msgid "assignment makes qualified function pointer from unqualified" msgstr "" -#: c-typeck.c:4212 c-typeck.c:4380 +#: c-typeck.c:4230 c-typeck.c:4398 #, gcc-internal-format msgid "initialization makes qualified function pointer from unqualified" msgstr "" -#: c-typeck.c:4215 c-typeck.c:4382 +#: c-typeck.c:4233 c-typeck.c:4400 #, gcc-internal-format msgid "return makes qualified function pointer from unqualified" msgstr "" -#: c-typeck.c:4220 c-typeck.c:4340 +#: c-typeck.c:4238 c-typeck.c:4358 #, gcc-internal-format msgid "passing argument %d of %qE discards qualifiers from pointer target type" msgstr "" -#: c-typeck.c:4222 c-typeck.c:4342 +#: c-typeck.c:4240 c-typeck.c:4360 #, gcc-internal-format msgid "assignment discards qualifiers from pointer target type" msgstr "" -#: c-typeck.c:4224 c-typeck.c:4344 +#: c-typeck.c:4242 c-typeck.c:4362 #, gcc-internal-format msgid "initialization discards qualifiers from pointer target type" msgstr "" -#: c-typeck.c:4226 c-typeck.c:4346 +#: c-typeck.c:4244 c-typeck.c:4364 #, gcc-internal-format msgid "return discards qualifiers from pointer target type" msgstr "" -#: c-typeck.c:4234 +#: c-typeck.c:4252 #, gcc-internal-format msgid "ISO C prohibits argument conversion to union type" msgstr "" -#: c-typeck.c:4267 +#: c-typeck.c:4285 #, gcc-internal-format msgid "request for implicit conversion from %qT to %qT not permitted in C++" msgstr "" -#: c-typeck.c:4279 +#: c-typeck.c:4297 #, gcc-internal-format msgid "argument %d of %qE might be a candidate for a format attribute" msgstr "" -#: c-typeck.c:4285 +#: c-typeck.c:4303 #, gcc-internal-format msgid "assignment left-hand side might be a candidate for a format attribute" msgstr "" -#: c-typeck.c:4290 +#: c-typeck.c:4308 #, gcc-internal-format msgid "" "initialization left-hand side might be a candidate for a format attribute" msgstr "" -#: c-typeck.c:4295 +#: c-typeck.c:4313 #, gcc-internal-format msgid "return type might be a candidate for a format attribute" msgstr "" -#: c-typeck.c:4319 +#: c-typeck.c:4337 #, gcc-internal-format msgid "" "ISO C forbids passing argument %d of %qE between function pointer and %<void " "*%>" msgstr "" -#: c-typeck.c:4322 +#: c-typeck.c:4340 #, gcc-internal-format msgid "ISO C forbids assignment between function pointer and %<void *%>" msgstr "" -#: c-typeck.c:4324 +#: c-typeck.c:4342 #, gcc-internal-format msgid "ISO C forbids initialization between function pointer and %<void *%>" msgstr "" -#: c-typeck.c:4326 +#: c-typeck.c:4344 #, gcc-internal-format msgid "ISO C forbids return between function pointer and %<void *%>" msgstr "" -#: c-typeck.c:4357 +#: c-typeck.c:4375 #, gcc-internal-format msgid "pointer targets in passing argument %d of %qE differ in signedness" msgstr "" -#: c-typeck.c:4359 +#: c-typeck.c:4377 #, gcc-internal-format msgid "pointer targets in assignment differ in signedness" msgstr "" -#: c-typeck.c:4361 +#: c-typeck.c:4379 #, gcc-internal-format msgid "pointer targets in initialization differ in signedness" msgstr "" -#: c-typeck.c:4363 +#: c-typeck.c:4381 #, gcc-internal-format msgid "pointer targets in return differ in signedness" msgstr "" -#: c-typeck.c:4390 +#: c-typeck.c:4408 #, gcc-internal-format msgid "passing argument %d of %qE from incompatible pointer type" msgstr "" -#: c-typeck.c:4392 +#: c-typeck.c:4410 #, gcc-internal-format msgid "assignment from incompatible pointer type" msgstr "" -#: c-typeck.c:4393 +#: c-typeck.c:4411 #, gcc-internal-format msgid "initialization from incompatible pointer type" msgstr "" -#: c-typeck.c:4395 +#: c-typeck.c:4413 #, gcc-internal-format msgid "return from incompatible pointer type" msgstr "" -#: c-typeck.c:4413 +#: c-typeck.c:4431 #, gcc-internal-format msgid "passing argument %d of %qE makes pointer from integer without a cast" msgstr "" -#: c-typeck.c:4415 +#: c-typeck.c:4433 #, gcc-internal-format msgid "assignment makes pointer from integer without a cast" msgstr "" -#: c-typeck.c:4417 +#: c-typeck.c:4435 #, gcc-internal-format msgid "initialization makes pointer from integer without a cast" msgstr "" -#: c-typeck.c:4419 +#: c-typeck.c:4437 #, gcc-internal-format msgid "return makes pointer from integer without a cast" msgstr "" -#: c-typeck.c:4427 +#: c-typeck.c:4445 #, gcc-internal-format msgid "passing argument %d of %qE makes integer from pointer without a cast" msgstr "" -#: c-typeck.c:4429 +#: c-typeck.c:4447 #, gcc-internal-format msgid "assignment makes integer from pointer without a cast" msgstr "" -#: c-typeck.c:4431 +#: c-typeck.c:4449 #, gcc-internal-format msgid "initialization makes integer from pointer without a cast" msgstr "" -#: c-typeck.c:4433 +#: c-typeck.c:4451 #, gcc-internal-format msgid "return makes integer from pointer without a cast" msgstr "" -#: c-typeck.c:4449 +#: c-typeck.c:4467 #, gcc-internal-format msgid "incompatible types when assigning to type %qT from type %qT" msgstr "" -#: c-typeck.c:4453 +#: c-typeck.c:4471 #, gcc-internal-format msgid "incompatible types when initializing type %qT using type %qT" msgstr "" -#: c-typeck.c:4457 +#: c-typeck.c:4475 #, gcc-internal-format msgid "incompatible types when returning type %qT but %qT was expected" msgstr "" -#: c-typeck.c:4514 +#: c-typeck.c:4532 #, gcc-internal-format msgid "traditional C rejects automatic aggregate initialization" msgstr "" -#: c-typeck.c:4685 c-typeck.c:4701 c-typeck.c:4718 +#: c-typeck.c:4703 c-typeck.c:4719 c-typeck.c:4736 #, gcc-internal-format msgid "(near initialization for %qs)" msgstr "" -#: c-typeck.c:5273 cp/decl.c:5124 +#: c-typeck.c:5291 cp/decl.c:5158 #, gcc-internal-format msgid "opaque vector types cannot be initialized" msgstr "" -#: c-typeck.c:5898 +#: c-typeck.c:5916 #, gcc-internal-format msgid "unknown field %qE specified in initializer" msgstr "" -#: c-typeck.c:6793 +#: c-typeck.c:6836 #, gcc-internal-format msgid "traditional C rejects initialization of unions" msgstr "" -#: c-typeck.c:7104 +#: c-typeck.c:7147 #, gcc-internal-format msgid "jump into statement expression" msgstr "" -#: c-typeck.c:7110 +#: c-typeck.c:7153 #, gcc-internal-format msgid "jump into scope of identifier with variably modified type" msgstr "" -#: c-typeck.c:7146 +#: c-typeck.c:7189 #, gcc-internal-format msgid "ISO C forbids %<goto *expr;%>" msgstr "" -#: c-typeck.c:7161 cp/typeck.c:6757 +#: c-typeck.c:7204 cp/typeck.c:6820 #, gcc-internal-format msgid "function declared %<noreturn%> has a %<return%> statement" msgstr "" -#: c-typeck.c:7170 +#: c-typeck.c:7213 #, gcc-internal-format msgid "%<return%> with no value, in function returning non-void" msgstr "" -#: c-typeck.c:7180 +#: c-typeck.c:7223 #, gcc-internal-format msgid "%<return%> with a value, in function returning void" msgstr "" -#: c-typeck.c:7182 +#: c-typeck.c:7225 #, gcc-internal-format msgid "ISO C forbids %<return%> with expression, in function returning void" msgstr "" -#: c-typeck.c:7239 +#: c-typeck.c:7284 #, gcc-internal-format msgid "function returns address of local variable" msgstr "" -#: c-typeck.c:7314 cp/semantics.c:949 +#: c-typeck.c:7359 cp/semantics.c:952 #, gcc-internal-format msgid "switch quantity not an integer" msgstr "" -#: c-typeck.c:7326 +#: c-typeck.c:7371 #, gcc-internal-format msgid "%<long%> switch expression not converted to %<int%> in ISO C" msgstr "" -#: c-typeck.c:7369 +#: c-typeck.c:7414 #, gcc-internal-format msgid "" "case label in statement expression not containing enclosing switch statement" msgstr "" -#: c-typeck.c:7372 +#: c-typeck.c:7417 #, gcc-internal-format msgid "" "%<default%> label in statement expression not containing enclosing switch " "statement" msgstr "" -#: c-typeck.c:7378 +#: c-typeck.c:7423 #, gcc-internal-format msgid "" "case label in scope of identifier with variably modified type not containing " "enclosing switch statement" msgstr "" -#: c-typeck.c:7381 +#: c-typeck.c:7426 #, gcc-internal-format msgid "" "%<default%> label in scope of identifier with variably modified type not " "containing enclosing switch statement" msgstr "" -#: c-typeck.c:7385 +#: c-typeck.c:7430 #, gcc-internal-format msgid "case label not within a switch statement" msgstr "" -#: c-typeck.c:7387 +#: c-typeck.c:7432 #, gcc-internal-format msgid "%<default%> label not within a switch statement" msgstr "" -#: c-typeck.c:7464 +#: c-typeck.c:7509 #, gcc-internal-format msgid "%Hsuggest explicit braces to avoid ambiguous %<else%>" msgstr "" -#: c-typeck.c:7573 cp/cp-gimplify.c:92 +#: c-typeck.c:7618 cp/cp-gimplify.c:92 #, gcc-internal-format msgid "break statement not within loop or switch" msgstr "" -#: c-typeck.c:7575 +#: c-typeck.c:7620 #, gcc-internal-format msgid "continue statement not within a loop" msgstr "" -#: c-typeck.c:7580 +#: c-typeck.c:7625 #, gcc-internal-format msgid "break statement used with OpenMP for loop" msgstr "" -#: c-typeck.c:7606 +#: c-typeck.c:7651 #, gcc-internal-format msgid "%Hstatement with no effect" msgstr "" -#: c-typeck.c:7628 +#: c-typeck.c:7673 #, gcc-internal-format msgid "expression statement has incomplete type" msgstr "" -#: c-typeck.c:8200 cp/typeck.c:3446 +#: c-typeck.c:8245 cp/typeck.c:3506 #, gcc-internal-format msgid "right shift count is negative" msgstr "" -#: c-typeck.c:8207 cp/typeck.c:3452 +#: c-typeck.c:8252 cp/typeck.c:3512 #, gcc-internal-format msgid "right shift count >= width of type" msgstr "" -#: c-typeck.c:8229 cp/typeck.c:3473 +#: c-typeck.c:8274 cp/typeck.c:3533 #, gcc-internal-format msgid "left shift count is negative" msgstr "" -#: c-typeck.c:8232 cp/typeck.c:3478 +#: c-typeck.c:8277 cp/typeck.c:3538 #, gcc-internal-format msgid "left shift count >= width of type" msgstr "" -#: c-typeck.c:8251 cp/typeck.c:3524 +#: c-typeck.c:8296 cp/typeck.c:3584 #, gcc-internal-format msgid "comparing floating point with == or != is unsafe" msgstr "" -#: c-typeck.c:8275 c-typeck.c:8282 +#: c-typeck.c:8320 c-typeck.c:8327 #, gcc-internal-format msgid "ISO C forbids comparison of %<void *%> with function pointer" msgstr "" -#: c-typeck.c:8289 c-typeck.c:8351 +#: c-typeck.c:8334 c-typeck.c:8396 #, gcc-internal-format msgid "comparison of distinct pointer types lacks a cast" msgstr "" -#: c-typeck.c:8299 c-typeck.c:8308 cp/typeck.c:3547 cp/typeck.c:3559 +#: c-typeck.c:8344 c-typeck.c:8353 cp/typeck.c:3607 cp/typeck.c:3619 #, gcc-internal-format msgid "the address of %qD will never be NULL" msgstr "" -#: c-typeck.c:8315 c-typeck.c:8320 c-typeck.c:8373 c-typeck.c:8378 +#: c-typeck.c:8360 c-typeck.c:8365 c-typeck.c:8418 c-typeck.c:8423 #, gcc-internal-format msgid "comparison between pointer and integer" msgstr "" -#: c-typeck.c:8342 +#: c-typeck.c:8387 #, gcc-internal-format msgid "comparison of complete and incomplete pointers" msgstr "" -#: c-typeck.c:8344 +#: c-typeck.c:8389 #, gcc-internal-format msgid "ISO C forbids ordered comparisons of pointers to functions" msgstr "" -#: c-typeck.c:8359 c-typeck.c:8362 c-typeck.c:8368 +#: c-typeck.c:8404 c-typeck.c:8407 c-typeck.c:8413 #, gcc-internal-format msgid "ordered comparison of pointer with integer zero" msgstr "" -#: c-typeck.c:8546 +#: c-typeck.c:8591 #, gcc-internal-format msgid "used array that cannot be converted to pointer where scalar is required" msgstr "" -#: c-typeck.c:8550 +#: c-typeck.c:8595 #, gcc-internal-format msgid "used struct type value where scalar is required" msgstr "" -#: c-typeck.c:8554 +#: c-typeck.c:8599 #, gcc-internal-format msgid "used union type value where scalar is required" msgstr "" -#: c-typeck.c:8690 cp/semantics.c:3670 +#: c-typeck.c:8735 cp/semantics.c:3685 #, gcc-internal-format msgid "%qE has invalid type for %<reduction%>" msgstr "" -#: c-typeck.c:8724 cp/semantics.c:3683 +#: c-typeck.c:8769 cp/semantics.c:3698 #, gcc-internal-format msgid "%qE has invalid type for %<reduction(%s)%>" msgstr "" -#: c-typeck.c:8740 cp/semantics.c:3693 +#: c-typeck.c:8785 cp/semantics.c:3708 #, gcc-internal-format msgid "%qE must be %<threadprivate%> for %<copyin%>" msgstr "" -#: c-typeck.c:8749 cp/semantics.c:3490 +#: c-typeck.c:8794 cp/semantics.c:3505 #, gcc-internal-format msgid "%qE is not a variable in clause %qs" msgstr "" -#: c-typeck.c:8756 c-typeck.c:8776 c-typeck.c:8796 +#: c-typeck.c:8801 c-typeck.c:8821 c-typeck.c:8841 #, gcc-internal-format msgid "%qE appears more than once in data clauses" msgstr "" -#: c-typeck.c:8770 cp/semantics.c:3513 +#: c-typeck.c:8815 cp/semantics.c:3528 #, gcc-internal-format msgid "%qE is not a variable in clause %<firstprivate%>" msgstr "" -#: c-typeck.c:8790 cp/semantics.c:3535 +#: c-typeck.c:8835 cp/semantics.c:3550 #, gcc-internal-format msgid "%qE is not a variable in clause %<lastprivate%>" msgstr "" -#: c-typeck.c:8850 cp/semantics.c:3734 +#: c-typeck.c:8895 cp/semantics.c:3749 #, gcc-internal-format msgid "%qE is predetermined %qs for %qs" msgstr "" -#: calls.c:2049 +#: calls.c:2055 #, gcc-internal-format msgid "function call has aggregate value" msgstr "" -#: cfgexpand.c:298 +#: cfgexpand.c:299 #, gcc-internal-format msgid "Unrecognized GIMPLE statement during RTL expansion" msgstr "" -#: cfgexpand.c:2343 +#: cfgexpand.c:2332 #, gcc-internal-format msgid "not protecting local variables: variable length buffer" msgstr "" -#: cfgexpand.c:2346 +#: cfgexpand.c:2335 #, gcc-internal-format msgid "not protecting function: no buffer at least %d bytes long" msgstr "" @@ -22928,27 +22698,27 @@ msgstr "" msgid "failed to reclaim unneeded function" msgstr "" -#: cgraphunit.c:1343 +#: cgraphunit.c:1342 #, gcc-internal-format msgid "nodes with unreleased memory found" msgstr "" -#: collect2.c:1209 +#: collect2.c:1210 #, gcc-internal-format msgid "unknown demangling style '%s'" msgstr "" -#: collect2.c:1532 +#: collect2.c:1533 #, gcc-internal-format msgid "%s terminated with signal %d [%s]%s" msgstr "" -#: collect2.c:1550 +#: collect2.c:1551 #, gcc-internal-format msgid "%s returned %d exit status" msgstr "" -#: collect2.c:2261 +#: collect2.c:2262 #, gcc-internal-format msgid "cannot find 'ldd'" msgstr "" @@ -22958,47 +22728,47 @@ msgstr "" msgid "cannot convert to a pointer type" msgstr "" -#: convert.c:364 +#: convert.c:369 #, gcc-internal-format msgid "pointer value used where a floating point value was expected" msgstr "" -#: convert.c:368 +#: convert.c:373 #, gcc-internal-format msgid "aggregate value used where a float was expected" msgstr "" -#: convert.c:393 +#: convert.c:398 #, gcc-internal-format msgid "conversion to incomplete type" msgstr "" -#: convert.c:762 convert.c:838 +#: convert.c:768 convert.c:844 #, gcc-internal-format msgid "can't convert between vector values of different size" msgstr "" -#: convert.c:768 +#: convert.c:774 #, gcc-internal-format msgid "aggregate value used where an integer was expected" msgstr "" -#: convert.c:818 +#: convert.c:824 #, gcc-internal-format msgid "pointer value used where a complex was expected" msgstr "" -#: convert.c:822 +#: convert.c:828 #, gcc-internal-format msgid "aggregate value used where a complex was expected" msgstr "" -#: convert.c:844 +#: convert.c:850 #, gcc-internal-format msgid "can't convert value to a vector" msgstr "" -#: convert.c:883 +#: convert.c:889 #, gcc-internal-format msgid "aggregate value used where a fixed-point was expected" msgstr "" @@ -23063,12 +22833,12 @@ msgstr "" msgid "this can result in poorly optimized code" msgstr "" -#: coverage.c:568 +#: coverage.c:570 #, gcc-internal-format msgid "cannot open %s" msgstr "" -#: coverage.c:603 +#: coverage.c:605 #, gcc-internal-format msgid "error writing %qs" msgstr "" @@ -23108,27 +22878,27 @@ msgstr "" msgid "dominator of %d should be %d, not %d" msgstr "" -#: dwarf2out.c:4467 +#: dwarf2out.c:4522 #, gcc-internal-format msgid "DW_LOC_OP %s not implemented" msgstr "" -#: emit-rtl.c:2365 +#: emit-rtl.c:2465 #, gcc-internal-format msgid "invalid rtl sharing found in the insn" msgstr "" -#: emit-rtl.c:2367 +#: emit-rtl.c:2467 #, gcc-internal-format msgid "shared rtx" msgstr "" -#: emit-rtl.c:2369 +#: emit-rtl.c:2469 #, gcc-internal-format msgid "internal consistency failure" msgstr "" -#: emit-rtl.c:3429 +#: emit-rtl.c:3529 #, gcc-internal-format msgid "ICE: emit_insn used where emit_jump_insn needed:\n" msgstr "" @@ -23143,47 +22913,47 @@ msgstr "" msgid "exception handling disabled, use -fexceptions to enable" msgstr "" -#: except.c:2854 +#: except.c:2856 #, gcc-internal-format msgid "argument of %<__builtin_eh_return_regno%> must be constant" msgstr "" -#: except.c:2987 +#: except.c:2989 #, gcc-internal-format msgid "__builtin_eh_return not supported on this target" msgstr "" -#: except.c:3861 except.c:3870 +#: except.c:3863 except.c:3872 #, gcc-internal-format msgid "region_array is corrupted for region %i" msgstr "" -#: except.c:3875 +#: except.c:3877 #, gcc-internal-format msgid "outer block of region %i is wrong" msgstr "" -#: except.c:3880 +#: except.c:3882 #, gcc-internal-format msgid "region %i may contain throw and is contained in region that may not" msgstr "" -#: except.c:3886 +#: except.c:3888 #, gcc-internal-format msgid "negative nesting depth of region %i" msgstr "" -#: except.c:3906 +#: except.c:3908 #, gcc-internal-format msgid "tree list ends on depth %i" msgstr "" -#: except.c:3911 +#: except.c:3913 #, gcc-internal-format msgid "array does not match the region tree" msgstr "" -#: except.c:3917 +#: except.c:3919 #, gcc-internal-format msgid "verify_eh_tree failed" msgstr "" @@ -23197,7 +22967,7 @@ msgstr "" msgid "%Kcall to %qs declared with attribute error: %s" msgstr "" -#: expr.c:8064 +#: expr.c:8065 msgid "%Kcall to %qs declared with attribute warning: %s" msgstr "" @@ -23216,85 +22986,90 @@ msgstr "" msgid "large fixed-point constant implicitly truncated to fixed-point type" msgstr "" -#: fold-const.c:989 tree-ssa-loop-niter.c:1854 tree-vrp.c:5595 tree-vrp.c:5636 +#: fold-const.c:992 tree-ssa-loop-niter.c:1880 tree-vrp.c:5715 tree-vrp.c:5756 #, gcc-internal-format msgid "%H%s" msgstr "" -#: fold-const.c:1359 +#: fold-const.c:1362 #, gcc-internal-format msgid "assuming signed overflow does not occur when negating a division" msgstr "" -#: fold-const.c:5127 +#: fold-const.c:4016 fold-const.c:4027 +#, gcc-internal-format +msgid "comparison is always %d due to width of bit-field" +msgstr "" + +#: fold-const.c:5353 #, gcc-internal-format msgid "assuming signed overflow does not occur when simplifying range test" msgstr "" -#: fold-const.c:5504 fold-const.c:5519 +#: fold-const.c:5730 fold-const.c:5745 #, gcc-internal-format msgid "comparison is always %d" msgstr "" -#: fold-const.c:5536 +#: fold-const.c:5874 #, gcc-internal-format msgid "%<or%> of unmatched not-equal tests is always 1" msgstr "" -#: fold-const.c:5541 +#: fold-const.c:5879 #, gcc-internal-format msgid "%<and%> of mutually exclusive equal-tests is always 0" msgstr "" -#: fold-const.c:8432 +#: fold-const.c:8778 #, gcc-internal-format msgid "" "assuming signed overflow does not occur when reducing constant in comparison" msgstr "" -#: fold-const.c:8799 +#: fold-const.c:9145 #, gcc-internal-format msgid "" "assuming signed overflow does not occur when combining constants around a " "comparison" msgstr "" -#: fold-const.c:13334 +#: fold-const.c:13681 #, gcc-internal-format msgid "fold check: original tree changed by fold" msgstr "" -#: function.c:306 +#: function.c:251 #, gcc-internal-format msgid "%Jtotal size of local objects too large" msgstr "" -#: function.c:802 varasm.c:2139 +#: function.c:918 varasm.c:2139 #, gcc-internal-format msgid "size of variable %q+D is too large" msgstr "" -#: function.c:1546 gimplify.c:4775 +#: function.c:1626 gimplify.c:4743 #, gcc-internal-format msgid "impossible constraint in %<asm%>" msgstr "" -#: function.c:3614 +#: function.c:3732 #, gcc-internal-format msgid "variable %q+D might be clobbered by %<longjmp%> or %<vfork%>" msgstr "" -#: function.c:3635 +#: function.c:3753 #, gcc-internal-format msgid "argument %q+D might be clobbered by %<longjmp%> or %<vfork%>" msgstr "" -#: function.c:4079 +#: function.c:4198 #, gcc-internal-format msgid "function returns an aggregate" msgstr "" -#: function.c:4480 +#: function.c:4599 #, gcc-internal-format msgid "unused parameter %q+D" msgstr "" @@ -23319,12 +23094,12 @@ msgstr "" msgid "extraneous argument to '%s' option" msgstr "" -#: gcc.c:4011 +#: gcc.c:4029 #, gcc-internal-format msgid "warning: -pipe ignored because -save-temps specified" msgstr "" -#: gcc.c:4304 +#: gcc.c:4322 #, gcc-internal-format msgid "warning: '-x %s' after last input file has no effect" msgstr "" @@ -23332,52 +23107,52 @@ msgstr "" #. Catch the case where a spec string contains something like #. '%{foo:%*}'. i.e. there is no * in the pattern on the left #. hand side of the :. -#: gcc.c:5387 +#: gcc.c:5405 #, gcc-internal-format msgid "spec failure: '%%*' has not been initialized by pattern match" msgstr "" -#: gcc.c:5396 +#: gcc.c:5414 #, gcc-internal-format msgid "warning: use of obsolete %%[ operator in specs" msgstr "" -#: gcc.c:5477 +#: gcc.c:5495 #, gcc-internal-format msgid "spec failure: unrecognized spec option '%c'" msgstr "" -#: gcc.c:6383 +#: gcc.c:6401 #, gcc-internal-format msgid "spec failure: more than one arg to SYSROOT_SUFFIX_SPEC" msgstr "" -#: gcc.c:6406 +#: gcc.c:6424 #, gcc-internal-format msgid "spec failure: more than one arg to SYSROOT_HEADERS_SUFFIX_SPEC" msgstr "" -#: gcc.c:6493 +#: gcc.c:6511 #, gcc-internal-format msgid "unrecognized option '-%s'" msgstr "" -#: gcc.c:6705 gcc.c:6768 +#: gcc.c:6726 gcc.c:6789 #, gcc-internal-format msgid "%s: %s compiler not installed on this system" msgstr "" -#: gcc.c:6868 +#: gcc.c:6889 #, gcc-internal-format msgid "%s: linker input file unused because linking not done" msgstr "" -#: gcc.c:6908 +#: gcc.c:6929 #, gcc-internal-format msgid "language %s not recognized" msgstr "" -#: gcc.c:6979 +#: gcc.c:7000 #, gcc-internal-format msgid "%s: %s" msgstr "" @@ -23440,67 +23215,62 @@ msgstr "" msgid "gimple check: expected %s(%s), have %s(%s) in %s, at %s:%d" msgstr "" -#: gimplify.c:4660 +#: gimplify.c:4628 #, gcc-internal-format msgid "invalid lvalue in asm output %d" msgstr "" -#: gimplify.c:4776 +#: gimplify.c:4744 #, gcc-internal-format msgid "non-memory input %d must stay in memory" msgstr "" -#: gimplify.c:4791 +#: gimplify.c:4759 #, gcc-internal-format msgid "memory input %d is not directly addressable" msgstr "" -#: gimplify.c:5285 +#: gimplify.c:5253 #, gcc-internal-format msgid "%qs not specified in enclosing parallel" msgstr "" -#: gimplify.c:5287 +#: gimplify.c:5255 #, gcc-internal-format msgid "%Henclosing parallel" msgstr "" -#: gimplify.c:5378 +#: gimplify.c:5360 #, gcc-internal-format msgid "iteration variable %qs should be private" msgstr "" -#: gimplify.c:5392 +#: gimplify.c:5374 #, gcc-internal-format msgid "iteration variable %qs should not be firstprivate" msgstr "" -#: gimplify.c:5395 +#: gimplify.c:5377 #, gcc-internal-format msgid "iteration variable %qs should not be reduction" msgstr "" -#: gimplify.c:5558 +#: gimplify.c:5540 #, gcc-internal-format msgid "%s variable %qs is private in outer context" msgstr "" -#: gimplify.c:7059 +#: gimplify.c:7056 #, gcc-internal-format msgid "gimplification failed" msgstr "" -#: global.c:272 global.c:285 global.c:299 ira.c:1321 ira.c:1334 ira.c:1348 -#, gcc-internal-format -msgid "%s cannot be used in asm here" -msgstr "" - #: graph.c:401 java/jcf-parse.c:1750 java/jcf-parse.c:1890 objc/objc-act.c:493 #, gcc-internal-format msgid "can't open %s: %m" msgstr "" -#: graphite.c:5253 toplev.c:1712 +#: graphite.c:6190 toplev.c:1714 #, gcc-internal-format msgid "Graphite loop optimizations cannot be used" msgstr "" @@ -23510,59 +23280,64 @@ msgstr "" msgid "fix_sched_param: unknown param: %s" msgstr "" -#: omp-low.c:1817 +#: ira.c:1436 ira.c:1449 ira.c:1463 +#, gcc-internal-format +msgid "%s cannot be used in asm here" +msgstr "" + +#: omp-low.c:1818 #, gcc-internal-format msgid "" "barrier region may not be closely nested inside of work-sharing, critical, " "ordered, master or explicit task region" msgstr "" -#: omp-low.c:1822 +#: omp-low.c:1823 #, gcc-internal-format msgid "" "work-sharing region may not be closely nested inside of work-sharing, " "critical, ordered, master or explicit task region" msgstr "" -#: omp-low.c:1840 +#: omp-low.c:1841 #, gcc-internal-format msgid "" "master region may not be closely nested inside of work-sharing or explicit " "task region" msgstr "" -#: omp-low.c:1855 +#: omp-low.c:1856 #, gcc-internal-format msgid "" "ordered region may not be closely nested inside of critical or explicit task " "region" msgstr "" -#: omp-low.c:1861 +#: omp-low.c:1862 #, gcc-internal-format msgid "" "ordered region must be closely nested inside a loop region with an ordered " "clause" msgstr "" -#: omp-low.c:1876 +#: omp-low.c:1877 #, gcc-internal-format msgid "" "critical region may not be nested inside a critical region with the same name" msgstr "" -#: omp-low.c:6622 cp/decl.c:2667 +#: omp-low.c:6632 cp/decl.c:2680 #, gcc-internal-format msgid "invalid exit from OpenMP structured block" msgstr "" -#: omp-low.c:6624 omp-low.c:6629 +#: omp-low.c:6634 omp-low.c:6639 #, gcc-internal-format msgid "invalid entry to OpenMP structured block" msgstr "" #. Otherwise, be vague and lazy, but efficient. -#: omp-low.c:6632 +#: omp-low.c:6642 #, gcc-internal-format msgid "invalid branch to/from an OpenMP structured block" msgstr "" @@ -23590,7 +23365,7 @@ msgstr "" msgid "command line option \"%s\" is valid for %s but not for %s" msgstr "" -#: opts.c:479 opts.c:799 +#: opts.c:479 opts.c:807 #, gcc-internal-format msgid "unrecognized command line option \"%s\"" msgstr "" @@ -23610,128 +23385,133 @@ msgstr "" msgid "argument to \"%s\" should be a non-negative integer" msgstr "" -#: opts.c:761 +#: opts.c:769 #, gcc-internal-format msgid "disallowed call to %qs" msgstr "" -#: opts.c:1015 +#: opts.c:1031 #, gcc-internal-format msgid "Section anchors must be disabled when unit-at-a-time is disabled." msgstr "" -#: opts.c:1019 +#: opts.c:1035 #, gcc-internal-format msgid "Toplevel reorder must be disabled when unit-at-a-time is disabled." msgstr "" -#: opts.c:1034 +#: opts.c:1050 #, gcc-internal-format msgid "section anchors must be disabled when toplevel reorder is disabled" msgstr "" -#: opts.c:1064 +#: opts.c:1080 #, gcc-internal-format msgid "-freorder-blocks-and-partition does not work with exceptions" msgstr "" -#: opts.c:1075 +#: opts.c:1091 #, gcc-internal-format msgid "-freorder-blocks-and-partition does not support unwind info" msgstr "" -#: opts.c:1089 +#: opts.c:1105 #, gcc-internal-format msgid "-freorder-blocks-and-partition does not work on this architecture" msgstr "" -#: opts.c:1101 +#: opts.c:1119 #, gcc-internal-format -msgid "-fira does not work on this architecture" +msgid "-fira-algorithm=CB does not work on this architecture" msgstr "" -#: opts.c:1406 +#: opts.c:1428 #, gcc-internal-format msgid "unrecognized include_flags 0x%x passed to print_specific_help" msgstr "" -#: opts.c:1780 +#: opts.c:1809 #, gcc-internal-format msgid "structure alignment must be a small power of two, not %d" msgstr "" -#: opts.c:1867 +#: opts.c:1896 #, gcc-internal-format msgid "unrecognized visibility value \"%s\"" msgstr "" -#: opts.c:1925 +#: opts.c:1954 #, gcc-internal-format msgid "unknown stack check parameter \"%s\"" msgstr "" -#: opts.c:1951 +#: opts.c:1980 #, gcc-internal-format msgid "unrecognized register name \"%s\"" msgstr "" -#: opts.c:1975 +#: opts.c:2004 #, gcc-internal-format msgid "unknown tls-model \"%s\"" msgstr "" -#: opts.c:1986 +#: opts.c:2013 #, gcc-internal-format msgid "unknown ira algorithm \"%s\"" msgstr "" -#: opts.c:2089 +#: opts.c:2024 +#, gcc-internal-format +msgid "unknown ira region \"%s\"" +msgstr "" + +#: opts.c:2127 #, gcc-internal-format msgid "%s: --param arguments should be of the form NAME=VALUE" msgstr "" -#: opts.c:2094 +#: opts.c:2132 #, gcc-internal-format msgid "invalid --param value %qs" msgstr "" -#: opts.c:2212 +#: opts.c:2250 #, gcc-internal-format msgid "target system does not support debug output" msgstr "" -#: opts.c:2219 +#: opts.c:2257 #, gcc-internal-format msgid "debug format \"%s\" conflicts with prior selection" msgstr "" -#: opts.c:2235 +#: opts.c:2273 #, gcc-internal-format msgid "unrecognised debug output level \"%s\"" msgstr "" -#: opts.c:2237 +#: opts.c:2275 #, gcc-internal-format msgid "debug output level %s is too high" msgstr "" -#: opts.c:2319 +#: opts.c:2357 #, gcc-internal-format msgid "-Werror=%s: No option -%s" msgstr "" -#: params.c:68 +#: params.c:69 #, gcc-internal-format msgid "minimum value of parameter %qs is %u" msgstr "" -#: params.c:73 +#: params.c:74 #, gcc-internal-format msgid "maximum value of parameter %qs is %u" msgstr "" #. If we didn't find this parameter, issue an error message. -#: params.c:85 +#: params.c:86 #, gcc-internal-format msgid "invalid parameter %qs" msgstr "" @@ -23799,49 +23579,49 @@ msgstr "" msgid "output operand %d must use %<&%> constraint" msgstr "" -#: regclass.c:873 +#: reginfo.c:820 #, gcc-internal-format msgid "can't use '%s' as a %s register" msgstr "" -#: regclass.c:888 config/ia64/ia64.c:5175 config/ia64/ia64.c:5182 -#: config/pa/pa.c:362 config/pa/pa.c:369 config/sh/sh.c:7961 -#: config/sh/sh.c:7968 config/spu/spu.c:4486 config/spu/spu.c:4493 +#: reginfo.c:835 config/ia64/ia64.c:5180 config/ia64/ia64.c:5187 +#: config/pa/pa.c:363 config/pa/pa.c:370 config/sh/sh.c:7963 +#: config/sh/sh.c:7970 config/spu/spu.c:4489 config/spu/spu.c:4496 #, gcc-internal-format msgid "unknown register name: %s" msgstr "" -#: regclass.c:898 +#: reginfo.c:844 #, gcc-internal-format msgid "global register variable follows a function definition" msgstr "" -#: regclass.c:902 +#: reginfo.c:848 #, gcc-internal-format msgid "register used for two global register variables" msgstr "" -#: regclass.c:907 +#: reginfo.c:853 #, gcc-internal-format msgid "call-clobbered register used for global register variable" msgstr "" -#: regrename.c:1898 +#: regrename.c:1907 #, gcc-internal-format msgid "validate_value_data: [%u] Bad next_regno for empty chain (%u)" msgstr "" -#: regrename.c:1910 +#: regrename.c:1919 #, gcc-internal-format msgid "validate_value_data: Loop in regno chain (%u)" msgstr "" -#: regrename.c:1913 +#: regrename.c:1922 #, gcc-internal-format msgid "validate_value_data: [%u] Bad oldest_regno (%u)" msgstr "" -#: regrename.c:1925 +#: regrename.c:1934 #, gcc-internal-format msgid "validate_value_data: [%u] Non-empty reg in chain (%s %u %i)" msgstr "" @@ -23856,12 +23636,12 @@ msgstr "" msgid "impossible register constraint in %<asm%>" msgstr "" -#: reload.c:3615 +#: reload.c:3611 #, gcc-internal-format msgid "%<&%> constraint used with no register class" msgstr "" -#: reload.c:3786 reload.c:4044 +#: reload.c:3782 reload.c:4040 #, gcc-internal-format msgid "inconsistent operand constraints in an %<asm%>" msgstr "" @@ -23891,17 +23671,17 @@ msgstr "" msgid "unable to find a register to spill in class %qs" msgstr "" -#: reload1.c:4270 +#: reload1.c:4249 #, gcc-internal-format msgid "%<asm%> operand requires impossible reload" msgstr "" -#: reload1.c:5616 +#: reload1.c:5632 #, gcc-internal-format msgid "%<asm%> operand constraint incompatible with operand size" msgstr "" -#: reload1.c:7565 +#: reload1.c:7583 #, gcc-internal-format msgid "output operand is constant in %<asm%>" msgstr "" @@ -24108,32 +23888,37 @@ msgstr "" msgid "padding struct to align %q+D" msgstr "" -#: stor-layout.c:1259 +#: stor-layout.c:969 +#, gcc-internal-format +msgid "Offset of packed bit-field %qD has changed in GCC 4.4" +msgstr "" + +#: stor-layout.c:1273 #, gcc-internal-format msgid "padding struct size to alignment boundary" msgstr "" -#: stor-layout.c:1289 +#: stor-layout.c:1303 #, gcc-internal-format msgid "packed attribute causes inefficient alignment for %qs" msgstr "" -#: stor-layout.c:1293 +#: stor-layout.c:1307 #, gcc-internal-format msgid "packed attribute is unnecessary for %qs" msgstr "" -#: stor-layout.c:1299 +#: stor-layout.c:1313 #, gcc-internal-format msgid "packed attribute causes inefficient alignment" msgstr "" -#: stor-layout.c:1301 +#: stor-layout.c:1315 #, gcc-internal-format msgid "packed attribute is unnecessary" msgstr "" -#: stor-layout.c:1831 +#: stor-layout.c:1848 #, gcc-internal-format msgid "alignment of array elements is greater than element size" msgstr "" @@ -24153,630 +23938,635 @@ msgstr "" msgid "#pragma GCC target is not supported for this machine" msgstr "" -#: tlink.c:482 +#: tlink.c:483 #, gcc-internal-format msgid "repository file '%s' does not contain command-line arguments" msgstr "" -#: tlink.c:730 +#: tlink.c:731 #, gcc-internal-format msgid "" "'%s' was assigned to '%s', but was not defined during recompilation, or vice " "versa" msgstr "" -#: tlink.c:800 +#: tlink.c:801 #, gcc-internal-format msgid "ld returned %d exit status" msgstr "" -#: toplev.c:517 +#: toplev.c:519 #, gcc-internal-format msgid "invalid option argument %qs" msgstr "" -#: toplev.c:615 +#: toplev.c:617 #, gcc-internal-format msgid "getting core file size maximum limit: %m" msgstr "" -#: toplev.c:618 +#: toplev.c:620 #, gcc-internal-format msgid "setting core file size limit to maximum: %m" msgstr "" -#: toplev.c:838 +#: toplev.c:840 #, gcc-internal-format msgid "%q+F declared %<static%> but never defined" msgstr "" -#: toplev.c:866 +#: toplev.c:868 #, gcc-internal-format msgid "%q+D defined but not used" msgstr "" -#: toplev.c:909 +#: toplev.c:911 #, gcc-internal-format msgid "%qD is deprecated (declared at %s:%d)" msgstr "" -#: toplev.c:932 +#: toplev.c:934 #, gcc-internal-format msgid "%qs is deprecated (declared at %s:%d)" msgstr "" -#: toplev.c:936 +#: toplev.c:938 #, gcc-internal-format msgid "type is deprecated (declared at %s:%d)" msgstr "" -#: toplev.c:942 +#: toplev.c:944 #, gcc-internal-format msgid "%qs is deprecated" msgstr "" -#: toplev.c:944 +#: toplev.c:946 #, gcc-internal-format msgid "type is deprecated" msgstr "" -#: toplev.c:1088 +#: toplev.c:1090 #, gcc-internal-format msgid "unrecognized gcc debugging option: %c" msgstr "" -#: toplev.c:1341 +#: toplev.c:1343 #, gcc-internal-format msgid "can%'t open %s for writing: %m" msgstr "" -#: toplev.c:1362 +#: toplev.c:1364 #, gcc-internal-format msgid "-frecord-gcc-switches is not supported by the current target" msgstr "" -#: toplev.c:1686 +#: toplev.c:1688 #, gcc-internal-format msgid "this target does not support %qs" msgstr "" -#: toplev.c:1741 +#: toplev.c:1743 #, gcc-internal-format msgid "instruction scheduling not supported on this target machine" msgstr "" -#: toplev.c:1745 +#: toplev.c:1747 #, gcc-internal-format msgid "this target machine does not have delayed branches" msgstr "" -#: toplev.c:1759 +#: toplev.c:1761 #, gcc-internal-format msgid "-f%sleading-underscore not supported on this target machine" msgstr "" -#: toplev.c:1832 +#: toplev.c:1834 #, gcc-internal-format msgid "target system does not support the \"%s\" debug format" msgstr "" -#: toplev.c:1845 +#: toplev.c:1847 #, gcc-internal-format msgid "variable tracking requested, but useless unless producing debug info" msgstr "" -#: toplev.c:1848 +#: toplev.c:1850 #, gcc-internal-format msgid "variable tracking requested, but not supported by this debug format" msgstr "" -#: toplev.c:1882 +#: toplev.c:1884 #, gcc-internal-format msgid "can%'t open %s: %m" msgstr "" -#: toplev.c:1889 +#: toplev.c:1891 #, gcc-internal-format msgid "-ffunction-sections not supported for this target" msgstr "" -#: toplev.c:1894 +#: toplev.c:1896 #, gcc-internal-format msgid "-fdata-sections not supported for this target" msgstr "" -#: toplev.c:1901 +#: toplev.c:1903 #, gcc-internal-format msgid "-ffunction-sections disabled; it makes profiling impossible" msgstr "" -#: toplev.c:1908 +#: toplev.c:1910 #, gcc-internal-format msgid "-fprefetch-loop-arrays not supported for this target" msgstr "" -#: toplev.c:1914 +#: toplev.c:1916 #, gcc-internal-format msgid "" "-fprefetch-loop-arrays not supported for this target (try -march switches)" msgstr "" -#: toplev.c:1923 +#: toplev.c:1925 #, gcc-internal-format msgid "-fprefetch-loop-arrays is not supported with -Os" msgstr "" -#: toplev.c:1934 +#: toplev.c:1936 #, gcc-internal-format msgid "-fassociative-math disabled; other options take precedence" msgstr "" -#: toplev.c:1950 +#: toplev.c:1952 #, gcc-internal-format msgid "-fstack-protector not supported for this target" msgstr "" -#: toplev.c:1963 +#: toplev.c:1965 #, gcc-internal-format msgid "unwind tables currently require a frame pointer for correctness" msgstr "" -#: toplev.c:2148 +#: toplev.c:2150 #, gcc-internal-format msgid "error writing to %s: %m" msgstr "" -#: toplev.c:2150 java/jcf-parse.c:1769 +#: toplev.c:2152 java/jcf-parse.c:1769 #, gcc-internal-format msgid "error closing %s: %m" msgstr "" -#: tree-cfg.c:1508 tree-cfg.c:2174 +#: tree-cfg.c:1513 tree-cfg.c:2186 #, gcc-internal-format msgid "%Hwill never be executed" msgstr "" -#: tree-cfg.c:2808 +#: tree-cfg.c:2820 #, gcc-internal-format msgid "SSA name in freelist but still referenced" msgstr "" -#: tree-cfg.c:2817 +#: tree-cfg.c:2829 +#, gcc-internal-format +msgid "Indirect reference's operand is not a register or a constant." +msgstr "" + +#: tree-cfg.c:2838 #, gcc-internal-format msgid "ASSERT_EXPR with an always-false condition" msgstr "" -#: tree-cfg.c:2827 +#: tree-cfg.c:2844 #, gcc-internal-format -msgid "GIMPLE register modified with BIT_FIELD_REF" +msgid "MODIFY_EXPR not expected while having tuples." msgstr "" -#: tree-cfg.c:2850 +#: tree-cfg.c:2865 #, gcc-internal-format msgid "constant not recomputed when ADDR_EXPR changed" msgstr "" -#: tree-cfg.c:2855 +#: tree-cfg.c:2870 #, gcc-internal-format msgid "side effects not recomputed when ADDR_EXPR changed" msgstr "" -#: tree-cfg.c:2871 +#: tree-cfg.c:2886 tree-ssa.c:491 #, gcc-internal-format msgid "address taken, but ADDRESSABLE bit not set" msgstr "" -#: tree-cfg.c:2882 +#: tree-cfg.c:2897 #, gcc-internal-format msgid "non-integral used in condition" msgstr "" -#: tree-cfg.c:2887 +#: tree-cfg.c:2902 #, gcc-internal-format msgid "invalid conditional operand" msgstr "" -#: tree-cfg.c:2934 +#: tree-cfg.c:2949 #, gcc-internal-format msgid "invalid position or size operand to BIT_FIELD_REF" msgstr "" -#: tree-cfg.c:2941 +#: tree-cfg.c:2956 #, gcc-internal-format msgid "" "integral result type precision does not match field size of BIT_FIELD_REF" msgstr "" -#: tree-cfg.c:2949 +#: tree-cfg.c:2964 #, gcc-internal-format msgid "" "mode precision of non-integral result does not match field size of " "BIT_FIELD_REF" msgstr "" -#: tree-cfg.c:2960 +#: tree-cfg.c:2975 #, gcc-internal-format msgid "invalid reference prefix" msgstr "" -#: tree-cfg.c:2971 +#: tree-cfg.c:2986 #, gcc-internal-format msgid "invalid operand to plus/minus, type is a pointer" msgstr "" -#: tree-cfg.c:2982 +#: tree-cfg.c:2997 #, gcc-internal-format msgid "invalid operand to pointer plus, first operand is not a pointer" msgstr "" -#: tree-cfg.c:2990 +#: tree-cfg.c:3005 #, gcc-internal-format msgid "" "invalid operand to pointer plus, second operand is not an integer with type " "of sizetype." msgstr "" -#: tree-cfg.c:3061 +#: tree-cfg.c:3076 #, gcc-internal-format msgid "invalid expression for min lvalue" msgstr "" -#: tree-cfg.c:3072 +#: tree-cfg.c:3087 #, gcc-internal-format msgid "invalid operand in indirect reference" msgstr "" -#: tree-cfg.c:3079 +#: tree-cfg.c:3094 #, gcc-internal-format msgid "type mismatch in indirect reference" msgstr "" -#: tree-cfg.c:3107 +#: tree-cfg.c:3122 #, gcc-internal-format msgid "invalid operands to array reference" msgstr "" -#: tree-cfg.c:3118 +#: tree-cfg.c:3133 #, gcc-internal-format msgid "type mismatch in array reference" msgstr "" -#: tree-cfg.c:3127 +#: tree-cfg.c:3142 #, gcc-internal-format msgid "type mismatch in array range reference" msgstr "" -#: tree-cfg.c:3138 +#: tree-cfg.c:3153 #, gcc-internal-format msgid "type mismatch in real/imagpart reference" msgstr "" -#: tree-cfg.c:3148 +#: tree-cfg.c:3163 #, gcc-internal-format msgid "type mismatch in component reference" msgstr "" -#: tree-cfg.c:3210 +#: tree-cfg.c:3225 #, gcc-internal-format msgid "non-function in gimple call" msgstr "" -#: tree-cfg.c:3217 +#: tree-cfg.c:3232 #, gcc-internal-format msgid "invalid LHS in gimple call" msgstr "" -#: tree-cfg.c:3233 +#: tree-cfg.c:3248 #, gcc-internal-format msgid "invalid conversion in gimple call" msgstr "" -#: tree-cfg.c:3258 +#: tree-cfg.c:3273 #, gcc-internal-format msgid "invalid operands in gimple comparison" msgstr "" -#: tree-cfg.c:3276 +#: tree-cfg.c:3291 #, gcc-internal-format msgid "type mismatch in comparison expression" msgstr "" -#: tree-cfg.c:3302 +#: tree-cfg.c:3317 #, gcc-internal-format msgid "non-register as LHS of unary operation" msgstr "" -#: tree-cfg.c:3308 +#: tree-cfg.c:3323 #, gcc-internal-format msgid "invalid operand in unary operation" msgstr "" -#: tree-cfg.c:3343 +#: tree-cfg.c:3358 #, gcc-internal-format msgid "invalid types in nop conversion" msgstr "" -#: tree-cfg.c:3357 +#: tree-cfg.c:3372 #, gcc-internal-format msgid "invalid types in fixed-point conversion" msgstr "" -#: tree-cfg.c:3370 +#: tree-cfg.c:3385 #, gcc-internal-format msgid "invalid types in conversion to floating point" msgstr "" -#: tree-cfg.c:3383 +#: tree-cfg.c:3398 #, gcc-internal-format msgid "invalid types in conversion to integer" msgstr "" -#: tree-cfg.c:3418 +#: tree-cfg.c:3433 #, gcc-internal-format msgid "non-trivial conversion in unary operation" msgstr "" -#: tree-cfg.c:3445 +#: tree-cfg.c:3460 #, gcc-internal-format msgid "non-register as LHS of binary operation" msgstr "" -#: tree-cfg.c:3452 +#: tree-cfg.c:3467 #, gcc-internal-format msgid "invalid operands in binary operation" msgstr "" -#: tree-cfg.c:3467 +#: tree-cfg.c:3482 #, gcc-internal-format msgid "type mismatch in complex expression" msgstr "" -#: tree-cfg.c:3486 +#: tree-cfg.c:3507 #, gcc-internal-format msgid "type mismatch in shift expression" msgstr "" -#: tree-cfg.c:3506 +#: tree-cfg.c:3528 #, gcc-internal-format msgid "type mismatch in vector shift expression" msgstr "" -#: tree-cfg.c:3522 +#: tree-cfg.c:3544 #, gcc-internal-format msgid "type mismatch in pointer plus expression" msgstr "" -#: tree-cfg.c:3545 +#: tree-cfg.c:3567 #, gcc-internal-format msgid "type mismatch in binary truth expression" msgstr "" -#: tree-cfg.c:3580 +#: tree-cfg.c:3602 #, gcc-internal-format msgid "invalid (pointer) operands to plus/minus" msgstr "" -#: tree-cfg.c:3625 +#: tree-cfg.c:3647 #, gcc-internal-format msgid "type mismatch in binary expression" msgstr "" -#: tree-cfg.c:3650 +#: tree-cfg.c:3672 #, gcc-internal-format msgid "non-trivial conversion at assignment" msgstr "" -#: tree-cfg.c:3667 +#: tree-cfg.c:3689 #, gcc-internal-format msgid "invalid operand in unary expression" msgstr "" -#: tree-cfg.c:3677 +#: tree-cfg.c:3699 #, gcc-internal-format msgid "type mismatch in address expression" msgstr "" -#: tree-cfg.c:3701 tree-cfg.c:3727 +#: tree-cfg.c:3723 tree-cfg.c:3749 #, gcc-internal-format msgid "invalid rhs for gimple memory store" msgstr "" -#: tree-cfg.c:3793 +#: tree-cfg.c:3815 #, gcc-internal-format msgid "invalid operand in return statement" msgstr "" -#: tree-cfg.c:3805 +#: tree-cfg.c:3827 #, gcc-internal-format msgid "invalid conversion in return statement" msgstr "" -#: tree-cfg.c:3829 +#: tree-cfg.c:3851 #, gcc-internal-format msgid "goto destination is neither a label nor a pointer" msgstr "" -#: tree-cfg.c:3844 +#: tree-cfg.c:3866 #, gcc-internal-format msgid "invalid operand to switch statement" msgstr "" -#: tree-cfg.c:3864 +#: tree-cfg.c:3886 #, gcc-internal-format msgid "Invalid PHI result" msgstr "" -#: tree-cfg.c:3876 +#: tree-cfg.c:3898 #, gcc-internal-format msgid "Invalid PHI argument" msgstr "" -#: tree-cfg.c:3882 +#: tree-cfg.c:3904 #, gcc-internal-format msgid "Incompatible types in PHI argument" msgstr "" -#: tree-cfg.c:4007 +#: tree-cfg.c:4029 #, gcc-internal-format msgid "verify_gimple failed" msgstr "" -#: tree-cfg.c:4041 +#: tree-cfg.c:4063 #, gcc-internal-format msgid "invalid function in call statement" msgstr "" -#: tree-cfg.c:4052 +#: tree-cfg.c:4074 #, gcc-internal-format msgid "invalid pure const state for function" msgstr "" -#: tree-cfg.c:4062 tree-ssa.c:845 tree-ssa.c:855 +#: tree-cfg.c:4084 tree-ssa.c:860 tree-ssa.c:870 #, gcc-internal-format msgid "in statement" msgstr "" -#: tree-cfg.c:4076 +#: tree-cfg.c:4098 #, gcc-internal-format msgid "statement marked for throw, but doesn%'t" msgstr "" -#: tree-cfg.c:4081 +#: tree-cfg.c:4103 #, gcc-internal-format msgid "statement marked for throw in middle of block" msgstr "" -#: tree-cfg.c:4153 +#: tree-cfg.c:4175 #, gcc-internal-format msgid "Dead STMT in EH table" msgstr "" -#: tree-cfg.c:4191 +#: tree-cfg.c:4213 #, gcc-internal-format msgid "gimple_bb (phi) is set to a wrong basic block" msgstr "" -#: tree-cfg.c:4202 +#: tree-cfg.c:4224 #, gcc-internal-format msgid "missing PHI def" msgstr "" -#: tree-cfg.c:4213 +#: tree-cfg.c:4235 #, gcc-internal-format msgid "PHI argument is not a GIMPLE value" msgstr "" -#: tree-cfg.c:4222 tree-cfg.c:4267 +#: tree-cfg.c:4244 tree-cfg.c:4289 #, gcc-internal-format msgid "incorrect sharing of tree nodes" msgstr "" -#: tree-cfg.c:4237 +#: tree-cfg.c:4259 #, gcc-internal-format msgid "invalid GIMPLE statement" msgstr "" -#: tree-cfg.c:4246 +#: tree-cfg.c:4268 #, gcc-internal-format msgid "gimple_bb (stmt) is set to a wrong basic block" msgstr "" -#: tree-cfg.c:4258 +#: tree-cfg.c:4280 #, gcc-internal-format msgid "incorrect entry in label_to_block_map.\n" msgstr "" -#: tree-cfg.c:4283 +#: tree-cfg.c:4305 #, gcc-internal-format msgid "verify_stmts failed" msgstr "" -#: tree-cfg.c:4306 +#: tree-cfg.c:4328 #, gcc-internal-format msgid "ENTRY_BLOCK has IL associated with it" msgstr "" -#: tree-cfg.c:4312 +#: tree-cfg.c:4334 #, gcc-internal-format msgid "EXIT_BLOCK has IL associated with it" msgstr "" -#: tree-cfg.c:4319 +#: tree-cfg.c:4341 #, gcc-internal-format msgid "fallthru to exit from bb %d" msgstr "" -#: tree-cfg.c:4343 +#: tree-cfg.c:4365 #, gcc-internal-format msgid "nonlocal label " msgstr "" -#: tree-cfg.c:4352 tree-cfg.c:4361 tree-cfg.c:4386 +#: tree-cfg.c:4374 tree-cfg.c:4383 tree-cfg.c:4408 #, gcc-internal-format msgid "label " msgstr "" -#: tree-cfg.c:4376 +#: tree-cfg.c:4398 #, gcc-internal-format msgid "control flow in the middle of basic block %d" msgstr "" -#: tree-cfg.c:4406 +#: tree-cfg.c:4428 #, gcc-internal-format msgid "fallthru edge after a control statement in bb %d" msgstr "" -#: tree-cfg.c:4419 +#: tree-cfg.c:4441 #, gcc-internal-format msgid "true/false edge after a non-GIMPLE_COND in bb %d" msgstr "" -#: tree-cfg.c:4442 tree-cfg.c:4464 tree-cfg.c:4477 tree-cfg.c:4546 +#: tree-cfg.c:4464 tree-cfg.c:4486 tree-cfg.c:4499 tree-cfg.c:4568 #, gcc-internal-format msgid "wrong outgoing edge flags at end of bb %d" msgstr "" -#: tree-cfg.c:4452 +#: tree-cfg.c:4474 #, gcc-internal-format msgid "explicit goto at end of bb %d" msgstr "" -#: tree-cfg.c:4482 +#: tree-cfg.c:4504 #, gcc-internal-format msgid "return edge does not point to exit in bb %d" msgstr "" -#: tree-cfg.c:4512 +#: tree-cfg.c:4534 #, gcc-internal-format msgid "found default case not at the start of case vector" msgstr "" -#: tree-cfg.c:4520 +#: tree-cfg.c:4542 #, gcc-internal-format msgid "case labels not sorted: " msgstr "" -#: tree-cfg.c:4537 +#: tree-cfg.c:4559 #, gcc-internal-format msgid "extra outgoing edge %d->%d" msgstr "" -#: tree-cfg.c:4560 +#: tree-cfg.c:4582 #, gcc-internal-format msgid "missing edge %i->%i" msgstr "" -#: tree-cfg.c:7036 +#: tree-cfg.c:7065 #, gcc-internal-format msgid "%H%<noreturn%> function does return" msgstr "" -#: tree-cfg.c:7056 +#: tree-cfg.c:7085 #, gcc-internal-format msgid "control reaches end of non-void function" msgstr "" -#: tree-cfg.c:7118 +#: tree-cfg.c:7147 #, gcc-internal-format msgid "%Jfunction might be possible candidate for attribute %<noreturn%>" msgstr "" @@ -24822,85 +24612,85 @@ msgstr "" msgid "unnecessary EH edge %i->%i" msgstr "" -#: tree-inline.c:2354 +#: tree-inline.c:2436 #, gcc-internal-format msgid "" "function %q+F can never be inlined because it uses variable sized variables" msgstr "" -#: tree-inline.c:2388 +#: tree-inline.c:2470 #, gcc-internal-format msgid "" "function %q+F can never be inlined because it uses alloca (override using " "the always_inline attribute)" msgstr "" -#: tree-inline.c:2402 +#: tree-inline.c:2484 #, gcc-internal-format msgid "function %q+F can never be inlined because it uses setjmp" msgstr "" -#: tree-inline.c:2416 +#: tree-inline.c:2498 #, gcc-internal-format msgid "" "function %q+F can never be inlined because it uses variable argument lists" msgstr "" -#: tree-inline.c:2428 +#: tree-inline.c:2510 #, gcc-internal-format msgid "" "function %q+F can never be inlined because it uses setjmp-longjmp exception " "handling" msgstr "" -#: tree-inline.c:2436 +#: tree-inline.c:2518 #, gcc-internal-format msgid "function %q+F can never be inlined because it uses non-local goto" msgstr "" -#: tree-inline.c:2448 +#: tree-inline.c:2530 #, gcc-internal-format msgid "" "function %q+F can never be inlined because it uses __builtin_return or " "__builtin_apply_args" msgstr "" -#: tree-inline.c:2468 +#: tree-inline.c:2550 #, gcc-internal-format msgid "function %q+F can never be inlined because it contains a computed goto" msgstr "" -#: tree-inline.c:2483 +#: tree-inline.c:2565 #, gcc-internal-format msgid "function %q+F can never be inlined because it receives a non-local goto" msgstr "" -#: tree-inline.c:2509 +#: tree-inline.c:2591 #, gcc-internal-format msgid "" "function %q+F can never be inlined because it saves address of local label " "in a static variable" msgstr "" -#: tree-inline.c:2600 +#: tree-inline.c:2682 #, gcc-internal-format msgid "" "function %q+F can never be inlined because it is suppressed using -fno-inline" msgstr "" -#: tree-inline.c:2614 +#: tree-inline.c:2696 #, gcc-internal-format msgid "" "function %q+F can never be inlined because it uses attributes conflicting " "with inlining" msgstr "" -#: tree-inline.c:3162 tree-inline.c:3172 +#: tree-inline.c:3244 tree-inline.c:3254 #, gcc-internal-format msgid "inlining failed in call to %q+F: %s" msgstr "" -#: tree-inline.c:3163 tree-inline.c:3174 +#: tree-inline.c:3245 tree-inline.c:3256 #, gcc-internal-format msgid "called from here" msgstr "" @@ -24925,18 +24715,18 @@ msgstr "" msgid "mudflap: this language is not supported" msgstr "" -#: tree-optimize.c:443 +#: tree-optimize.c:445 #, gcc-internal-format msgid "size of return value of %q+D is %u bytes" msgstr "" -#: tree-optimize.c:446 +#: tree-optimize.c:448 #, gcc-internal-format msgid "size of return value of %q+D is larger than %wd bytes" msgstr "" -#: tree-outof-ssa.c:682 tree-outof-ssa.c:744 tree-ssa-coalesce.c:935 -#: tree-ssa-coalesce.c:950 tree-ssa-coalesce.c:1172 tree-ssa-live.c:1088 +#: tree-outof-ssa.c:682 tree-outof-ssa.c:744 tree-ssa-coalesce.c:934 +#: tree-ssa-coalesce.c:949 tree-ssa-coalesce.c:1171 tree-ssa-live.c:1187 #, gcc-internal-format msgid "SSA corruption" msgstr "" @@ -24966,17 +24756,19 @@ msgstr "" msgid "unimplemented functionality" msgstr "" -#: tree-ssa-alias-warnings.c:843 +#: tree-ssa-structalias.c:4782 #, gcc-internal-format -msgid "" -"%Hlikely type-punning may break strict-aliasing rules: object %<%s%s%> of " -"main type %qT is referenced at or around %s:%d and may be aliased to object %" -"<%s%s%> of main type %qT which is referenced at or around %s:%d." +msgid "initialized from %qE" msgstr "" -#: tree-ssa-alias-warnings.c:969 +#: tree-ssa-structalias.c:4786 #, gcc-internal-format -msgid "dereferencing type-punned pointer %D will break strict-aliasing rules" +msgid "initialized from here" +msgstr "" + +#: tree-ssa-structalias.c:4835 +#, gcc-internal-format +msgid "dereferencing pointer %qD does break strict-aliasing rules" msgstr "" #: tree-ssa.c:252 @@ -25064,255 +24856,255 @@ msgstr "" msgid "PHI argument is not SSA_NAME, or invariant" msgstr "" -#: tree-ssa.c:483 +#: tree-ssa.c:498 #, gcc-internal-format msgid "wrong edge %d->%d for PHI argument" msgstr "" -#: tree-ssa.c:533 +#: tree-ssa.c:548 #, gcc-internal-format msgid "non-addressable variable inside an alias set" msgstr "" -#: tree-ssa.c:544 +#: tree-ssa.c:559 #, gcc-internal-format msgid "verify_flow_insensitive_alias_info failed" msgstr "" -#: tree-ssa.c:586 +#: tree-ssa.c:601 #, gcc-internal-format msgid "dereferenced pointers should have a name or a symbol tag" msgstr "" -#: tree-ssa.c:593 +#: tree-ssa.c:608 #, gcc-internal-format msgid "pointers with a memory tag, should have points-to sets" msgstr "" -#: tree-ssa.c:607 +#: tree-ssa.c:622 #, gcc-internal-format msgid "pointer escapes but its name tag is not call-clobbered" msgstr "" -#: tree-ssa.c:617 +#: tree-ssa.c:632 #, gcc-internal-format msgid "verify_flow_sensitive_alias_info failed" msgstr "" -#: tree-ssa.c:645 +#: tree-ssa.c:660 #, gcc-internal-format msgid "variable in call_clobbered_vars but not marked call_clobbered" msgstr "" -#: tree-ssa.c:664 +#: tree-ssa.c:679 #, gcc-internal-format msgid "variable marked call_clobbered but not in call_clobbered_vars bitmap." msgstr "" -#: tree-ssa.c:674 +#: tree-ssa.c:689 #, gcc-internal-format msgid "verify_call_clobbering failed" msgstr "" -#: tree-ssa.c:695 +#: tree-ssa.c:710 #, gcc-internal-format msgid "Memory partitions should have at least one symbol" msgstr "" -#: tree-ssa.c:705 +#: tree-ssa.c:720 #, gcc-internal-format msgid "Partitioned symbols should belong to exactly one partition" msgstr "" -#: tree-ssa.c:718 +#: tree-ssa.c:733 #, gcc-internal-format msgid "verify_memory_partitions failed" msgstr "" -#: tree-ssa.c:790 +#: tree-ssa.c:805 #, gcc-internal-format msgid "AUX pointer initialized for edge %d->%d" msgstr "" -#: tree-ssa.c:815 +#: tree-ssa.c:830 #, gcc-internal-format msgid "stmt (%p) marked modified after optimization pass: " msgstr "" -#: tree-ssa.c:835 +#: tree-ssa.c:850 #, gcc-internal-format msgid "statement makes a memory store, but has no VDEFS" msgstr "" -#: tree-ssa.c:894 +#: tree-ssa.c:909 #, gcc-internal-format msgid "verify_ssa failed" msgstr "" -#: tree-ssa.c:1453 +#: tree-ssa.c:1468 #, gcc-internal-format msgid "%J%qD was declared here" msgstr "" -#: tree-ssa.c:1517 +#: tree-ssa.c:1536 #, gcc-internal-format msgid "%qD is used uninitialized in this function" msgstr "" -#: tree-ssa.c:1520 tree-ssa.c:1559 +#: tree-ssa.c:1539 tree-ssa.c:1578 #, gcc-internal-format msgid "%qD may be used uninitialized in this function" msgstr "" -#: tree-vrp.c:4919 +#: tree-vrp.c:5039 #, gcc-internal-format msgid "%Harray subscript is outside array bounds" msgstr "" -#: tree-vrp.c:4933 +#: tree-vrp.c:5053 #, gcc-internal-format msgid "%Harray subscript is above array bounds" msgstr "" -#: tree-vrp.c:4940 +#: tree-vrp.c:5060 #, gcc-internal-format msgid "%Harray subscript is below array bounds" msgstr "" -#: tree-vrp.c:5577 +#: tree-vrp.c:5697 #, gcc-internal-format msgid "" "assuming signed overflow does not occur when simplifying conditional to " "constant" msgstr "" -#: tree-vrp.c:5583 +#: tree-vrp.c:5703 #, gcc-internal-format msgid "assuming signed overflow does not occur when simplifying conditional" msgstr "" -#: tree-vrp.c:5620 +#: tree-vrp.c:5740 #, gcc-internal-format msgid "comparison always false due to limited range of data type" msgstr "" -#: tree-vrp.c:5623 +#: tree-vrp.c:5743 #, gcc-internal-format msgid "comparison always true due to limited range of data type" msgstr "" -#: tree.c:3702 +#: tree.c:3707 #, gcc-internal-format msgid "ignoring attributes applied to %qT after definition" msgstr "" -#: tree.c:3985 +#: tree.c:3990 #, gcc-internal-format msgid "%q+D already declared with dllexport attribute: dllimport ignored" msgstr "" -#: tree.c:3997 +#: tree.c:4002 #, gcc-internal-format msgid "" "%q+D redeclared without dllimport attribute after being referenced with dll " "linkage" msgstr "" -#: tree.c:4012 +#: tree.c:4017 #, gcc-internal-format msgid "%q+D redeclared without dllimport attribute: previous dllimport ignored" msgstr "" -#: tree.c:4071 tree.c:4083 tree.c:4093 config/darwin.c:1437 -#: config/arm/arm.c:3177 config/arm/arm.c:3205 config/avr/avr.c:4748 -#: config/h8300/h8300.c:5282 config/h8300/h8300.c:5306 config/i386/i386.c:4172 -#: config/i386/i386.c:25848 config/ia64/ia64.c:619 -#: config/m68hc11/m68hc11.c:1118 config/rs6000/rs6000.c:20738 +#: tree.c:4076 tree.c:4088 tree.c:4098 config/darwin.c:1437 +#: config/arm/arm.c:3294 config/arm/arm.c:3322 config/avr/avr.c:4791 +#: config/h8300/h8300.c:5283 config/h8300/h8300.c:5307 config/i386/i386.c:4196 +#: config/i386/i386.c:26429 config/ia64/ia64.c:621 +#: config/m68hc11/m68hc11.c:1118 config/rs6000/rs6000.c:20739 #: config/sh/symbian.c:408 config/sh/symbian.c:415 #, gcc-internal-format msgid "%qs attribute ignored" msgstr "" -#: tree.c:4109 +#: tree.c:4114 #, gcc-internal-format msgid "inline function %q+D declared as dllimport: attribute ignored" msgstr "" -#: tree.c:4117 +#: tree.c:4122 #, gcc-internal-format msgid "function %q+D definition is marked dllimport" msgstr "" -#: tree.c:4125 config/sh/symbian.c:430 +#: tree.c:4130 config/sh/symbian.c:430 #, gcc-internal-format msgid "variable %q+D definition is marked dllimport" msgstr "" -#: tree.c:4148 config/sh/symbian.c:505 +#: tree.c:4153 config/sh/symbian.c:505 #, gcc-internal-format msgid "external linkage required for symbol %q+D because of %qs attribute" msgstr "" -#: tree.c:4162 +#: tree.c:4167 #, gcc-internal-format msgid "" "%qs implies default visibility, but %qD has already been declared with a " "different visibility" msgstr "" -#: tree.c:5744 +#: tree.c:5749 #, gcc-internal-format msgid "arrays of functions are not meaningful" msgstr "" -#: tree.c:5895 +#: tree.c:5900 #, gcc-internal-format msgid "function return type cannot be function" msgstr "" -#: tree.c:7053 tree.c:7138 tree.c:7199 +#: tree.c:7058 tree.c:7143 tree.c:7204 #, gcc-internal-format msgid "tree check: %s, have %s in %s, at %s:%d" msgstr "" -#: tree.c:7090 +#: tree.c:7095 #, gcc-internal-format msgid "tree check: expected none of %s, have %s in %s, at %s:%d" msgstr "" -#: tree.c:7103 +#: tree.c:7108 #, gcc-internal-format msgid "tree check: expected class %qs, have %qs (%s) in %s, at %s:%d" msgstr "" -#: tree.c:7152 +#: tree.c:7157 #, gcc-internal-format msgid "tree check: did not expect class %qs, have %qs (%s) in %s, at %s:%d" msgstr "" -#: tree.c:7165 +#: tree.c:7170 #, gcc-internal-format msgid "tree check: expected omp_clause %s, have %s in %s, at %s:%d" msgstr "" -#: tree.c:7225 +#: tree.c:7230 #, gcc-internal-format msgid "" "tree check: expected tree that contains %qs structure, have %qs in %s, at %s:" "%d" msgstr "" -#: tree.c:7239 +#: tree.c:7244 #, gcc-internal-format msgid "tree check: accessed elt %d of tree_vec with %d elts in %s, at %s:%d" msgstr "" -#: tree.c:7252 +#: tree.c:7257 #, gcc-internal-format msgid "tree check: accessed operand %d of %s with %d operands in %s, at %s:%d" msgstr "" -#: tree.c:7265 +#: tree.c:7270 #, gcc-internal-format msgid "" "tree check: accessed operand %d of omp_clause %s with %d operands in %s, at %" @@ -25417,83 +25209,83 @@ msgid "" "requested alignment for %q+D is greater than implemented alignment of %wu" msgstr "" -#: varasm.c:4483 +#: varasm.c:4482 #, gcc-internal-format msgid "initializer for integer/fixed-point value is too complicated" msgstr "" -#: varasm.c:4488 +#: varasm.c:4487 #, gcc-internal-format msgid "initializer for floating value is not a floating constant" msgstr "" -#: varasm.c:4761 +#: varasm.c:4760 #, gcc-internal-format msgid "invalid initial value for member %qs" msgstr "" -#: varasm.c:4957 varasm.c:5001 +#: varasm.c:4956 varasm.c:5000 #, gcc-internal-format msgid "weak declaration of %q+D must precede definition" msgstr "" -#: varasm.c:4965 +#: varasm.c:4964 #, gcc-internal-format msgid "" "weak declaration of %q+D after first use results in unspecified behavior" msgstr "" -#: varasm.c:4999 +#: varasm.c:4998 #, gcc-internal-format msgid "weak declaration of %q+D must be public" msgstr "" -#: varasm.c:5003 +#: varasm.c:5002 #, gcc-internal-format msgid "weak declaration of %q+D not supported" msgstr "" -#: varasm.c:5029 +#: varasm.c:5028 #, gcc-internal-format msgid "only weak aliases are supported in this configuration" msgstr "" -#: varasm.c:5264 +#: varasm.c:5263 #, gcc-internal-format msgid "%Jweakref is not supported in this configuration" msgstr "" -#: varasm.c:5345 +#: varasm.c:5344 #, gcc-internal-format msgid "%q+D aliased to undefined symbol %qs" msgstr "" -#: varasm.c:5350 +#: varasm.c:5349 #, gcc-internal-format msgid "%q+D aliased to external symbol %qs" msgstr "" -#: varasm.c:5389 +#: varasm.c:5388 #, gcc-internal-format msgid "weakref %q+D ultimately targets itself" msgstr "" -#: varasm.c:5398 +#: varasm.c:5397 #, gcc-internal-format msgid "weakref %q+D must have static linkage" msgstr "" -#: varasm.c:5404 +#: varasm.c:5403 #, gcc-internal-format msgid "%Jalias definitions not supported in this configuration" msgstr "" -#: varasm.c:5409 +#: varasm.c:5408 #, gcc-internal-format msgid "%Jonly weak aliases are supported in this configuration" msgstr "" -#: varasm.c:5469 +#: varasm.c:5468 #, gcc-internal-format msgid "visibility attribute not supported in this configuration; ignored" msgstr "" @@ -25519,63 +25311,63 @@ msgstr "" msgid "no sclass for %s stab (0x%x)" msgstr "" -#: config/darwin-c.c:84 +#: config/darwin-c.c:85 #, gcc-internal-format msgid "too many #pragma options align=reset" msgstr "" -#: config/darwin-c.c:104 config/darwin-c.c:107 config/darwin-c.c:109 -#: config/darwin-c.c:111 +#: config/darwin-c.c:105 config/darwin-c.c:108 config/darwin-c.c:110 +#: config/darwin-c.c:112 #, gcc-internal-format msgid "malformed '#pragma options', ignoring" msgstr "" -#: config/darwin-c.c:114 +#: config/darwin-c.c:115 #, gcc-internal-format msgid "junk at end of '#pragma options'" msgstr "" -#: config/darwin-c.c:124 +#: config/darwin-c.c:125 #, gcc-internal-format msgid "malformed '#pragma options align={mac68k|power|reset}', ignoring" msgstr "" -#: config/darwin-c.c:136 +#: config/darwin-c.c:137 #, gcc-internal-format msgid "missing '(' after '#pragma unused', ignoring" msgstr "" -#: config/darwin-c.c:154 +#: config/darwin-c.c:155 #, gcc-internal-format msgid "missing ')' after '#pragma unused', ignoring" msgstr "" -#: config/darwin-c.c:157 +#: config/darwin-c.c:158 #, gcc-internal-format msgid "junk at end of '#pragma unused'" msgstr "" -#: config/darwin-c.c:168 +#: config/darwin-c.c:169 #, gcc-internal-format msgid "malformed '#pragma ms_struct', ignoring" msgstr "" -#: config/darwin-c.c:176 +#: config/darwin-c.c:177 #, gcc-internal-format msgid "malformed '#pragma ms_struct {on|off|reset}', ignoring" msgstr "" -#: config/darwin-c.c:179 +#: config/darwin-c.c:180 #, gcc-internal-format msgid "junk at end of '#pragma ms_struct'" msgstr "" -#: config/darwin-c.c:405 +#: config/darwin-c.c:406 #, gcc-internal-format msgid "subframework include %s conflicts with framework include" msgstr "" -#: config/darwin-c.c:588 +#: config/darwin-c.c:589 #, gcc-internal-format msgid "Unknown value %qs of -mmacosx-version-min" msgstr "" @@ -25673,7 +25465,7 @@ msgstr "" #. coalesced sections. Weak aliases (or any other kind of aliases) are #. not supported. Weak symbols that aren't visible outside the .s file #. are not supported. -#: config/darwin.h:451 +#: config/darwin.h:452 #, gcc-internal-format msgid "alias definitions not supported in Mach-O; ignored" msgstr "" @@ -25684,83 +25476,83 @@ msgstr "" msgid "profiler support for VxWorks" msgstr "" -#: config/alpha/alpha.c:232 config/rs6000/rs6000.c:2186 +#: config/alpha/alpha.c:233 config/rs6000/rs6000.c:2193 #, gcc-internal-format msgid "bad value %qs for -mtls-size switch" msgstr "" -#: config/alpha/alpha.c:286 +#: config/alpha/alpha.c:287 #, gcc-internal-format msgid "-f%s ignored for Unicos/Mk (not supported)" msgstr "" -#: config/alpha/alpha.c:310 +#: config/alpha/alpha.c:311 #, gcc-internal-format msgid "-mieee not supported on Unicos/Mk" msgstr "" -#: config/alpha/alpha.c:321 +#: config/alpha/alpha.c:322 #, gcc-internal-format msgid "-mieee-with-inexact not supported on Unicos/Mk" msgstr "" -#: config/alpha/alpha.c:338 +#: config/alpha/alpha.c:339 #, gcc-internal-format msgid "bad value %qs for -mtrap-precision switch" msgstr "" -#: config/alpha/alpha.c:352 +#: config/alpha/alpha.c:353 #, gcc-internal-format msgid "bad value %qs for -mfp-rounding-mode switch" msgstr "" -#: config/alpha/alpha.c:367 +#: config/alpha/alpha.c:368 #, gcc-internal-format msgid "bad value %qs for -mfp-trap-mode switch" msgstr "" -#: config/alpha/alpha.c:381 config/alpha/alpha.c:393 +#: config/alpha/alpha.c:382 config/alpha/alpha.c:394 #, gcc-internal-format msgid "bad value %qs for -mcpu switch" msgstr "" -#: config/alpha/alpha.c:400 +#: config/alpha/alpha.c:401 #, gcc-internal-format msgid "trap mode not supported on Unicos/Mk" msgstr "" -#: config/alpha/alpha.c:407 +#: config/alpha/alpha.c:408 #, gcc-internal-format msgid "fp software completion requires -mtrap-precision=i" msgstr "" -#: config/alpha/alpha.c:423 +#: config/alpha/alpha.c:424 #, gcc-internal-format msgid "rounding mode not supported for VAX floats" msgstr "" -#: config/alpha/alpha.c:428 +#: config/alpha/alpha.c:429 #, gcc-internal-format msgid "trap mode not supported for VAX floats" msgstr "" -#: config/alpha/alpha.c:432 +#: config/alpha/alpha.c:433 #, gcc-internal-format msgid "128-bit long double not supported for VAX floats" msgstr "" -#: config/alpha/alpha.c:460 +#: config/alpha/alpha.c:461 #, gcc-internal-format msgid "L%d cache latency unknown for %s" msgstr "" -#: config/alpha/alpha.c:475 +#: config/alpha/alpha.c:476 #, gcc-internal-format msgid "bad value %qs for -mmemory-latency" msgstr "" -#: config/alpha/alpha.c:6549 config/alpha/alpha.c:6552 config/s390/s390.c:8737 -#: config/s390/s390.c:8740 +#: config/alpha/alpha.c:6563 config/alpha/alpha.c:6566 config/s390/s390.c:8718 +#: config/s390/s390.c:8721 #, gcc-internal-format msgid "bad builtin fcode" msgstr "" @@ -25775,200 +25567,205 @@ msgstr "" msgid "argument of %qs attribute is not \"ilink1\" or \"ilink2\"" msgstr "" -#: config/arm/arm.c:1083 +#: config/arm/arm.c:1182 #, gcc-internal-format msgid "switch -mcpu=%s conflicts with -march= switch" msgstr "" -#: config/arm/arm.c:1093 config/rs6000/rs6000.c:1593 config/sparc/sparc.c:764 +#: config/arm/arm.c:1192 config/rs6000/rs6000.c:1593 config/sparc/sparc.c:764 #, gcc-internal-format msgid "bad value (%s) for %s switch" msgstr "" -#: config/arm/arm.c:1206 +#: config/arm/arm.c:1305 #, gcc-internal-format msgid "invalid ABI option: -mabi=%s" msgstr "" -#: config/arm/arm.c:1214 +#: config/arm/arm.c:1313 #, gcc-internal-format msgid "target CPU does not support ARM mode" msgstr "" -#: config/arm/arm.c:1220 +#: config/arm/arm.c:1319 #, gcc-internal-format msgid "target CPU does not support interworking" msgstr "" -#: config/arm/arm.c:1226 +#: config/arm/arm.c:1325 #, gcc-internal-format msgid "target CPU does not support THUMB instructions" msgstr "" -#: config/arm/arm.c:1244 +#: config/arm/arm.c:1343 #, gcc-internal-format msgid "" "enabling backtrace support is only meaningful when compiling for the Thumb" msgstr "" -#: config/arm/arm.c:1247 +#: config/arm/arm.c:1346 #, gcc-internal-format msgid "" "enabling callee interworking support is only meaningful when compiling for " "the Thumb" msgstr "" -#: config/arm/arm.c:1250 +#: config/arm/arm.c:1349 #, gcc-internal-format msgid "" "enabling caller interworking support is only meaningful when compiling for " "the Thumb" msgstr "" -#: config/arm/arm.c:1254 +#: config/arm/arm.c:1353 #, gcc-internal-format msgid "-mapcs-stack-check incompatible with -mno-apcs-frame" msgstr "" -#: config/arm/arm.c:1262 +#: config/arm/arm.c:1361 #, gcc-internal-format msgid "-fpic and -mapcs-reent are incompatible" msgstr "" -#: config/arm/arm.c:1265 +#: config/arm/arm.c:1364 #, gcc-internal-format msgid "APCS reentrant code not supported. Ignored" msgstr "" -#: config/arm/arm.c:1273 +#: config/arm/arm.c:1372 #, gcc-internal-format msgid "-g with -mno-apcs-frame may not give sensible debugging" msgstr "" -#: config/arm/arm.c:1276 +#: config/arm/arm.c:1375 #, gcc-internal-format msgid "passing floating point arguments in fp regs not yet supported" msgstr "" -#: config/arm/arm.c:1333 +#: config/arm/arm.c:1432 #, gcc-internal-format msgid "iwmmxt requires an AAPCS compatible ABI for proper operation" msgstr "" -#: config/arm/arm.c:1336 +#: config/arm/arm.c:1435 #, gcc-internal-format msgid "iwmmxt abi requires an iwmmxt capable cpu" msgstr "" -#: config/arm/arm.c:1346 +#: config/arm/arm.c:1445 #, gcc-internal-format msgid "invalid floating point emulation option: -mfpe=%s" msgstr "" -#: config/arm/arm.c:1363 +#: config/arm/arm.c:1462 #, gcc-internal-format msgid "invalid floating point option: -mfpu=%s" msgstr "" -#: config/arm/arm.c:1403 +#: config/arm/arm.c:1502 #, gcc-internal-format msgid "invalid floating point abi: -mfloat-abi=%s" msgstr "" -#: config/arm/arm.c:1410 +#: config/arm/arm.c:1509 #, gcc-internal-format msgid "-mfloat-abi=hard and VFP" msgstr "" -#: config/arm/arm.c:1416 +#: config/arm/arm.c:1515 #, gcc-internal-format msgid "iWMMXt and hardware floating point" msgstr "" -#: config/arm/arm.c:1420 +#: config/arm/arm.c:1519 #, gcc-internal-format msgid "Thumb-2 iWMMXt" msgstr "" -#: config/arm/arm.c:1443 +#: config/arm/arm.c:1542 #, gcc-internal-format msgid "invalid thread pointer option: -mtp=%s" msgstr "" -#: config/arm/arm.c:1456 +#: config/arm/arm.c:1555 #, gcc-internal-format msgid "can not use -mtp=cp15 with 16-bit Thumb" msgstr "" -#: config/arm/arm.c:1470 +#: config/arm/arm.c:1569 #, gcc-internal-format msgid "structure size boundary can only be set to %s" msgstr "" -#: config/arm/arm.c:1476 +#: config/arm/arm.c:1575 #, gcc-internal-format msgid "RTP PIC is incompatible with Thumb" msgstr "" -#: config/arm/arm.c:1485 +#: config/arm/arm.c:1584 #, gcc-internal-format msgid "RTP PIC is incompatible with -msingle-pic-base" msgstr "" -#: config/arm/arm.c:1497 +#: config/arm/arm.c:1596 #, gcc-internal-format msgid "-mpic-register= is useless without -fpic" msgstr "" -#: config/arm/arm.c:1506 +#: config/arm/arm.c:1605 #, gcc-internal-format msgid "unable to use '%s' for PIC register" msgstr "" -#: config/arm/arm.c:3145 config/arm/arm.c:3163 config/avr/avr.c:4768 -#: config/avr/avr.c:4810 config/bfin/bfin.c:5173 config/h8300/h8300.c:5258 -#: config/i386/i386.c:4134 config/i386/i386.c:25793 -#: config/m68hc11/m68hc11.c:1155 config/m68k/m68k.c:783 -#: config/mcore/mcore.c:3034 config/mips/mips.c:1224 config/mips/mips.c:1226 -#: config/rs6000/rs6000.c:20664 config/sh/sh.c:8127 config/sh/sh.c:8145 -#: config/sh/sh.c:8174 config/sh/sh.c:8256 config/sh/sh.c:8279 -#: config/stormy16/stormy16.c:2227 config/v850/v850.c:2048 +#: config/arm/arm.c:3262 config/arm/arm.c:3280 config/avr/avr.c:4811 +#: config/avr/avr.c:4827 config/bfin/bfin.c:5228 config/h8300/h8300.c:5259 +#: config/i386/i386.c:4158 config/i386/i386.c:26374 +#: config/m68hc11/m68hc11.c:1155 config/m68k/m68k.c:780 +#: config/mcore/mcore.c:3034 config/mips/mips.c:1223 config/mips/mips.c:1225 +#: config/rs6000/rs6000.c:20665 config/sh/sh.c:8129 config/sh/sh.c:8147 +#: config/sh/sh.c:8176 config/sh/sh.c:8258 config/sh/sh.c:8281 +#: config/stormy16/stormy16.c:2221 config/v850/v850.c:2048 #, gcc-internal-format msgid "%qs attribute only applies to functions" msgstr "" -#: config/arm/arm.c:14342 +#: config/arm/arm.c:14790 #, gcc-internal-format msgid "unable to compute real location of stacked parameter" msgstr "" -#: config/arm/arm.c:15848 +#: config/arm/arm.c:16296 #, gcc-internal-format msgid "argument must be a constant" msgstr "" #. @@@ better error message -#: config/arm/arm.c:16156 config/arm/arm.c:16193 +#: config/arm/arm.c:16604 config/arm/arm.c:16641 #, gcc-internal-format msgid "selector must be an immediate" msgstr "" #. @@@ better error message -#: config/arm/arm.c:16236 +#: config/arm/arm.c:16684 #, gcc-internal-format msgid "mask must be an immediate" msgstr "" -#: config/arm/arm.c:16897 +#: config/arm/arm.c:17345 #, gcc-internal-format msgid "no low registers available for popping high registers" msgstr "" -#: config/arm/arm.c:17120 +#: config/arm/arm.c:17568 #, gcc-internal-format msgid "interrupt Service Routines cannot be coded in Thumb mode" msgstr "" +#: config/arm/arm.c:19618 +#, gcc-internal-format +msgid "the mangling of %<va_list%> has changed in GCC 4.4" +msgstr "" + #: config/arm/pe.c:158 config/mcore/mcore.c:2900 #, gcc-internal-format msgid "initialized variable %q+D is marked dllimport" @@ -25979,37 +25776,37 @@ msgstr "" msgid "static variable %q+D is marked dllimport" msgstr "" -#: config/avr/avr.c:4741 +#: config/avr/avr.c:4613 #, gcc-internal-format -msgid "only initialized variables can be placed into program memory area" +msgid "%qs appears to be a misspelled interrupt handler" msgstr "" -#: config/avr/avr.c:4785 +#: config/avr/avr.c:4622 #, gcc-internal-format -msgid "%qs appears to be a misspelled interrupt handler" +msgid "%qs appears to be a misspelled signal handler" msgstr "" -#: config/avr/avr.c:4793 +#: config/avr/avr.c:4784 #, gcc-internal-format -msgid "%qs appears to be a misspelled signal handler" +msgid "only initialized variables can be placed into program memory area" msgstr "" -#: config/avr/avr.c:4901 +#: config/avr/avr.c:4918 #, gcc-internal-format msgid "only uninitialized variables can be placed in the .noinit section" msgstr "" -#: config/avr/avr.c:4915 +#: config/avr/avr.c:4932 #, gcc-internal-format msgid "MCU %qs supported for assembler only" msgstr "" -#: config/avr/avr.h:759 +#: config/avr/avr.h:756 #, gcc-internal-format msgid "trampolines not supported" msgstr "" -#: config/bfin/bfin.c:2479 config/m68k/m68k.c:500 +#: config/bfin/bfin.c:2479 config/m68k/m68k.c:497 #, gcc-internal-format msgid "-mshared-library-id=%s is not between 0 and %d" msgstr "" @@ -26039,7 +25836,7 @@ msgstr "" msgid "ID shared libraries and FD-PIC mode can't be used together." msgstr "" -#: config/bfin/bfin.c:2611 config/m68k/m68k.c:608 +#: config/bfin/bfin.c:2611 config/m68k/m68k.c:605 #, gcc-internal-format msgid "cannot specify both -msep-data and -mid-shared-library" msgstr "" @@ -26064,27 +25861,27 @@ msgstr "" msgid "-mcorea and -mcoreb can't be used together" msgstr "" -#: config/bfin/bfin.c:5178 +#: config/bfin/bfin.c:5233 #, gcc-internal-format msgid "multiple function type attributes specified" msgstr "" -#: config/bfin/bfin.c:5234 config/bfin/bfin.c:5263 config/spu/spu.c:3587 +#: config/bfin/bfin.c:5289 config/bfin/bfin.c:5318 config/spu/spu.c:3591 #, gcc-internal-format msgid "`%s' attribute only applies to functions" msgstr "" -#: config/bfin/bfin.c:5245 +#: config/bfin/bfin.c:5300 #, gcc-internal-format msgid "can't apply both longcall and shortcall attributes to the same function" msgstr "" -#: config/bfin/bfin.c:5295 +#: config/bfin/bfin.c:5350 #, gcc-internal-format msgid "`%s' attribute only applies to variables" msgstr "" -#: config/bfin/bfin.c:5302 +#: config/bfin/bfin.c:5357 #, gcc-internal-format msgid "`%s' attribute cannot be specified for local variables" msgstr "" @@ -26175,7 +25972,7 @@ msgid "emitting PIC operand, but PIC register isn't set up" msgstr "" #. Definitions for GCC. Part of the machine description for CRIS. -#. Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007 +#. Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008 #. Free Software Foundation, Inc. #. Contributed by Axis Communications. Written by Hans-Peter Nilsson. #. @@ -26223,17 +26020,17 @@ msgstr "" #. See cris.c for TARGET_ASM_FUNCTION_PROLOGUE and #. TARGET_ASM_FUNCTION_EPILOGUE. #. Node: Profiling -#: config/cris/cris.h:952 +#: config/cris/cris.h:953 #, gcc-internal-format msgid "no FUNCTION_PROFILER for CRIS" msgstr "" -#: config/crx/crx.h:367 +#: config/crx/crx.h:368 #, gcc-internal-format msgid "Profiler support for CRX" msgstr "" -#: config/crx/crx.h:378 +#: config/crx/crx.h:379 #, gcc-internal-format msgid "Trampoline support for CRX" msgstr "" @@ -26298,12 +26095,12 @@ msgstr "" msgid "this builtin function is only available on the fr450" msgstr "" -#: config/h8300/h8300.c:331 +#: config/h8300/h8300.c:332 #, gcc-internal-format msgid "-ms2600 is used without -ms" msgstr "" -#: config/h8300/h8300.c:337 +#: config/h8300/h8300.c:338 #, gcc-internal-format msgid "-mn is used without -mh or -ms" msgstr "" @@ -26318,346 +26115,363 @@ msgstr "" msgid "can't set position in PCH file: %m" msgstr "" -#: config/i386/i386.c:2656 config/i386/i386.c:2882 +#: config/i386/i386.c:2660 config/i386/i386.c:2900 #, gcc-internal-format msgid "bad value (%s) for %stune=%s %s" msgstr "" -#: config/i386/i386.c:2698 +#: config/i386/i386.c:2704 #, gcc-internal-format msgid "bad value (%s) for %sstringop-strategy=%s %s" msgstr "" -#: config/i386/i386.c:2702 +#: config/i386/i386.c:2708 #, gcc-internal-format msgid "" "%stune=x86-64%s is deprecated. Use %stune=k8%s or %stune=generic%s instead " "as appropriate." msgstr "" -#: config/i386/i386.c:2712 +#: config/i386/i386.c:2718 #, gcc-internal-format msgid "generic CPU can be used only for %stune=%s %s" msgstr "" -#: config/i386/i386.c:2715 config/i386/i386.c:2843 +#: config/i386/i386.c:2721 config/i386/i386.c:2861 #, gcc-internal-format msgid "bad value (%s) for %sarch=%s %s" msgstr "" -#: config/i386/i386.c:2727 +#: config/i386/i386.c:2732 +#, gcc-internal-format +msgid "unknown ABI (%s) for %sabi=%s %s" +msgstr "" + +#: config/i386/i386.c:2745 #, gcc-internal-format msgid "code model %s does not support PIC mode" msgstr "" -#: config/i386/i386.c:2733 +#: config/i386/i386.c:2751 #, gcc-internal-format msgid "bad value (%s) for %scmodel=%s %s" msgstr "" -#: config/i386/i386.c:2757 +#: config/i386/i386.c:2775 #, gcc-internal-format msgid "bad value (%s) for %sasm=%s %s" msgstr "" -#: config/i386/i386.c:2761 +#: config/i386/i386.c:2779 #, gcc-internal-format msgid "code model %qs not supported in the %s bit mode" msgstr "" -#: config/i386/i386.c:2764 +#: config/i386/i386.c:2782 #, gcc-internal-format msgid "%i-bit mode not compiled in" msgstr "" -#: config/i386/i386.c:2776 config/i386/i386.c:2868 +#: config/i386/i386.c:2794 config/i386/i386.c:2886 #, gcc-internal-format msgid "CPU you selected does not support x86-64 instruction set" msgstr "" -#: config/i386/i386.c:2901 +#: config/i386/i386.c:2919 #, gcc-internal-format msgid "%sregparm%s is ignored in 64-bit mode" msgstr "" -#: config/i386/i386.c:2904 +#: config/i386/i386.c:2922 #, gcc-internal-format msgid "%sregparm=%d%s is not between 0 and %d" msgstr "" -#: config/i386/i386.c:2917 +#: config/i386/i386.c:2935 #, gcc-internal-format -msgid "%salign-loops%s is obsolete, use %salign-loops%s" +msgid "%salign-loops%s is obsolete, use -falign-loops%s" msgstr "" -#: config/i386/i386.c:2923 config/i386/i386.c:2938 config/i386/i386.c:2953 +#: config/i386/i386.c:2941 config/i386/i386.c:2956 config/i386/i386.c:2971 #, gcc-internal-format msgid "%salign-loops=%d%s is not between 0 and %d" msgstr "" -#: config/i386/i386.c:2932 +#: config/i386/i386.c:2950 #, gcc-internal-format -msgid "%salign-jumps%s is obsolete, use %salign-jumps%s" +msgid "%salign-jumps%s is obsolete, use -falign-jumps%s" msgstr "" -#: config/i386/i386.c:2947 +#: config/i386/i386.c:2965 #, gcc-internal-format -msgid "%salign-functions%s is obsolete, use %salign-functions%s" +msgid "%salign-functions%s is obsolete, use -falign-functions%s" msgstr "" -#: config/i386/i386.c:2982 +#: config/i386/i386.c:3000 #, gcc-internal-format msgid "%sbranch-cost=%d%s is not between 0 and 5" msgstr "" -#: config/i386/i386.c:2990 +#: config/i386/i386.c:3008 #, gcc-internal-format msgid "%slarge-data-threshold=%d%s is negative" msgstr "" -#: config/i386/i386.c:3004 +#: config/i386/i386.c:3022 #, gcc-internal-format msgid "bad value (%s) for %stls-dialect=%s %s" msgstr "" -#: config/i386/i386.c:3012 +#: config/i386/i386.c:3030 #, gcc-internal-format msgid "pc%d is not valid precision setting (32, 64 or 80)" msgstr "" -#: config/i386/i386.c:3028 +#: config/i386/i386.c:3046 #, gcc-internal-format msgid "%srtd%s is ignored in 64bit mode" msgstr "" -#: config/i386/i386.c:3083 +#: config/i386/i386.c:3101 #, gcc-internal-format msgid "%spreferred-stack-boundary=%d%s is not between %d and 12" msgstr "" -#: config/i386/i386.c:3104 +#: config/i386/i386.c:3122 #, gcc-internal-format msgid "-mincoming-stack-boundary=%d is not between %d and 12" msgstr "" -#: config/i386/i386.c:3117 +#: config/i386/i386.c:3135 #, gcc-internal-format msgid "%ssseregparm%s used without SSE enabled" msgstr "" -#: config/i386/i386.c:3128 config/i386/i386.c:3142 +#: config/i386/i386.c:3146 config/i386/i386.c:3160 #, gcc-internal-format msgid "SSE instruction set disabled, using 387 arithmetics" msgstr "" -#: config/i386/i386.c:3147 +#: config/i386/i386.c:3165 #, gcc-internal-format msgid "387 instruction set disabled, using SSE arithmetics" msgstr "" -#: config/i386/i386.c:3154 +#: config/i386/i386.c:3172 #, gcc-internal-format msgid "bad value (%s) for %sfpmath=%s %s" msgstr "" -#: config/i386/i386.c:3170 +#: config/i386/i386.c:3188 #, gcc-internal-format msgid "unknown vectorization library ABI type (%s) for %sveclibabi=%s %s" msgstr "" -#: config/i386/i386.c:3190 +#: config/i386/i386.c:3208 #, gcc-internal-format msgid "" "unwind tables currently require either a frame pointer or %saccumulate-" "outgoing-args%s for correctness" msgstr "" -#: config/i386/i386.c:3203 +#: config/i386/i386.c:3221 #, gcc-internal-format msgid "stack probing requires %saccumulate-outgoing-args%s for correctness" msgstr "" -#: config/i386/i386.c:3540 +#: config/i386/i386.c:3559 #, gcc-internal-format msgid "attribute(target(\"%s\")) is unknown" msgstr "" -#: config/i386/i386.c:3562 +#: config/i386/i386.c:3581 #, gcc-internal-format msgid "option(\"%s\") was already specified" msgstr "" -#: config/i386/i386.c:4147 config/i386/i386.c:4191 +#: config/i386/i386.c:4171 config/i386/i386.c:4215 #, gcc-internal-format msgid "fastcall and regparm attributes are not compatible" msgstr "" -#: config/i386/i386.c:4154 +#: config/i386/i386.c:4178 #, gcc-internal-format msgid "%qs attribute requires an integer constant argument" msgstr "" -#: config/i386/i386.c:4160 +#: config/i386/i386.c:4184 #, gcc-internal-format msgid "argument to %qs attribute larger than %d" msgstr "" -#: config/i386/i386.c:4183 config/i386/i386.c:4218 +#: config/i386/i386.c:4207 config/i386/i386.c:4242 #, gcc-internal-format msgid "fastcall and cdecl attributes are not compatible" msgstr "" -#: config/i386/i386.c:4187 +#: config/i386/i386.c:4211 #, gcc-internal-format msgid "fastcall and stdcall attributes are not compatible" msgstr "" -#: config/i386/i386.c:4201 config/i386/i386.c:4214 +#: config/i386/i386.c:4225 config/i386/i386.c:4238 #, gcc-internal-format msgid "stdcall and cdecl attributes are not compatible" msgstr "" -#: config/i386/i386.c:4205 +#: config/i386/i386.c:4229 #, gcc-internal-format msgid "stdcall and fastcall attributes are not compatible" msgstr "" -#: config/i386/i386.c:4294 +#: config/i386/i386.c:4316 #, gcc-internal-format msgid "nested functions are limited to 2 register parameters" msgstr "" -#: config/i386/i386.c:4378 +#: config/i386/i386.c:4402 #, gcc-internal-format msgid "Calling %qD with attribute sseregparm without SSE/SSE2 enabled" msgstr "" -#: config/i386/i386.c:4381 +#: config/i386/i386.c:4405 #, gcc-internal-format msgid "Calling %qT with attribute sseregparm without SSE/SSE2 enabled" msgstr "" -#: config/i386/i386.c:5202 +#: config/i386/i386.c:4664 +#, gcc-internal-format +msgid "" +"ms_abi attribute require -maccumulate-outgoing-args or subtarget " +"optimization implying it" +msgstr "" + +#: config/i386/i386.c:4781 +#, gcc-internal-format +msgid "AVX vector argument without AVX enabled changes the ABI" +msgstr "" + +#: config/i386/i386.c:5058 +#, gcc-internal-format +msgid "The ABI of passing union with long double has changed in GCC 4.4" +msgstr "" + +#: config/i386/i386.c:5303 #, gcc-internal-format msgid "SSE register return with SSE disabled" msgstr "" -#: config/i386/i386.c:5208 +#: config/i386/i386.c:5309 #, gcc-internal-format msgid "SSE register argument with SSE disabled" msgstr "" -#: config/i386/i386.c:5224 +#: config/i386/i386.c:5325 #, gcc-internal-format msgid "x87 register return with x87 disabled" msgstr "" -#: config/i386/i386.c:5559 +#: config/i386/i386.c:5691 #, gcc-internal-format msgid "SSE vector argument without SSE enabled changes the ABI" msgstr "" -#: config/i386/i386.c:5581 config/i386/i386.c:5649 -#, gcc-internal-format -msgid "AVX vector argument without AVX enabled changes the ABI" -msgstr "" - -#: config/i386/i386.c:5600 +#: config/i386/i386.c:5728 #, gcc-internal-format msgid "MMX vector argument without MMX enabled changes the ABI" msgstr "" -#: config/i386/i386.c:6196 +#: config/i386/i386.c:6329 #, gcc-internal-format msgid "SSE vector return without SSE enabled changes the ABI" msgstr "" -#: config/i386/i386.c:6206 +#: config/i386/i386.c:6339 #, gcc-internal-format msgid "MMX vector return without MMX enabled changes the ABI" msgstr "" -#: config/i386/i386.c:10314 +#: config/i386/i386.c:10606 #, gcc-internal-format msgid "extended registers have no high halves" msgstr "" -#: config/i386/i386.c:10329 +#: config/i386/i386.c:10621 #, gcc-internal-format msgid "unsupported operand size for extended register" msgstr "" -#: config/i386/i386.c:23000 +#: config/i386/i386.c:23591 #, gcc-internal-format msgid "last argument must be an immediate" msgstr "" -#: config/i386/i386.c:23293 +#: config/i386/i386.c:23884 #, gcc-internal-format msgid "the fifth argument must be a 8-bit immediate" msgstr "" -#: config/i386/i386.c:23388 +#: config/i386/i386.c:23979 #, gcc-internal-format msgid "the third argument must be a 8-bit immediate" msgstr "" -#: config/i386/i386.c:23735 +#: config/i386/i386.c:24319 #, gcc-internal-format msgid "the last argument must be a 4-bit immediate" msgstr "" -#: config/i386/i386.c:23744 +#: config/i386/i386.c:24324 #, gcc-internal-format msgid "the last argument must be a 2-bit immediate" msgstr "" -#: config/i386/i386.c:23753 +#: config/i386/i386.c:24333 #, gcc-internal-format msgid "the last argument must be a 1-bit immediate" msgstr "" -#: config/i386/i386.c:23762 +#: config/i386/i386.c:24342 #, gcc-internal-format msgid "the last argument must be a 5-bit immediate" msgstr "" -#: config/i386/i386.c:23771 +#: config/i386/i386.c:24351 #, gcc-internal-format msgid "the next to last argument must be an 8-bit immediate" msgstr "" -#: config/i386/i386.c:23775 config/i386/i386.c:23952 +#: config/i386/i386.c:24355 config/i386/i386.c:24533 #, gcc-internal-format msgid "the last argument must be an 8-bit immediate" msgstr "" -#: config/i386/i386.c:24010 config/rs6000/rs6000.c:8519 +#: config/i386/i386.c:24591 config/rs6000/rs6000.c:8540 #, gcc-internal-format msgid "selector must be an integer constant in the range 0..%wi" msgstr "" -#: config/i386/i386.c:24153 +#: config/i386/i386.c:24734 #, gcc-internal-format msgid "%qE needs unknown isa option" msgstr "" -#: config/i386/i386.c:24157 +#: config/i386/i386.c:24738 #, gcc-internal-format msgid "%qE needs isa option %s" msgstr "" -#: config/i386/i386.c:25800 +#: config/i386/i386.c:26381 #, gcc-internal-format msgid "%qs attribute only available for 64-bit" msgstr "" -#: config/i386/i386.c:25811 config/i386/i386.c:25820 +#: config/i386/i386.c:26392 config/i386/i386.c:26401 #, gcc-internal-format msgid "ms_abi and sysv_abi attributes are not compatible" msgstr "" -#: config/i386/i386.c:25858 config/rs6000/rs6000.c:20747 +#: config/i386/i386.c:26439 config/rs6000/rs6000.c:20748 #, gcc-internal-format msgid "%qs incompatible attribute ignored" msgstr "" @@ -26672,23 +26486,23 @@ msgstr "" msgid "definition of static data member %q+D of dllimport'd class" msgstr "" -#: config/i386/winnt.c:58 +#: config/i386/winnt.c:59 #, gcc-internal-format msgid "%qs attribute only applies to variables" msgstr "" -#: config/i386/winnt.c:80 +#: config/i386/winnt.c:81 #, gcc-internal-format msgid "" "%qs attribute applies only to initialized variables with external linkage" msgstr "" -#: config/i386/winnt.c:297 +#: config/i386/winnt.c:290 #, gcc-internal-format msgid "%q+D:'selectany' attribute applies only to initialized objects" msgstr "" -#: config/i386/winnt.c:454 +#: config/i386/winnt.c:447 #, gcc-internal-format msgid "%q+D causes a section type conflict" msgstr "" @@ -26713,79 +26527,79 @@ msgstr "" msgid "malformed #pragma builtin" msgstr "" -#: config/ia64/ia64.c:587 config/m32r/m32r.c:373 +#: config/ia64/ia64.c:589 config/m32r/m32r.c:373 #, gcc-internal-format msgid "invalid argument of %qs attribute" msgstr "" -#: config/ia64/ia64.c:599 +#: config/ia64/ia64.c:601 #, gcc-internal-format msgid "%Jan address area attribute cannot be specified for local variables" msgstr "" -#: config/ia64/ia64.c:606 +#: config/ia64/ia64.c:608 #, gcc-internal-format msgid "address area of %q+D conflicts with previous declaration" msgstr "" -#: config/ia64/ia64.c:613 +#: config/ia64/ia64.c:615 #, gcc-internal-format msgid "%Jaddress area attribute cannot be specified for functions" msgstr "" -#: config/ia64/ia64.c:5163 config/pa/pa.c:350 config/sh/sh.c:7950 -#: config/spu/spu.c:4475 +#: config/ia64/ia64.c:5168 config/pa/pa.c:351 config/sh/sh.c:7952 +#: config/spu/spu.c:4478 #, gcc-internal-format msgid "value of -mfixed-range must have form REG1-REG2" msgstr "" -#: config/ia64/ia64.c:5190 config/pa/pa.c:377 config/sh/sh.c:7976 -#: config/spu/spu.c:4501 +#: config/ia64/ia64.c:5195 config/pa/pa.c:378 config/sh/sh.c:7978 +#: config/spu/spu.c:4504 #, gcc-internal-format msgid "%s-%s is an empty range" msgstr "" -#: config/ia64/ia64.c:5218 +#: config/ia64/ia64.c:5223 #, gcc-internal-format msgid "bad value %<%s%> for -mtls-size= switch" msgstr "" -#: config/ia64/ia64.c:5246 +#: config/ia64/ia64.c:5251 #, gcc-internal-format msgid "bad value %<%s%> for -mtune= switch" msgstr "" -#: config/ia64/ia64.c:5265 +#: config/ia64/ia64.c:5270 #, gcc-internal-format msgid "not yet implemented: latency-optimized inline square root" msgstr "" -#: config/ia64/ia64.c:10472 +#: config/ia64/ia64.c:10535 #, gcc-internal-format msgid "version attribute is not a string" msgstr "" -#: config/iq2000/iq2000.c:1816 +#: config/iq2000/iq2000.c:1817 #, gcc-internal-format msgid "gp_offset (%ld) or end_offset (%ld) is less than zero" msgstr "" -#: config/iq2000/iq2000.c:2586 +#: config/iq2000/iq2000.c:2587 #, gcc-internal-format msgid "argument %qd is not a constant" msgstr "" -#: config/iq2000/iq2000.c:2888 config/xtensa/xtensa.c:2320 +#: config/iq2000/iq2000.c:2889 config/xtensa/xtensa.c:2320 #, gcc-internal-format msgid "PRINT_OPERAND_ADDRESS, null pointer" msgstr "" -#: config/iq2000/iq2000.c:3043 +#: config/iq2000/iq2000.c:3044 #, gcc-internal-format msgid "PRINT_OPERAND: Unknown punctuation '%c'" msgstr "" -#: config/iq2000/iq2000.c:3052 config/xtensa/xtensa.c:2174 +#: config/iq2000/iq2000.c:3053 config/xtensa/xtensa.c:2174 #, gcc-internal-format msgid "PRINT_OPERAND null pointer" msgstr "" @@ -26820,7 +26634,7 @@ msgstr "" msgid "`%s' attribute applies only to functions" msgstr "" -#: config/m32c/m32c.c:2809 config/sh/sh.c:8182 +#: config/m32c/m32c.c:2809 config/sh/sh.c:8184 #, gcc-internal-format msgid "`%s' attribute argument not an integer constant" msgstr "" @@ -26845,183 +26659,183 @@ msgstr "" msgid "%<trap%> attribute is already used" msgstr "" -#: config/m68k/m68k.c:549 +#: config/m68k/m68k.c:546 #, gcc-internal-format msgid "-mcpu=%s conflicts with -march=%s" msgstr "" -#: config/m68k/m68k.c:620 +#: config/m68k/m68k.c:617 #, gcc-internal-format msgid "-mpcrel -fPIC is not currently supported on selected cpu" msgstr "" -#: config/m68k/m68k.c:682 +#: config/m68k/m68k.c:679 #, gcc-internal-format msgid "-falign-labels=%d is not supported" msgstr "" -#: config/m68k/m68k.c:687 +#: config/m68k/m68k.c:684 #, gcc-internal-format msgid "-falign-loops=%d is not supported" msgstr "" -#: config/m68k/m68k.c:790 +#: config/m68k/m68k.c:787 #, gcc-internal-format msgid "multiple interrupt attributes not allowed" msgstr "" -#: config/m68k/m68k.c:797 +#: config/m68k/m68k.c:794 #, gcc-internal-format msgid "interrupt_thread is available only on fido" msgstr "" -#: config/m68k/m68k.c:1119 config/rs6000/rs6000.c:15570 +#: config/m68k/m68k.c:1116 config/rs6000/rs6000.c:15586 #, gcc-internal-format msgid "stack limit expression is not supported" msgstr "" -#: config/mips/mips.c:1236 +#: config/mips/mips.c:1235 #, gcc-internal-format msgid "%qs cannot have both %<mips16%> and %<nomips16%> attributes" msgstr "" -#: config/mips/mips.c:1258 config/mips/mips.c:1261 +#: config/mips/mips.c:1257 config/mips/mips.c:1260 #, gcc-internal-format msgid "%qs redeclared with conflicting %qs attributes" msgstr "" -#: config/mips/mips.c:2719 +#: config/mips/mips.c:2718 #, gcc-internal-format msgid "MIPS16 TLS" msgstr "" -#: config/mips/mips.c:6057 +#: config/mips/mips.c:6058 #, gcc-internal-format msgid "cannot handle inconsistent calls to %qs" msgstr "" -#: config/mips/mips.c:11698 +#: config/mips/mips.c:11706 #, gcc-internal-format msgid "invalid argument to built-in function" msgstr "" -#: config/mips/mips.c:11939 +#: config/mips/mips.c:11947 #, gcc-internal-format msgid "built-in function %qs not supported for MIPS16" msgstr "" -#: config/mips/mips.c:12517 +#: config/mips/mips.c:12525 #, gcc-internal-format msgid "%qs does not support MIPS16 code" msgstr "" -#: config/mips/mips.c:13491 +#: config/mips/mips.c:13499 #, gcc-internal-format msgid "MIPS16 PIC for ABIs other than o32 and o64" msgstr "" -#: config/mips/mips.c:13494 +#: config/mips/mips.c:13502 #, gcc-internal-format msgid "MIPS16 -mxgot code" msgstr "" -#: config/mips/mips.c:13497 +#: config/mips/mips.c:13505 #, gcc-internal-format msgid "hard-float MIPS16 code for ABIs other than o32 and o64" msgstr "" -#: config/mips/mips.c:13626 +#: config/mips/mips.c:13634 #, gcc-internal-format msgid "CPU names must be lower case" msgstr "" -#: config/mips/mips.c:13769 +#: config/mips/mips.c:13777 #, gcc-internal-format msgid "" "%<-%s%> conflicts with the other architecture options, which specify a %s " "processor" msgstr "" -#: config/mips/mips.c:13785 +#: config/mips/mips.c:13793 #, gcc-internal-format msgid "%<-march=%s%> is not compatible with the selected ABI" msgstr "" -#: config/mips/mips.c:13800 +#: config/mips/mips.c:13808 #, gcc-internal-format msgid "%<-mgp64%> used with a 32-bit processor" msgstr "" -#: config/mips/mips.c:13802 +#: config/mips/mips.c:13810 #, gcc-internal-format msgid "%<-mgp32%> used with a 64-bit ABI" msgstr "" -#: config/mips/mips.c:13804 +#: config/mips/mips.c:13812 #, gcc-internal-format msgid "%<-mgp64%> used with a 32-bit ABI" msgstr "" -#: config/mips/mips.c:13820 config/mips/mips.c:13822 config/mips/mips.c:13889 +#: config/mips/mips.c:13828 config/mips/mips.c:13830 config/mips/mips.c:13897 #, gcc-internal-format msgid "unsupported combination: %s" msgstr "" -#: config/mips/mips.c:13826 +#: config/mips/mips.c:13834 #, gcc-internal-format msgid "" "%<-mgp32%> and %<-mfp64%> can only be combined if the target supports the " "mfhc1 and mthc1 instructions" msgstr "" -#: config/mips/mips.c:13829 +#: config/mips/mips.c:13837 #, gcc-internal-format msgid "%<-mgp32%> and %<-mfp64%> can only be combined when using the o32 ABI" msgstr "" -#: config/mips/mips.c:13883 +#: config/mips/mips.c:13891 #, gcc-internal-format msgid "the %qs architecture does not support branch-likely instructions" msgstr "" -#: config/mips/mips.c:13923 +#: config/mips/mips.c:13931 #, gcc-internal-format msgid "%<-mno-gpopt%> needs %<-mexplicit-relocs%>" msgstr "" -#: config/mips/mips.c:13931 config/mips/mips.c:13934 +#: config/mips/mips.c:13939 config/mips/mips.c:13942 #, gcc-internal-format msgid "cannot use small-data accesses for %qs" msgstr "" -#: config/mips/mips.c:13948 +#: config/mips/mips.c:13956 #, gcc-internal-format msgid "%<-mips3d%> requires %<-mpaired-single%>" msgstr "" -#: config/mips/mips.c:13957 +#: config/mips/mips.c:13965 #, gcc-internal-format msgid "%qs must be used with %qs" msgstr "" -#: config/mips/mips.c:13964 +#: config/mips/mips.c:13972 #, gcc-internal-format msgid "the %qs architecture does not support paired-single instructions" msgstr "" -#: config/mips/mips.c:13970 +#: config/mips/mips.c:13978 #, gcc-internal-format msgid "%qs requires a target that provides the %qs instruction" msgstr "" -#: config/mips/mips.c:14049 +#: config/mips/mips.c:14078 #, gcc-internal-format msgid "%qs requires branch-likely instructions" msgstr "" #. Output assembler code to FILE to increment profiler label # LABELNO #. for profiling a function entry. -#: config/mips/mips.h:2290 +#: config/mips/mips.h:2308 #, gcc-internal-format msgid "mips16 function profiling" msgstr "" @@ -27079,27 +26893,27 @@ msgstr "" msgid "MMIX Internal: %s is not a shiftable int" msgstr "" -#: config/pa/pa.c:482 +#: config/pa/pa.c:483 #, gcc-internal-format msgid "PIC code generation is not supported in the portable runtime model" msgstr "" -#: config/pa/pa.c:487 +#: config/pa/pa.c:488 #, gcc-internal-format msgid "PIC code generation is not compatible with fast indirect calls" msgstr "" -#: config/pa/pa.c:492 +#: config/pa/pa.c:493 #, gcc-internal-format msgid "-g is only supported when using GAS on this processor," msgstr "" -#: config/pa/pa.c:493 +#: config/pa/pa.c:494 #, gcc-internal-format msgid "-g option disabled" msgstr "" -#: config/pa/pa.c:8382 +#: config/pa/pa.c:8388 #, gcc-internal-format msgid "" "alignment (%u) for %s exceeds maximum alignment for global common data. " @@ -27111,93 +26925,93 @@ msgstr "" msgid "-munix=98 option required for C89 Amendment 1 features.\n" msgstr "" -#: config/picochip/picochip.c:369 +#: config/picochip/picochip.c:379 #, gcc-internal-format msgid "invalid AE type specified (%s)\n" msgstr "" -#: config/picochip/picochip.c:392 +#: config/picochip/picochip.c:402 #, gcc-internal-format msgid "Invalid mul type specified (%s) - expected mac, mul or none" msgstr "" -#: config/picochip/picochip.c:624 +#: config/picochip/picochip.c:634 #, gcc-internal-format msgid "unexpected mode %s encountered in picochip_emit_save_register\n" msgstr "" -#: config/picochip/picochip.c:791 +#: config/picochip/picochip.c:801 #, gcc-internal-format msgid "Defaulting to stack for %s register creation\n" msgstr "" -#: config/picochip/picochip.c:1330 +#: config/picochip/picochip.c:1338 #, gcc-internal-format msgid "LCFI labels have already been deferred." msgstr "" -#: config/picochip/picochip.c:1393 +#: config/picochip/picochip.c:1401 #, gcc-internal-format msgid "LM label has already been deferred." msgstr "" -#: config/picochip/picochip.c:1673 +#: config/picochip/picochip.c:1681 #, gcc-internal-format msgid "picochip_asm_output_opcode - Found multiple lines in VLIW packet %s\n" msgstr "" -#: config/picochip/picochip.c:1776 +#: config/picochip/picochip.c:1784 #, gcc-internal-format msgid "picochip_asm_output_opcode - can't output unknown operator %c\n" msgstr "" -#: config/picochip/picochip.c:2028 config/picochip/picochip.c:2087 +#: config/picochip/picochip.c:2036 config/picochip/picochip.c:2095 #, gcc-internal-format msgid "%s: At least one operand can't be handled" msgstr "" -#: config/picochip/picochip.c:2168 +#: config/picochip/picochip.c:2176 #, gcc-internal-format msgid "Unknown short branch in %s (type %d)\n" msgstr "" -#: config/picochip/picochip.c:2205 +#: config/picochip/picochip.c:2213 #, gcc-internal-format msgid "Unknown long branch in %s (type %d)\n" msgstr "" -#: config/picochip/picochip.c:2245 config/picochip/picochip.c:2313 +#: config/picochip/picochip.c:2253 config/picochip/picochip.c:2321 #, gcc-internal-format msgid "PUT uses port array index %d, which is out of range [%d..%d)" msgstr "" -#: config/picochip/picochip.c:2279 +#: config/picochip/picochip.c:2287 #, gcc-internal-format msgid "GET uses port array index %d, which is out of range [%d..%d)" msgstr "" -#: config/picochip/picochip.c:3122 +#: config/picochip/picochip.c:3130 #, gcc-internal-format msgid "Too many ALU instructions emitted (%d)\n" msgstr "" -#: config/picochip/picochip.c:3753 config/picochip/picochip.c:3846 +#: config/picochip/picochip.c:3761 config/picochip/picochip.c:3854 #, gcc-internal-format msgid "%s: Second source operand is not a constant" msgstr "" -#: config/picochip/picochip.c:3756 config/picochip/picochip.c:3807 -#: config/picochip/picochip.c:3849 +#: config/picochip/picochip.c:3764 config/picochip/picochip.c:3815 +#: config/picochip/picochip.c:3857 #, gcc-internal-format msgid "%s: Third source operand is not a constant" msgstr "" -#: config/picochip/picochip.c:3810 +#: config/picochip/picochip.c:3818 #, gcc-internal-format msgid "%s: Fourth source operand is not a constant" msgstr "" -#: config/picochip/picochip.c:4144 +#: config/picochip/picochip.c:4128 #, gcc-internal-format msgid "%s (disable warning using -mno-inefficient-warnings)" msgstr "" @@ -27337,233 +27151,233 @@ msgid "" "unknown -mtraceback arg %qs; expecting %<full%>, %<partial%> or %<none%>" msgstr "" -#: config/rs6000/rs6000.c:2169 +#: config/rs6000/rs6000.c:2176 #, gcc-internal-format msgid "unknown -m%s= option specified: '%s'" msgstr "" -#: config/rs6000/rs6000.c:2215 +#: config/rs6000/rs6000.c:2222 #, gcc-internal-format msgid "unknown value %s for -mfpu" msgstr "" -#: config/rs6000/rs6000.c:2408 +#: config/rs6000/rs6000.c:2415 #, gcc-internal-format msgid "not configured for ABI: '%s'" msgstr "" -#: config/rs6000/rs6000.c:2421 +#: config/rs6000/rs6000.c:2428 #, gcc-internal-format msgid "Using darwin64 ABI" msgstr "" -#: config/rs6000/rs6000.c:2426 +#: config/rs6000/rs6000.c:2433 #, gcc-internal-format msgid "Using old darwin ABI" msgstr "" -#: config/rs6000/rs6000.c:2433 +#: config/rs6000/rs6000.c:2440 #, gcc-internal-format msgid "Using IBM extended precision long double" msgstr "" -#: config/rs6000/rs6000.c:2439 +#: config/rs6000/rs6000.c:2446 #, gcc-internal-format msgid "Using IEEE extended precision long double" msgstr "" -#: config/rs6000/rs6000.c:2444 +#: config/rs6000/rs6000.c:2451 #, gcc-internal-format msgid "unknown ABI specified: '%s'" msgstr "" -#: config/rs6000/rs6000.c:2471 +#: config/rs6000/rs6000.c:2478 #, gcc-internal-format msgid "invalid option for -mfloat-gprs: '%s'" msgstr "" -#: config/rs6000/rs6000.c:2481 +#: config/rs6000/rs6000.c:2488 #, gcc-internal-format msgid "Unknown switch -mlong-double-%s" msgstr "" -#: config/rs6000/rs6000.c:2502 +#: config/rs6000/rs6000.c:2509 #, gcc-internal-format msgid "" "-malign-power is not supported for 64-bit Darwin; it is incompatible with " "the installed C and C++ libraries" msgstr "" -#: config/rs6000/rs6000.c:2510 +#: config/rs6000/rs6000.c:2517 #, gcc-internal-format msgid "unknown -malign-XXXXX option specified: '%s'" msgstr "" -#: config/rs6000/rs6000.c:2517 +#: config/rs6000/rs6000.c:2524 #, gcc-internal-format msgid "-msingle-float option equivalent to -mhard-float" msgstr "" -#: config/rs6000/rs6000.c:2533 +#: config/rs6000/rs6000.c:2540 #, gcc-internal-format msgid "-msimple-fpu option ignored" msgstr "" -#: config/rs6000/rs6000.c:5355 +#: config/rs6000/rs6000.c:5376 #, gcc-internal-format msgid "" "GCC vector returned by reference: non-standard ABI extension with no " "compatibility guarantee" msgstr "" -#: config/rs6000/rs6000.c:5428 +#: config/rs6000/rs6000.c:5449 #, gcc-internal-format msgid "" "cannot return value in vector register because altivec instructions are " "disabled, use -maltivec to enable them" msgstr "" -#: config/rs6000/rs6000.c:5686 +#: config/rs6000/rs6000.c:5707 #, gcc-internal-format msgid "" "cannot pass argument in vector register because altivec instructions are " "disabled, use -maltivec to enable them" msgstr "" -#: config/rs6000/rs6000.c:6587 +#: config/rs6000/rs6000.c:6608 #, gcc-internal-format msgid "" "GCC vector passed by reference: non-standard ABI extension with no " "compatibility guarantee" msgstr "" -#: config/rs6000/rs6000.c:7847 +#: config/rs6000/rs6000.c:7868 #, gcc-internal-format msgid "argument 1 must be a 5-bit signed literal" msgstr "" -#: config/rs6000/rs6000.c:7950 config/rs6000/rs6000.c:8882 +#: config/rs6000/rs6000.c:7971 config/rs6000/rs6000.c:8903 #, gcc-internal-format msgid "argument 2 must be a 5-bit unsigned literal" msgstr "" -#: config/rs6000/rs6000.c:7990 +#: config/rs6000/rs6000.c:8011 #, gcc-internal-format msgid "argument 1 of __builtin_altivec_predicate must be a constant" msgstr "" -#: config/rs6000/rs6000.c:8043 +#: config/rs6000/rs6000.c:8064 #, gcc-internal-format msgid "argument 1 of __builtin_altivec_predicate is out of range" msgstr "" -#: config/rs6000/rs6000.c:8292 +#: config/rs6000/rs6000.c:8313 #, gcc-internal-format msgid "argument 3 must be a 4-bit unsigned literal" msgstr "" -#: config/rs6000/rs6000.c:8464 +#: config/rs6000/rs6000.c:8485 #, gcc-internal-format msgid "argument to %qs must be a 2-bit unsigned literal" msgstr "" -#: config/rs6000/rs6000.c:8606 +#: config/rs6000/rs6000.c:8627 #, gcc-internal-format msgid "unresolved overload for Altivec builtin %qF" msgstr "" -#: config/rs6000/rs6000.c:8697 +#: config/rs6000/rs6000.c:8718 #, gcc-internal-format msgid "argument to dss must be a 2-bit unsigned literal" msgstr "" -#: config/rs6000/rs6000.c:9002 +#: config/rs6000/rs6000.c:9023 #, gcc-internal-format msgid "argument 1 of __builtin_paired_predicate must be a constant" msgstr "" -#: config/rs6000/rs6000.c:9049 +#: config/rs6000/rs6000.c:9070 #, gcc-internal-format msgid "argument 1 of __builtin_paired_predicate is out of range" msgstr "" -#: config/rs6000/rs6000.c:9074 +#: config/rs6000/rs6000.c:9095 #, gcc-internal-format msgid "argument 1 of __builtin_spe_predicate must be a constant" msgstr "" -#: config/rs6000/rs6000.c:9146 +#: config/rs6000/rs6000.c:9167 #, gcc-internal-format msgid "argument 1 of __builtin_spe_predicate is out of range" msgstr "" -#: config/rs6000/rs6000.c:15533 +#: config/rs6000/rs6000.c:15549 #, gcc-internal-format msgid "stack frame too large" msgstr "" -#: config/rs6000/rs6000.c:18600 +#: config/rs6000/rs6000.c:18601 #, gcc-internal-format msgid "no profiling of 64-bit code for this ABI" msgstr "" -#: config/rs6000/rs6000.c:20549 +#: config/rs6000/rs6000.c:20550 #, gcc-internal-format msgid "use of %<long%> in AltiVec types is invalid for 64-bit code" msgstr "" -#: config/rs6000/rs6000.c:20551 +#: config/rs6000/rs6000.c:20552 #, gcc-internal-format msgid "use of %<long%> in AltiVec types is deprecated; use %<int%>" msgstr "" -#: config/rs6000/rs6000.c:20555 +#: config/rs6000/rs6000.c:20556 #, gcc-internal-format msgid "use of %<long long%> in AltiVec types is invalid" msgstr "" -#: config/rs6000/rs6000.c:20557 +#: config/rs6000/rs6000.c:20558 #, gcc-internal-format msgid "use of %<double%> in AltiVec types is invalid" msgstr "" -#: config/rs6000/rs6000.c:20559 +#: config/rs6000/rs6000.c:20560 #, gcc-internal-format msgid "use of %<long double%> in AltiVec types is invalid" msgstr "" -#: config/rs6000/rs6000.c:20561 +#: config/rs6000/rs6000.c:20562 #, gcc-internal-format msgid "use of boolean types in AltiVec types is invalid" msgstr "" -#: config/rs6000/rs6000.c:20563 +#: config/rs6000/rs6000.c:20564 #, gcc-internal-format msgid "use of %<complex%> in AltiVec types is invalid" msgstr "" -#: config/rs6000/rs6000.c:20565 +#: config/rs6000/rs6000.c:20566 #, gcc-internal-format msgid "use of decimal floating point types in AltiVec types is invalid" msgstr "" -#: config/rs6000/rs6000.c:22851 +#: config/rs6000/rs6000.c:22852 #, gcc-internal-format msgid "emitting microcode insn %s\t[%s] #%d" msgstr "" -#: config/rs6000/rs6000.c:22855 +#: config/rs6000/rs6000.c:22856 #, gcc-internal-format msgid "emitting conditional microcode insn %s\t[%s] #%d" msgstr "" -#: config/rs6000/aix43.h:38 config/rs6000/aix51.h:37 config/rs6000/aix52.h:38 +#: config/rs6000/aix43.h:38 config/rs6000/aix51.h:38 config/rs6000/aix52.h:38 #: config/rs6000/aix53.h:38 config/rs6000/aix61.h:38 #, gcc-internal-format msgid "-maix64 and POWER architecture are incompatible" msgstr "" -#: config/rs6000/aix43.h:43 config/rs6000/aix51.h:42 config/rs6000/aix52.h:43 +#: config/rs6000/aix43.h:43 config/rs6000/aix51.h:43 config/rs6000/aix52.h:43 #: config/rs6000/aix53.h:43 config/rs6000/aix61.h:43 #, gcc-internal-format msgid "-maix64 requires PowerPC64 architecture remain enabled" @@ -27575,7 +27389,7 @@ msgstr "" msgid "soft-float and long-double-128 are incompatible" msgstr "" -#: config/rs6000/aix43.h:53 config/rs6000/aix51.h:46 config/rs6000/aix52.h:53 +#: config/rs6000/aix43.h:53 config/rs6000/aix51.h:47 config/rs6000/aix52.h:53 #: config/rs6000/aix53.h:53 config/rs6000/aix61.h:53 #, gcc-internal-format msgid "" @@ -27597,7 +27411,7 @@ msgstr "" msgid "E500 and FPRs not supported" msgstr "" -#: config/rs6000/eabispe.h:41 config/rs6000/linuxspe.h:40 +#: config/rs6000/eabispe.h:41 config/rs6000/linuxspe.h:41 #, gcc-internal-format msgid "-m64 not supported in this configuration" msgstr "" @@ -27744,22 +27558,22 @@ msgstr "" msgid "-mstack-guard implies use of -mstack-size" msgstr "" -#: config/s390/s390.c:7083 +#: config/s390/s390.c:7064 #, gcc-internal-format msgid "total size of local variables exceeds architecture limit" msgstr "" -#: config/s390/s390.c:7753 +#: config/s390/s390.c:7734 #, gcc-internal-format msgid "frame size of function %qs is " msgstr "" -#: config/s390/s390.c:7783 +#: config/s390/s390.c:7764 #, gcc-internal-format msgid "frame size of %qs is " msgstr "" -#: config/s390/s390.c:7787 +#: config/s390/s390.c:7768 #, gcc-internal-format msgid "%qs uses dynamic stack allocation" msgstr "" @@ -27769,59 +27583,59 @@ msgstr "" msgid "-fPIC and -G are incompatible" msgstr "" -#: config/sh/sh.c:6969 +#: config/sh/sh.c:6971 #, gcc-internal-format msgid "__builtin_saveregs not supported by this subtarget" msgstr "" -#: config/sh/sh.c:8038 +#: config/sh/sh.c:8040 #, gcc-internal-format msgid "%qs attribute only applies to interrupt functions" msgstr "" -#: config/sh/sh.c:8121 +#: config/sh/sh.c:8123 #, gcc-internal-format msgid "%qs attribute is supported only for SH2A" msgstr "" -#: config/sh/sh.c:8151 +#: config/sh/sh.c:8153 #, gcc-internal-format msgid "attribute interrupt_handler is not compatible with -m5-compact" msgstr "" -#: config/sh/sh.c:8168 +#: config/sh/sh.c:8170 #, gcc-internal-format msgid "%qs attribute only applies to SH2A" msgstr "" -#: config/sh/sh.c:8190 +#: config/sh/sh.c:8192 #, gcc-internal-format msgid "`%s' attribute argument should be between 0 to 255" msgstr "" #. The argument must be a constant string. -#: config/sh/sh.c:8263 +#: config/sh/sh.c:8265 #, gcc-internal-format msgid "%qs attribute argument not a string constant" msgstr "" #. The argument must be a constant integer. -#: config/sh/sh.c:8288 +#: config/sh/sh.c:8290 #, gcc-internal-format msgid "%qs attribute argument not an integer constant" msgstr "" -#: config/sh/sh.c:10480 +#: config/sh/sh.c:10482 #, gcc-internal-format msgid "r0 needs to be available as a call-clobbered register" msgstr "" -#: config/sh/sh.c:10501 +#: config/sh/sh.c:10503 #, gcc-internal-format msgid "Need a second call-clobbered general purpose register" msgstr "" -#: config/sh/sh.c:10509 +#: config/sh/sh.c:10511 #, gcc-internal-format msgid "Need a call-clobbered target register" msgstr "" @@ -27854,7 +27668,7 @@ msgstr "" msgid "%s %q+D %s after being referenced with dllimport linkage" msgstr "" -#: config/sh/symbian.c:891 cp/tree.c:2808 +#: config/sh/symbian.c:891 cp/tree.c:2843 #, gcc-internal-format msgid "lang_* check: failed in %s, at %s:%d" msgstr "" @@ -27927,57 +27741,57 @@ msgstr "" msgid "parameter list does not match a valid signature for %s()" msgstr "" -#: config/spu/spu.c:379 config/spu/spu.c:390 +#: config/spu/spu.c:383 config/spu/spu.c:394 #, gcc-internal-format msgid "Unknown architecture '%s'" msgstr "" -#: config/spu/spu.c:3645 +#: config/spu/spu.c:3649 #, gcc-internal-format msgid "`%s' attribute ignored" msgstr "" -#: config/spu/spu.c:5826 +#: config/spu/spu.c:5828 #, gcc-internal-format msgid "%s expects an integer literal in the range [%d, %d]." msgstr "" -#: config/spu/spu.c:5846 +#: config/spu/spu.c:5848 #, gcc-internal-format msgid "%s expects an integer literal in the range [%d, %d]. (" msgstr "" -#: config/spu/spu.c:5876 +#: config/spu/spu.c:5878 #, gcc-internal-format msgid "%d least significant bits of %s are ignored." msgstr "" -#: config/stormy16/stormy16.c:1085 +#: config/stormy16/stormy16.c:1086 #, gcc-internal-format msgid "local variable memory requirements exceed capacity" msgstr "" -#: config/stormy16/stormy16.c:1251 +#: config/stormy16/stormy16.c:1243 #, gcc-internal-format msgid "function_profiler support" msgstr "" -#: config/stormy16/stormy16.c:1340 +#: config/stormy16/stormy16.c:1333 #, gcc-internal-format msgid "cannot use va_start in interrupt function" msgstr "" -#: config/stormy16/stormy16.c:1881 +#: config/stormy16/stormy16.c:1875 #, gcc-internal-format msgid "switch statement of size %lu entries too large" msgstr "" -#: config/stormy16/stormy16.c:2249 +#: config/stormy16/stormy16.c:2244 #, gcc-internal-format msgid "%<__BELOW100__%> attribute only applies to variables" msgstr "" -#: config/stormy16/stormy16.c:2256 +#: config/stormy16/stormy16.c:2251 #, gcc-internal-format msgid "__BELOW100__ attribute not allowed with auto storage class" msgstr "" @@ -28127,221 +27941,221 @@ msgstr "" msgid "only uninitialized variables can be placed in a .bss section" msgstr "" -#: cp/call.c:2550 +#: cp/call.c:2552 #, gcc-internal-format msgid "%s %D(%T, %T, %T) <built-in>" msgstr "" -#: cp/call.c:2555 +#: cp/call.c:2557 #, gcc-internal-format msgid "%s %D(%T, %T) <built-in>" msgstr "" -#: cp/call.c:2559 +#: cp/call.c:2561 #, gcc-internal-format msgid "%s %D(%T) <built-in>" msgstr "" -#: cp/call.c:2563 +#: cp/call.c:2565 #, gcc-internal-format msgid "%s %T <conversion>" msgstr "" -#: cp/call.c:2565 +#: cp/call.c:2567 #, gcc-internal-format msgid "%s %+#D <near match>" msgstr "" -#: cp/call.c:2567 cp/pt.c:1404 +#: cp/call.c:2569 cp/pt.c:1406 #, gcc-internal-format msgid "%s %+#D" msgstr "" -#: cp/call.c:2849 +#: cp/call.c:2851 #, gcc-internal-format msgid "conversion from %qT to %qT is ambiguous" msgstr "" -#: cp/call.c:3004 cp/call.c:3024 cp/call.c:3088 +#: cp/call.c:3010 cp/call.c:3030 cp/call.c:3094 #, gcc-internal-format msgid "no matching function for call to %<%D(%A)%>" msgstr "" -#: cp/call.c:3027 cp/call.c:3091 +#: cp/call.c:3033 cp/call.c:3097 #, gcc-internal-format msgid "call of overloaded %<%D(%A)%> is ambiguous" msgstr "" #. It's no good looking for an overloaded operator() on a #. pointer-to-member-function. -#: cp/call.c:3164 +#: cp/call.c:3170 #, gcc-internal-format msgid "" "pointer-to-member function %E cannot be called without an object; consider " "using .* or ->*" msgstr "" -#: cp/call.c:3240 +#: cp/call.c:3246 #, gcc-internal-format msgid "no match for call to %<(%T) (%A)%>" msgstr "" -#: cp/call.c:3252 +#: cp/call.c:3258 #, gcc-internal-format msgid "call of %<(%T) (%A)%> is ambiguous" msgstr "" -#: cp/call.c:3293 +#: cp/call.c:3299 #, gcc-internal-format msgid "%s for ternary %<operator?:%> in %<%E ? %E : %E%>" msgstr "" -#: cp/call.c:3299 +#: cp/call.c:3305 #, gcc-internal-format msgid "%s for %<operator%s%> in %<%E%s%>" msgstr "" -#: cp/call.c:3303 +#: cp/call.c:3309 #, gcc-internal-format msgid "%s for %<operator[]%> in %<%E[%E]%>" msgstr "" -#: cp/call.c:3308 +#: cp/call.c:3314 #, gcc-internal-format msgid "%s for %qs in %<%s %E%>" msgstr "" -#: cp/call.c:3313 +#: cp/call.c:3319 #, gcc-internal-format msgid "%s for %<operator%s%> in %<%E %s %E%>" msgstr "" -#: cp/call.c:3316 +#: cp/call.c:3322 #, gcc-internal-format msgid "%s for %<operator%s%> in %<%s%E%>" msgstr "" -#: cp/call.c:3410 +#: cp/call.c:3416 #, gcc-internal-format msgid "ISO C++ forbids omitting the middle term of a ?: expression" msgstr "" -#: cp/call.c:3490 +#: cp/call.c:3496 #, gcc-internal-format msgid "" "second operand to the conditional operator is of type %<void%>, but the " "third operand is neither a throw-expression nor of type %<void%>" msgstr "" -#: cp/call.c:3495 +#: cp/call.c:3501 #, gcc-internal-format msgid "" "third operand to the conditional operator is of type %<void%>, but the " "second operand is neither a throw-expression nor of type %<void%>" msgstr "" -#: cp/call.c:3537 cp/call.c:3773 +#: cp/call.c:3543 cp/call.c:3779 #, gcc-internal-format msgid "operands to ?: have different types %qT and %qT" msgstr "" -#: cp/call.c:3720 +#: cp/call.c:3726 #, gcc-internal-format msgid "enumeral mismatch in conditional expression: %qT vs %qT" msgstr "" -#: cp/call.c:3731 +#: cp/call.c:3737 #, gcc-internal-format msgid "enumeral and non-enumeral type in conditional expression" msgstr "" -#: cp/call.c:4043 +#: cp/call.c:4049 #, gcc-internal-format msgid "no %<%D(int)%> declared for postfix %qs, trying prefix operator instead" msgstr "" -#: cp/call.c:4121 +#: cp/call.c:4127 #, gcc-internal-format msgid "comparison between %q#T and %q#T" msgstr "" -#: cp/call.c:4406 +#: cp/call.c:4412 #, gcc-internal-format msgid "no corresponding deallocation function for %qD" msgstr "" -#: cp/call.c:4411 +#: cp/call.c:4417 #, gcc-internal-format msgid "no suitable %<operator %s%> for %qT" msgstr "" -#: cp/call.c:4429 +#: cp/call.c:4435 #, gcc-internal-format msgid "%q+#D is private" msgstr "" -#: cp/call.c:4431 +#: cp/call.c:4437 #, gcc-internal-format msgid "%q+#D is protected" msgstr "" -#: cp/call.c:4433 +#: cp/call.c:4439 #, gcc-internal-format msgid "%q+#D is inaccessible" msgstr "" -#: cp/call.c:4434 +#: cp/call.c:4440 #, gcc-internal-format msgid "within this context" msgstr "" -#: cp/call.c:4480 +#: cp/call.c:4486 #, gcc-internal-format msgid "passing NULL to non-pointer argument %P of %qD" msgstr "" -#: cp/call.c:4483 +#: cp/call.c:4489 #, gcc-internal-format msgid "converting to non-pointer type %qT from NULL" msgstr "" -#: cp/call.c:4489 +#: cp/call.c:4495 #, gcc-internal-format msgid "converting %<false%> to pointer type for argument %P of %qD" msgstr "" -#: cp/call.c:4540 cp/cvt.c:217 +#: cp/call.c:4546 cp/cvt.c:217 #, gcc-internal-format msgid "invalid conversion from %qT to %qT" msgstr "" -#: cp/call.c:4542 +#: cp/call.c:4548 #, gcc-internal-format msgid " initializing argument %P of %qD" msgstr "" -#: cp/call.c:4566 +#: cp/call.c:4572 #, gcc-internal-format msgid "" "converting to %qT from initializer list would use explicit constructor %qD" msgstr "" -#: cp/call.c:4723 +#: cp/call.c:4735 #, gcc-internal-format msgid "cannot bind bitfield %qE to %qT" msgstr "" -#: cp/call.c:4726 cp/call.c:4744 +#: cp/call.c:4738 cp/call.c:4756 #, gcc-internal-format msgid "cannot bind packed field %qE to %qT" msgstr "" -#: cp/call.c:4729 +#: cp/call.c:4741 #, gcc-internal-format msgid "cannot bind rvalue %qE to %qT" msgstr "" -#: cp/call.c:4853 +#: cp/call.c:4865 #, gcc-internal-format msgid "" "cannot pass objects of non-POD type %q#T through %<...%>; call will abort at " @@ -28349,108 +28163,108 @@ msgid "" msgstr "" #. Undefined behavior [expr.call] 5.2.2/7. -#: cp/call.c:4881 +#: cp/call.c:4893 #, gcc-internal-format msgid "" "cannot receive objects of non-POD type %q#T through %<...%>; call will abort " "at runtime" msgstr "" -#: cp/call.c:4929 +#: cp/call.c:4941 #, gcc-internal-format msgid "the default argument for parameter %d of %qD has not yet been parsed" msgstr "" -#: cp/call.c:4939 +#: cp/call.c:4951 #, gcc-internal-format msgid "recursive evaluation of default argument for %q#D" msgstr "" -#: cp/call.c:5046 +#: cp/call.c:5068 #, gcc-internal-format msgid "argument of function call might be a candidate for a format attribute" msgstr "" -#: cp/call.c:5200 +#: cp/call.c:5222 #, gcc-internal-format msgid "passing %qT as %<this%> argument of %q#D discards qualifiers" msgstr "" -#: cp/call.c:5222 +#: cp/call.c:5244 #, gcc-internal-format msgid "%qT is not an accessible base of %qT" msgstr "" -#: cp/call.c:5494 +#: cp/call.c:5522 #, gcc-internal-format msgid "could not find class$ field in java interface type %qT" msgstr "" -#: cp/call.c:5737 +#: cp/call.c:5765 #, gcc-internal-format msgid "call to non-function %qD" msgstr "" -#: cp/call.c:5876 +#: cp/call.c:5904 #, gcc-internal-format msgid "no matching function for call to %<%T::%s(%A)%#V%>" msgstr "" -#: cp/call.c:5897 +#: cp/call.c:5925 #, gcc-internal-format msgid "call of overloaded %<%s(%A)%> is ambiguous" msgstr "" -#: cp/call.c:5926 +#: cp/call.c:5954 #, gcc-internal-format msgid "cannot call member function %qD without object" msgstr "" -#: cp/call.c:6597 +#: cp/call.c:6642 #, gcc-internal-format msgid "passing %qT chooses %qT over %qT" msgstr "" -#: cp/call.c:6599 cp/name-lookup.c:4420 cp/name-lookup.c:4864 +#: cp/call.c:6644 cp/name-lookup.c:4468 cp/name-lookup.c:4913 #, gcc-internal-format msgid " in call to %qD" msgstr "" -#: cp/call.c:6656 +#: cp/call.c:6701 #, gcc-internal-format msgid "choosing %qD over %qD" msgstr "" -#: cp/call.c:6657 +#: cp/call.c:6702 #, gcc-internal-format msgid " for conversion from %qT to %qT" msgstr "" -#: cp/call.c:6660 +#: cp/call.c:6705 #, gcc-internal-format msgid " because conversion sequence for the argument is better" msgstr "" -#: cp/call.c:6776 +#: cp/call.c:6821 #, gcc-internal-format msgid "" "ISO C++ says that these are ambiguous, even though the worst conversion for " "the first is better than the worst conversion for the second:" msgstr "" -#: cp/call.c:6920 +#: cp/call.c:6965 #, gcc-internal-format msgid "could not convert %qE to %qT" msgstr "" -#: cp/call.c:7126 +#: cp/call.c:7171 #, gcc-internal-format msgid "" "invalid initialization of non-const reference of type %qT from a temporary " "of type %qT" msgstr "" -#: cp/call.c:7130 +#: cp/call.c:7175 #, gcc-internal-format msgid "" "invalid initialization of reference of type %qT from expression of type %qT" @@ -28552,7 +28366,7 @@ msgstr "" msgid " by %q+D" msgstr "" -#: cp/class.c:2500 cp/decl2.c:1264 +#: cp/class.c:2500 cp/decl2.c:1279 #, gcc-internal-format msgid "%q+#D invalid; an anonymous union can only have non-static data members" msgstr "" @@ -28563,7 +28377,7 @@ msgid "" "%q+#D invalid; an anonymous struct can only have non-static data members" msgstr "" -#: cp/class.c:2511 cp/decl2.c:1270 +#: cp/class.c:2511 cp/decl2.c:1285 #, gcc-internal-format msgid "private member %q+#D in anonymous union" msgstr "" @@ -28573,7 +28387,7 @@ msgstr "" msgid "private member %q+#D in anonymous struct" msgstr "" -#: cp/class.c:2518 cp/decl2.c:1272 +#: cp/class.c:2518 cp/decl2.c:1287 #, gcc-internal-format msgid "protected member %q+#D in anonymous union" msgstr "" @@ -28658,160 +28472,160 @@ msgstr "" msgid "ignoring packed attribute because of unpacked non-POD field %q+#D" msgstr "" -#: cp/class.c:3052 +#: cp/class.c:3053 #, gcc-internal-format msgid "field %q+#D with same name as class" msgstr "" -#: cp/class.c:3083 +#: cp/class.c:3084 #, gcc-internal-format msgid "%q#T has pointer data members" msgstr "" -#: cp/class.c:3088 +#: cp/class.c:3089 #, gcc-internal-format msgid " but does not override %<%T(const %T&)%>" msgstr "" -#: cp/class.c:3090 +#: cp/class.c:3091 #, gcc-internal-format msgid " or %<operator=(const %T&)%>" msgstr "" -#: cp/class.c:3094 +#: cp/class.c:3095 #, gcc-internal-format msgid " but does not override %<operator=(const %T&)%>" msgstr "" -#: cp/class.c:3555 +#: cp/class.c:3556 #, gcc-internal-format msgid "" "offset of empty base %qT may not be ABI-compliant and maychange in a future " "version of GCC" msgstr "" -#: cp/class.c:3680 +#: cp/class.c:3681 #, gcc-internal-format msgid "class %qT will be considered nearly empty in a future version of GCC" msgstr "" -#: cp/class.c:3762 +#: cp/class.c:3763 #, gcc-internal-format msgid "initializer specified for non-virtual method %q+D" msgstr "" -#: cp/class.c:4329 +#: cp/class.c:4334 #, gcc-internal-format msgid "non-static reference %q+#D in class without a constructor" msgstr "" -#: cp/class.c:4334 +#: cp/class.c:4339 #, gcc-internal-format msgid "non-static const member %q+#D in class without a constructor" msgstr "" -#: cp/class.c:4589 +#: cp/class.c:4594 #, gcc-internal-format msgid "" "offset of virtual base %qT is not ABI-compliant and may change in a future " "version of GCC" msgstr "" -#: cp/class.c:4690 +#: cp/class.c:4695 #, gcc-internal-format msgid "direct base %qT inaccessible in %qT due to ambiguity" msgstr "" -#: cp/class.c:4702 +#: cp/class.c:4707 #, gcc-internal-format msgid "virtual base %qT inaccessible in %qT due to ambiguity" msgstr "" -#: cp/class.c:4881 +#: cp/class.c:4886 #, gcc-internal-format msgid "" "size assigned to %qT may not be ABI-compliant and may change in a future " "version of GCC" msgstr "" -#: cp/class.c:4921 +#: cp/class.c:4926 #, gcc-internal-format msgid "" "the offset of %qD may not be ABI-compliant and may change in a future " "version of GCC" msgstr "" -#: cp/class.c:4949 +#: cp/class.c:4954 #, gcc-internal-format msgid "" "offset of %q+D is not ABI-compliant and may change in a future version of GCC" msgstr "" -#: cp/class.c:4958 +#: cp/class.c:4963 #, gcc-internal-format msgid "" "%q+D contains empty classes which may cause base classes to be placed at " "different locations in a future version of GCC" msgstr "" -#: cp/class.c:5045 +#: cp/class.c:5050 #, gcc-internal-format msgid "" "layout of classes derived from empty class %qT may change in a future " "version of GCC" msgstr "" -#: cp/class.c:5191 +#: cp/class.c:5196 #, gcc-internal-format msgid "redefinition of %q#T" msgstr "" -#: cp/class.c:5347 +#: cp/class.c:5352 #, gcc-internal-format msgid "%q#T has virtual functions and accessible non-virtual destructor" msgstr "" -#: cp/class.c:5449 +#: cp/class.c:5454 #, gcc-internal-format msgid "trying to finish struct, but kicked out due to previous parse errors" msgstr "" -#: cp/class.c:5908 +#: cp/class.c:5916 #, gcc-internal-format msgid "language string %<\"%E\"%> not recognized" msgstr "" -#: cp/class.c:5997 +#: cp/class.c:6009 #, gcc-internal-format msgid "cannot resolve overloaded function %qD based on conversion to type %qT" msgstr "" -#: cp/class.c:6126 +#: cp/class.c:6138 #, gcc-internal-format msgid "no matches converting function %qD to type %q#T" msgstr "" -#: cp/class.c:6149 +#: cp/class.c:6161 #, gcc-internal-format msgid "converting overloaded function %qD to type %q#T is ambiguous" msgstr "" -#: cp/class.c:6175 +#: cp/class.c:6187 #, gcc-internal-format msgid "assuming pointer to member %qD" msgstr "" -#: cp/class.c:6178 +#: cp/class.c:6190 #, gcc-internal-format msgid "(a pointer to member can only be formed with %<&%E%>)" msgstr "" -#: cp/class.c:6238 cp/class.c:6272 +#: cp/class.c:6252 cp/class.c:6286 #, gcc-internal-format msgid "not enough type information" msgstr "" -#: cp/class.c:6255 +#: cp/class.c:6269 #, gcc-internal-format msgid "argument of type %qT does not match %qT" msgstr "" @@ -28821,12 +28635,12 @@ msgstr "" #. A name N used in a class S shall refer to the same declaration #. in its context and when re-evaluated in the completed scope of #. S. -#: cp/class.c:6542 cp/decl.c:1194 cp/name-lookup.c:526 +#: cp/class.c:6587 cp/decl.c:1193 cp/name-lookup.c:526 #, gcc-internal-format msgid "declaration of %q#D" msgstr "" -#: cp/class.c:6543 +#: cp/class.c:6588 #, gcc-internal-format msgid "changes meaning of %qD from %q+#D" msgstr "" @@ -28841,7 +28655,7 @@ msgstr "" msgid "statement with no effect" msgstr "" -#: cp/cp-gimplify.c:1150 +#: cp/cp-gimplify.c:1141 #, gcc-internal-format msgid "%qE implicitly determined as %<firstprivate%> has reference type" msgstr "" @@ -28866,7 +28680,7 @@ msgstr "" msgid "conversion from %qT to %qT discards qualifiers" msgstr "" -#: cp/cvt.c:470 cp/typeck.c:5386 +#: cp/cvt.c:470 cp/typeck.c:5449 #, gcc-internal-format msgid "casting %qT to %qT does not dereference pointer" msgstr "" @@ -28958,112 +28772,112 @@ msgstr "" msgid " candidate conversions include %qD and %qD" msgstr "" -#: cp/decl.c:1057 +#: cp/decl.c:1056 #, gcc-internal-format msgid "%qD was declared %<extern%> and later %<static%>" msgstr "" -#: cp/decl.c:1058 cp/decl.c:1605 objc/objc-act.c:2935 objc/objc-act.c:7522 +#: cp/decl.c:1057 cp/decl.c:1604 objc/objc-act.c:2935 objc/objc-act.c:7522 #, gcc-internal-format msgid "previous declaration of %q+D" msgstr "" -#: cp/decl.c:1091 +#: cp/decl.c:1090 #, gcc-internal-format msgid "declaration of %qF throws different exceptions" msgstr "" -#: cp/decl.c:1092 +#: cp/decl.c:1091 #, gcc-internal-format msgid "from previous declaration %q+F" msgstr "" -#: cp/decl.c:1148 +#: cp/decl.c:1147 #, gcc-internal-format msgid "function %q+D redeclared as inline" msgstr "" -#: cp/decl.c:1150 +#: cp/decl.c:1149 #, gcc-internal-format msgid "previous declaration of %q+D with attribute noinline" msgstr "" -#: cp/decl.c:1157 +#: cp/decl.c:1156 #, gcc-internal-format msgid "function %q+D redeclared with attribute noinline" msgstr "" -#: cp/decl.c:1159 +#: cp/decl.c:1158 #, gcc-internal-format msgid "previous declaration of %q+D was inline" msgstr "" -#: cp/decl.c:1181 cp/decl.c:1254 +#: cp/decl.c:1180 cp/decl.c:1253 #, gcc-internal-format msgid "shadowing %s function %q#D" msgstr "" -#: cp/decl.c:1190 +#: cp/decl.c:1189 #, gcc-internal-format msgid "library function %q#D redeclared as non-function %q#D" msgstr "" -#: cp/decl.c:1195 +#: cp/decl.c:1194 #, gcc-internal-format msgid "conflicts with built-in declaration %q#D" msgstr "" -#: cp/decl.c:1249 cp/decl.c:1375 cp/decl.c:1391 +#: cp/decl.c:1248 cp/decl.c:1374 cp/decl.c:1390 #, gcc-internal-format msgid "new declaration %q#D" msgstr "" -#: cp/decl.c:1250 +#: cp/decl.c:1249 #, gcc-internal-format msgid "ambiguates built-in declaration %q#D" msgstr "" -#: cp/decl.c:1339 +#: cp/decl.c:1338 #, gcc-internal-format msgid "%q#D redeclared as different kind of symbol" msgstr "" -#: cp/decl.c:1342 +#: cp/decl.c:1341 #, gcc-internal-format msgid "previous declaration of %q+#D" msgstr "" -#: cp/decl.c:1361 +#: cp/decl.c:1360 #, gcc-internal-format msgid "declaration of template %q#D" msgstr "" -#: cp/decl.c:1362 cp/name-lookup.c:527 cp/name-lookup.c:807 +#: cp/decl.c:1361 cp/name-lookup.c:527 cp/name-lookup.c:807 #, gcc-internal-format msgid "conflicts with previous declaration %q+#D" msgstr "" -#: cp/decl.c:1376 cp/decl.c:1392 +#: cp/decl.c:1375 cp/decl.c:1391 #, gcc-internal-format msgid "ambiguates old declaration %q+#D" msgstr "" -#: cp/decl.c:1384 +#: cp/decl.c:1383 #, gcc-internal-format msgid "declaration of C function %q#D conflicts with" msgstr "" -#: cp/decl.c:1386 +#: cp/decl.c:1385 #, gcc-internal-format msgid "previous declaration %q+#D here" msgstr "" -#: cp/decl.c:1400 +#: cp/decl.c:1399 #, gcc-internal-format msgid "conflicting declaration %q#D" msgstr "" -#: cp/decl.c:1401 +#: cp/decl.c:1400 #, gcc-internal-format msgid "%q+D has a previous declaration as %q#D" msgstr "" @@ -29075,63 +28889,63 @@ msgstr "" #. A namespace-name defined at global scope shall not be #. declared as the name of any other entity in any global scope #. of the program. -#: cp/decl.c:1453 +#: cp/decl.c:1452 #, gcc-internal-format msgid "declaration of namespace %qD conflicts with" msgstr "" -#: cp/decl.c:1454 +#: cp/decl.c:1453 #, gcc-internal-format msgid "previous declaration of namespace %q+D here" msgstr "" -#: cp/decl.c:1465 +#: cp/decl.c:1464 #, gcc-internal-format msgid "%q+#D previously defined here" msgstr "" #. Prototype decl follows defn w/o prototype. -#: cp/decl.c:1475 +#: cp/decl.c:1474 #, gcc-internal-format msgid "prototype for %q+#D" msgstr "" -#: cp/decl.c:1476 +#: cp/decl.c:1475 #, gcc-internal-format msgid "%Jfollows non-prototype definition here" msgstr "" -#: cp/decl.c:1516 +#: cp/decl.c:1515 #, gcc-internal-format msgid "previous declaration of %q+#D with %qL linkage" msgstr "" -#: cp/decl.c:1518 +#: cp/decl.c:1517 #, gcc-internal-format msgid "conflicts with new declaration with %qL linkage" msgstr "" -#: cp/decl.c:1541 cp/decl.c:1547 +#: cp/decl.c:1540 cp/decl.c:1546 #, gcc-internal-format msgid "default argument given for parameter %d of %q#D" msgstr "" -#: cp/decl.c:1543 cp/decl.c:1549 +#: cp/decl.c:1542 cp/decl.c:1548 #, gcc-internal-format msgid "after previous specification in %q+#D" msgstr "" -#: cp/decl.c:1604 +#: cp/decl.c:1603 #, gcc-internal-format msgid "redundant redeclaration of %qD in same scope" msgstr "" -#: cp/decl.c:1610 +#: cp/decl.c:1609 #, gcc-internal-format msgid "deleted definition of %qD" msgstr "" -#: cp/decl.c:1611 +#: cp/decl.c:1610 #, gcc-internal-format msgid "after previous declaration %q+D" msgstr "" @@ -29144,329 +28958,334 @@ msgstr "" #. that specialization that would cause an implicit #. instantiation to take place, in every translation unit in #. which such a use occurs. -#: cp/decl.c:1939 +#: cp/decl.c:1946 #, gcc-internal-format msgid "explicit specialization of %qD after first use" msgstr "" -#: cp/decl.c:2029 +#: cp/decl.c:2042 #, gcc-internal-format msgid "%q+D: visibility attribute ignored because it" msgstr "" -#: cp/decl.c:2031 +#: cp/decl.c:2044 #, gcc-internal-format msgid "%Jconflicts with previous declaration here" msgstr "" -#: cp/decl.c:2464 +#: cp/decl.c:2477 #, gcc-internal-format msgid "jump to label %qD" msgstr "" -#: cp/decl.c:2466 +#: cp/decl.c:2479 #, gcc-internal-format msgid "jump to case label" msgstr "" -#: cp/decl.c:2468 +#: cp/decl.c:2481 #, gcc-internal-format msgid "%H from here" msgstr "" -#: cp/decl.c:2487 cp/decl.c:2650 +#: cp/decl.c:2500 cp/decl.c:2663 #, gcc-internal-format msgid " exits OpenMP structured block" msgstr "" -#: cp/decl.c:2508 +#: cp/decl.c:2521 #, gcc-internal-format msgid " crosses initialization of %q+#D" msgstr "" -#: cp/decl.c:2510 cp/decl.c:2625 +#: cp/decl.c:2523 cp/decl.c:2638 #, gcc-internal-format msgid " enters scope of non-POD %q+#D" msgstr "" -#: cp/decl.c:2523 cp/decl.c:2629 +#: cp/decl.c:2536 cp/decl.c:2642 #, gcc-internal-format msgid " enters try block" msgstr "" -#: cp/decl.c:2525 cp/decl.c:2631 +#: cp/decl.c:2538 cp/decl.c:2644 #, gcc-internal-format msgid " enters catch block" msgstr "" -#: cp/decl.c:2535 cp/decl.c:2634 +#: cp/decl.c:2548 cp/decl.c:2647 #, gcc-internal-format msgid " enters OpenMP structured block" msgstr "" -#: cp/decl.c:2606 cp/decl.c:2646 +#: cp/decl.c:2619 cp/decl.c:2659 #, gcc-internal-format msgid "jump to label %q+D" msgstr "" -#: cp/decl.c:2607 cp/decl.c:2647 +#: cp/decl.c:2620 cp/decl.c:2660 #, gcc-internal-format msgid " from here" msgstr "" #. Can't skip init of __exception_info. -#: cp/decl.c:2619 +#: cp/decl.c:2632 #, gcc-internal-format msgid "%J enters catch block" msgstr "" -#: cp/decl.c:2623 +#: cp/decl.c:2636 #, gcc-internal-format msgid " skips initialization of %q+#D" msgstr "" -#: cp/decl.c:2699 +#: cp/decl.c:2712 #, gcc-internal-format msgid "label named wchar_t" msgstr "" -#: cp/decl.c:2703 +#: cp/decl.c:2716 #, gcc-internal-format msgid "duplicate label %qD" msgstr "" -#: cp/decl.c:2969 +#: cp/decl.c:2983 #, gcc-internal-format msgid "%qD is not a type" msgstr "" -#: cp/decl.c:2975 +#: cp/decl.c:2989 #, gcc-internal-format msgid "%qD used without template parameters" msgstr "" -#: cp/decl.c:2990 +#: cp/decl.c:2998 #, gcc-internal-format msgid "%q#T is not a class" msgstr "" -#: cp/decl.c:3002 cp/decl.c:3070 +#: cp/decl.c:3022 cp/decl.c:3090 #, gcc-internal-format msgid "no class template named %q#T in %q#T" msgstr "" -#: cp/decl.c:3010 +#: cp/decl.c:3030 #, gcc-internal-format msgid "%<typename %T::%D%> names %q#T, which is not a class template" msgstr "" -#: cp/decl.c:3017 +#: cp/decl.c:3037 #, gcc-internal-format msgid "%<typename %T::%D%> names %q#T, which is not a type" msgstr "" -#: cp/decl.c:3079 +#: cp/decl.c:3099 #, gcc-internal-format msgid "template parameters do not match template" msgstr "" -#: cp/decl.c:3080 cp/friend.c:321 cp/friend.c:329 +#: cp/decl.c:3100 cp/friend.c:321 cp/friend.c:329 #, gcc-internal-format msgid "%q+D declared here" msgstr "" -#: cp/decl.c:3755 +#: cp/decl.c:3783 #, gcc-internal-format msgid "%Jan anonymous struct cannot have function members" msgstr "" -#: cp/decl.c:3757 +#: cp/decl.c:3785 #, gcc-internal-format msgid "%Jan anonymous union cannot have function members" msgstr "" -#: cp/decl.c:3775 +#: cp/decl.c:3803 #, gcc-internal-format msgid "member %q+#D with constructor not allowed in anonymous aggregate" msgstr "" -#: cp/decl.c:3778 +#: cp/decl.c:3806 #, gcc-internal-format msgid "member %q+#D with destructor not allowed in anonymous aggregate" msgstr "" -#: cp/decl.c:3781 +#: cp/decl.c:3809 #, gcc-internal-format msgid "" "member %q+#D with copy assignment operator not allowed in anonymous aggregate" msgstr "" -#: cp/decl.c:3806 +#: cp/decl.c:3834 #, gcc-internal-format msgid "multiple types in one declaration" msgstr "" -#: cp/decl.c:3810 +#: cp/decl.c:3838 #, gcc-internal-format msgid "redeclaration of C++ built-in type %qT" msgstr "" -#: cp/decl.c:3847 +#: cp/decl.c:3875 #, gcc-internal-format msgid "missing type-name in typedef-declaration" msgstr "" -#: cp/decl.c:3854 +#: cp/decl.c:3882 #, gcc-internal-format msgid "ISO C++ prohibits anonymous structs" msgstr "" -#: cp/decl.c:3861 +#: cp/decl.c:3889 #, gcc-internal-format msgid "%qs can only be specified for functions" msgstr "" -#: cp/decl.c:3867 +#: cp/decl.c:3895 #, gcc-internal-format msgid "%<friend%> can only be specified inside a class" msgstr "" -#: cp/decl.c:3869 +#: cp/decl.c:3897 #, gcc-internal-format msgid "%<explicit%> can only be specified for constructors" msgstr "" -#: cp/decl.c:3871 +#: cp/decl.c:3899 #, gcc-internal-format msgid "a storage class can only be specified for objects and functions" msgstr "" -#: cp/decl.c:3877 +#: cp/decl.c:3905 #, gcc-internal-format msgid "qualifiers can only be specified for objects and functions" msgstr "" -#: cp/decl.c:3880 +#: cp/decl.c:3908 #, gcc-internal-format msgid "%<typedef%> was ignored in this declaration" msgstr "" -#: cp/decl.c:3909 +#: cp/decl.c:3937 #, gcc-internal-format msgid "attribute ignored in declaration of %q+#T" msgstr "" -#: cp/decl.c:3910 +#: cp/decl.c:3938 #, gcc-internal-format msgid "attribute for %q+#T must follow the %qs keyword" msgstr "" -#: cp/decl.c:3952 +#: cp/decl.c:3980 #, gcc-internal-format msgid "ignoring attributes applied to class type %qT outside of definition" msgstr "" #. A template type parameter or other dependent type. -#: cp/decl.c:3956 +#: cp/decl.c:3984 #, gcc-internal-format msgid "" "ignoring attributes applied to dependent type %qT without an associated " "declaration" msgstr "" -#: cp/decl.c:4032 +#: cp/decl.c:4060 #, gcc-internal-format msgid "typedef %qD is initialized (use decltype instead)" msgstr "" -#: cp/decl.c:4050 +#: cp/decl.c:4078 #, gcc-internal-format msgid "declaration of %q#D has %<extern%> and is initialized" msgstr "" -#: cp/decl.c:4075 +#: cp/decl.c:4103 #, gcc-internal-format msgid "definition of %q#D is marked %<dllimport%>" msgstr "" -#: cp/decl.c:4094 +#: cp/decl.c:4122 #, gcc-internal-format msgid "%q#D is not a static member of %q#T" msgstr "" -#: cp/decl.c:4100 +#: cp/decl.c:4128 #, gcc-internal-format msgid "ISO C++ does not permit %<%T::%D%> to be defined as %<%T::%D%>" msgstr "" -#: cp/decl.c:4109 +#: cp/decl.c:4137 #, gcc-internal-format msgid "" "template header not allowed in member definition of explicitly specialized " "class" msgstr "" -#: cp/decl.c:4117 +#: cp/decl.c:4145 #, gcc-internal-format msgid "duplicate initialization of %qD" msgstr "" -#: cp/decl.c:4156 +#: cp/decl.c:4184 #, gcc-internal-format msgid "declaration of %q#D outside of class is not definition" msgstr "" -#: cp/decl.c:4251 +#: cp/decl.c:4279 #, gcc-internal-format msgid "variable %q#D has initializer but incomplete type" msgstr "" -#: cp/decl.c:4257 cp/decl.c:4999 +#: cp/decl.c:4285 cp/decl.c:5033 #, gcc-internal-format msgid "elements of array %q#D have incomplete type" msgstr "" -#: cp/decl.c:4264 cp/decl.c:5495 +#: cp/decl.c:4292 cp/decl.c:5529 #, gcc-internal-format msgid "declaration of %q#D has no initializer" msgstr "" -#: cp/decl.c:4266 +#: cp/decl.c:4294 #, gcc-internal-format msgid "aggregate %q#D has incomplete type and cannot be defined" msgstr "" -#: cp/decl.c:4302 +#: cp/decl.c:4330 #, gcc-internal-format msgid "%qD declared as reference but not initialized" msgstr "" -#: cp/decl.c:4308 +#: cp/decl.c:4336 #, gcc-internal-format msgid "ISO C++ forbids use of initializer list to initialize reference %qD" msgstr "" -#: cp/decl.c:4334 +#: cp/decl.c:4362 #, gcc-internal-format msgid "cannot initialize %qT from %qT" msgstr "" -#: cp/decl.c:4395 +#: cp/decl.c:4423 +#, gcc-internal-format +msgid "name used in a GNU-style designated initializer for an array" +msgstr "" + +#: cp/decl.c:4428 #, gcc-internal-format msgid "name %qD used in a GNU-style designated initializer for an array" msgstr "" -#: cp/decl.c:4444 +#: cp/decl.c:4478 #, gcc-internal-format msgid "initializer fails to determine size of %qD" msgstr "" -#: cp/decl.c:4451 +#: cp/decl.c:4485 #, gcc-internal-format msgid "array size missing in %qD" msgstr "" -#: cp/decl.c:4463 +#: cp/decl.c:4497 #, gcc-internal-format msgid "zero-size array %qD" msgstr "" @@ -29474,273 +29293,273 @@ msgstr "" #. An automatic variable with an incomplete type: that is an error. #. Don't talk about array types here, since we took care of that #. message in grokdeclarator. -#: cp/decl.c:4506 +#: cp/decl.c:4540 #, gcc-internal-format msgid "storage size of %qD isn't known" msgstr "" -#: cp/decl.c:4529 +#: cp/decl.c:4563 #, gcc-internal-format msgid "storage size of %qD isn't constant" msgstr "" -#: cp/decl.c:4580 +#: cp/decl.c:4614 #, gcc-internal-format msgid "" "sorry: semantics of inline function static data %q+#D are wrong (you'll wind " "up with multiple copies)" msgstr "" -#: cp/decl.c:4583 +#: cp/decl.c:4617 #, gcc-internal-format msgid "%J you can work around this by removing the initializer" msgstr "" -#: cp/decl.c:4610 +#: cp/decl.c:4644 #, gcc-internal-format msgid "uninitialized const %qD" msgstr "" -#: cp/decl.c:4722 +#: cp/decl.c:4756 #, gcc-internal-format msgid "invalid type %qT as initializer for a vector of type %qT" msgstr "" -#: cp/decl.c:4764 +#: cp/decl.c:4798 #, gcc-internal-format msgid "initializer for %qT must be brace-enclosed" msgstr "" -#: cp/decl.c:4782 +#: cp/decl.c:4816 #, gcc-internal-format msgid "%qT has no non-static data member named %qD" msgstr "" -#: cp/decl.c:4838 +#: cp/decl.c:4872 #, gcc-internal-format msgid "braces around scalar initializer for type %qT" msgstr "" -#: cp/decl.c:4924 +#: cp/decl.c:4958 #, gcc-internal-format msgid "missing braces around initializer for %qT" msgstr "" -#: cp/decl.c:4981 +#: cp/decl.c:5015 cp/typeck2.c:1087 cp/typeck2.c:1110 cp/typeck2.c:1153 #, gcc-internal-format msgid "too many initializers for %qT" msgstr "" -#: cp/decl.c:5001 +#: cp/decl.c:5035 #, gcc-internal-format msgid "elements of array %q#T have incomplete type" msgstr "" -#: cp/decl.c:5010 +#: cp/decl.c:5044 #, gcc-internal-format msgid "variable-sized object %qD may not be initialized" msgstr "" -#: cp/decl.c:5012 +#: cp/decl.c:5046 #, gcc-internal-format msgid "variable-sized compound literal" msgstr "" -#: cp/decl.c:5066 +#: cp/decl.c:5100 #, gcc-internal-format msgid "%qD has incomplete type" msgstr "" -#: cp/decl.c:5086 +#: cp/decl.c:5120 #, gcc-internal-format msgid "scalar object %qD requires one element in initializer" msgstr "" -#: cp/decl.c:5117 +#: cp/decl.c:5151 #, gcc-internal-format msgid "in C++98 %qD must be initialized by constructor, not by %<{...}%>" msgstr "" -#: cp/decl.c:5149 +#: cp/decl.c:5183 #, gcc-internal-format msgid "array %qD initialized by parenthesized string literal %qE" msgstr "" -#: cp/decl.c:5163 +#: cp/decl.c:5197 #, gcc-internal-format msgid "structure %qD with uninitialized const members" msgstr "" -#: cp/decl.c:5165 +#: cp/decl.c:5199 #, gcc-internal-format msgid "structure %qD with uninitialized reference members" msgstr "" -#: cp/decl.c:5462 +#: cp/decl.c:5496 #, gcc-internal-format msgid "assignment (not initialization) in declaration" msgstr "" -#: cp/decl.c:5575 +#: cp/decl.c:5555 cp/decl2.c:850 +#, gcc-internal-format +msgid "%qD cannot be defaulted" +msgstr "" + +#: cp/decl.c:5631 #, gcc-internal-format msgid "shadowing previous type declaration of %q#D" msgstr "" -#: cp/decl.c:5605 +#: cp/decl.c:5661 #, gcc-internal-format msgid "%qD cannot be thread-local because it has non-POD type %qT" msgstr "" -#: cp/decl.c:5637 +#: cp/decl.c:5693 #, gcc-internal-format msgid "Java object %qD not allocated with %<new%>" msgstr "" -#: cp/decl.c:5654 +#: cp/decl.c:5710 #, gcc-internal-format msgid "%qD is thread-local and so cannot be dynamically initialized" msgstr "" -#: cp/decl.c:5672 +#: cp/decl.c:5728 #, gcc-internal-format msgid "" "%qD cannot be initialized by a non-constant expression when being declared" msgstr "" -#: cp/decl.c:5712 +#: cp/decl.c:5768 #, gcc-internal-format msgid "non-static data member %qD has Java class type" msgstr "" -#: cp/decl.c:5778 cp/decl2.c:835 -#, gcc-internal-format -msgid "%qD cannot be defaulted" -msgstr "" - -#: cp/decl.c:5789 +#: cp/decl.c:5832 #, gcc-internal-format msgid "function %q#D is initialized like a variable" msgstr "" -#: cp/decl.c:6377 +#: cp/decl.c:6420 #, gcc-internal-format msgid "destructor for alien class %qT cannot be a member" msgstr "" -#: cp/decl.c:6379 +#: cp/decl.c:6422 #, gcc-internal-format msgid "constructor for alien class %qT cannot be a member" msgstr "" -#: cp/decl.c:6400 +#: cp/decl.c:6443 #, gcc-internal-format msgid "%qD declared as a %<virtual%> %s" msgstr "" -#: cp/decl.c:6402 +#: cp/decl.c:6445 #, gcc-internal-format msgid "%qD declared as an %<inline%> %s" msgstr "" -#: cp/decl.c:6404 +#: cp/decl.c:6447 #, gcc-internal-format msgid "" "%<const%> and %<volatile%> function specifiers on %qD invalid in %s " "declaration" msgstr "" -#: cp/decl.c:6408 +#: cp/decl.c:6451 #, gcc-internal-format msgid "%q+D declared as a friend" msgstr "" -#: cp/decl.c:6414 +#: cp/decl.c:6457 #, gcc-internal-format msgid "%q+D declared with an exception specification" msgstr "" -#: cp/decl.c:6448 +#: cp/decl.c:6491 #, gcc-internal-format msgid "definition of %qD is not in namespace enclosing %qT" msgstr "" -#: cp/decl.c:6566 +#: cp/decl.c:6611 #, gcc-internal-format msgid "defining explicit specialization %qD in friend declaration" msgstr "" #. Something like `template <class T> friend void f<T>()'. -#: cp/decl.c:6576 +#: cp/decl.c:6621 #, gcc-internal-format msgid "invalid use of template-id %qD in declaration of primary template" msgstr "" -#: cp/decl.c:6606 +#: cp/decl.c:6651 #, gcc-internal-format msgid "" "default arguments are not allowed in declaration of friend template " "specialization %qD" msgstr "" -#: cp/decl.c:6614 +#: cp/decl.c:6659 #, gcc-internal-format msgid "" "%<inline%> is not allowed in declaration of friend template specialization %" "qD" msgstr "" -#: cp/decl.c:6657 +#: cp/decl.c:6702 #, gcc-internal-format msgid "cannot declare %<::main%> to be a template" msgstr "" -#: cp/decl.c:6659 +#: cp/decl.c:6704 #, gcc-internal-format msgid "cannot declare %<::main%> to be inline" msgstr "" -#: cp/decl.c:6661 +#: cp/decl.c:6706 #, gcc-internal-format msgid "cannot declare %<::main%> to be static" msgstr "" -#: cp/decl.c:6689 +#: cp/decl.c:6734 #, gcc-internal-format msgid "non-local function %q#D uses anonymous type" msgstr "" -#: cp/decl.c:6692 cp/decl.c:6968 +#: cp/decl.c:6737 cp/decl.c:7013 #, gcc-internal-format msgid "" "%q+#D does not refer to the unqualified type, so it is not used for linkage" msgstr "" -#: cp/decl.c:6698 +#: cp/decl.c:6743 #, gcc-internal-format msgid "non-local function %q#D uses local type %qT" msgstr "" -#: cp/decl.c:6717 +#: cp/decl.c:6762 #, gcc-internal-format msgid "static member function %qD cannot have cv-qualifier" msgstr "" -#: cp/decl.c:6718 +#: cp/decl.c:6763 #, gcc-internal-format msgid "non-member function %qD cannot have cv-qualifier" msgstr "" -#: cp/decl.c:6766 +#: cp/decl.c:6811 #, gcc-internal-format msgid "%<::main%> must return %<int%>" msgstr "" -#: cp/decl.c:6806 +#: cp/decl.c:6851 #, gcc-internal-format msgid "definition of implicitly-declared %qD" msgstr "" -#: cp/decl.c:6823 cp/decl2.c:680 +#: cp/decl.c:6868 cp/decl2.c:685 #, gcc-internal-format msgid "no %q#D member function declared in class %qT" msgstr "" @@ -29749,594 +29568,589 @@ msgstr "" #. no linkage can only be used to declare extern "C" #. entities. Since it's not always an error in the #. ISO C++ 90 Standard, we only issue a warning. -#: cp/decl.c:6965 +#: cp/decl.c:7010 #, gcc-internal-format msgid "non-local variable %q#D uses anonymous type" msgstr "" -#: cp/decl.c:6974 +#: cp/decl.c:7019 #, gcc-internal-format msgid "non-local variable %q#D uses local type %qT" msgstr "" -#: cp/decl.c:7097 +#: cp/decl.c:7142 #, gcc-internal-format msgid "" "invalid in-class initialization of static data member of non-integral type %" "qT" msgstr "" -#: cp/decl.c:7107 +#: cp/decl.c:7152 #, gcc-internal-format msgid "ISO C++ forbids in-class initialization of non-const static member %qD" msgstr "" -#: cp/decl.c:7111 +#: cp/decl.c:7156 #, gcc-internal-format msgid "" "ISO C++ forbids initialization of member constant %qD of non-integral type %" "qT" msgstr "" -#: cp/decl.c:7136 +#: cp/decl.c:7181 #, gcc-internal-format msgid "size of array %qD has non-integral type %qT" msgstr "" -#: cp/decl.c:7138 +#: cp/decl.c:7183 #, gcc-internal-format msgid "size of array has non-integral type %qT" msgstr "" -#: cp/decl.c:7181 +#: cp/decl.c:7235 #, gcc-internal-format msgid "size of array %qD is negative" msgstr "" -#: cp/decl.c:7183 +#: cp/decl.c:7237 #, gcc-internal-format msgid "size of array is negative" msgstr "" -#: cp/decl.c:7191 +#: cp/decl.c:7245 #, gcc-internal-format msgid "ISO C++ forbids zero-size array %qD" msgstr "" -#: cp/decl.c:7193 +#: cp/decl.c:7247 #, gcc-internal-format msgid "ISO C++ forbids zero-size array" msgstr "" -#: cp/decl.c:7200 +#: cp/decl.c:7254 #, gcc-internal-format msgid "size of array %qD is not an integral constant-expression" msgstr "" -#: cp/decl.c:7203 +#: cp/decl.c:7257 #, gcc-internal-format msgid "size of array is not an integral constant-expression" msgstr "" -#: cp/decl.c:7209 +#: cp/decl.c:7263 #, gcc-internal-format msgid "ISO C++ forbids variable length array %qD" msgstr "" -#: cp/decl.c:7211 +#: cp/decl.c:7265 #, gcc-internal-format msgid "ISO C++ forbids variable length array" msgstr "" -#: cp/decl.c:7217 +#: cp/decl.c:7271 #, gcc-internal-format msgid "variable length array %qD is used" msgstr "" -#: cp/decl.c:7253 +#: cp/decl.c:7307 #, gcc-internal-format msgid "overflow in array dimension" msgstr "" -#: cp/decl.c:7334 +#: cp/decl.c:7388 #, gcc-internal-format msgid "declaration of %qD as %s" msgstr "" -#: cp/decl.c:7336 +#: cp/decl.c:7390 #, gcc-internal-format msgid "creating %s" msgstr "" -#: cp/decl.c:7348 +#: cp/decl.c:7402 #, gcc-internal-format msgid "" "declaration of %qD as multidimensional array must have bounds for all " "dimensions except the first" msgstr "" -#: cp/decl.c:7352 +#: cp/decl.c:7406 #, gcc-internal-format msgid "" "multidimensional array must have bounds for all dimensions except the first" msgstr "" -#: cp/decl.c:7387 +#: cp/decl.c:7441 #, gcc-internal-format msgid "return type specification for constructor invalid" msgstr "" -#: cp/decl.c:7397 +#: cp/decl.c:7451 #, gcc-internal-format msgid "return type specification for destructor invalid" msgstr "" -#: cp/decl.c:7410 +#: cp/decl.c:7464 #, gcc-internal-format msgid "return type specified for %<operator %T%>" msgstr "" -#: cp/decl.c:7432 +#: cp/decl.c:7486 #, gcc-internal-format msgid "unnamed variable or field declared void" msgstr "" -#: cp/decl.c:7436 +#: cp/decl.c:7490 #, gcc-internal-format msgid "variable or field %qE declared void" msgstr "" -#: cp/decl.c:7439 +#: cp/decl.c:7493 #, gcc-internal-format msgid "variable or field declared void" msgstr "" -#: cp/decl.c:7609 +#: cp/decl.c:7663 #, gcc-internal-format msgid "invalid use of qualified-name %<::%D%>" msgstr "" -#: cp/decl.c:7612 +#: cp/decl.c:7666 #, gcc-internal-format msgid "invalid use of qualified-name %<%T::%D%>" msgstr "" -#: cp/decl.c:7615 +#: cp/decl.c:7669 #, gcc-internal-format msgid "invalid use of qualified-name %<%D::%D%>" msgstr "" -#: cp/decl.c:7627 +#: cp/decl.c:7681 #, gcc-internal-format msgid "type %qT is not derived from type %qT" msgstr "" -#: cp/decl.c:7643 cp/decl.c:7733 cp/decl.c:8927 +#: cp/decl.c:7697 cp/decl.c:7789 cp/decl.c:8979 #, gcc-internal-format msgid "declaration of %qD as non-function" msgstr "" -#: cp/decl.c:7649 +#: cp/decl.c:7703 #, gcc-internal-format msgid "declaration of %qD as non-member" msgstr "" -#: cp/decl.c:7678 +#: cp/decl.c:7734 #, gcc-internal-format msgid "declarator-id missing; using reserved word %qD" msgstr "" -#: cp/decl.c:7725 +#: cp/decl.c:7781 #, gcc-internal-format msgid "function definition does not declare parameters" msgstr "" -#: cp/decl.c:7767 +#: cp/decl.c:7823 #, gcc-internal-format msgid "two or more data types in declaration of %qs" msgstr "" -#: cp/decl.c:7773 +#: cp/decl.c:7829 #, gcc-internal-format msgid "conflicting specifiers in declaration of %qs" msgstr "" -#: cp/decl.c:7844 cp/decl.c:7847 cp/decl.c:7850 +#: cp/decl.c:7900 cp/decl.c:7903 cp/decl.c:7906 #, gcc-internal-format msgid "ISO C++ forbids declaration of %qs with no type" msgstr "" -#: cp/decl.c:7875 cp/decl.c:7893 +#: cp/decl.c:7931 cp/decl.c:7949 #, gcc-internal-format msgid "%<signed%> or %<unsigned%> invalid for %qs" msgstr "" -#: cp/decl.c:7877 +#: cp/decl.c:7933 #, gcc-internal-format msgid "%<signed%> and %<unsigned%> specified together for %qs" msgstr "" -#: cp/decl.c:7879 +#: cp/decl.c:7935 #, gcc-internal-format msgid "%<long long%> invalid for %qs" msgstr "" -#: cp/decl.c:7881 +#: cp/decl.c:7937 #, gcc-internal-format msgid "%<long%> invalid for %qs" msgstr "" -#: cp/decl.c:7883 +#: cp/decl.c:7939 #, gcc-internal-format msgid "%<short%> invalid for %qs" msgstr "" -#: cp/decl.c:7885 +#: cp/decl.c:7941 #, gcc-internal-format msgid "%<long%> or %<short%> invalid for %qs" msgstr "" -#: cp/decl.c:7887 +#: cp/decl.c:7943 #, gcc-internal-format msgid "%<long%> or %<short%> specified with char for %qs" msgstr "" -#: cp/decl.c:7889 +#: cp/decl.c:7945 #, gcc-internal-format msgid "%<long%> and %<short%> specified together for %qs" msgstr "" -#: cp/decl.c:7895 +#: cp/decl.c:7951 #, gcc-internal-format msgid "%<short%> or %<long%> invalid for %qs" msgstr "" -#: cp/decl.c:7903 +#: cp/decl.c:7959 #, gcc-internal-format msgid "long, short, signed or unsigned used invalidly for %qs" msgstr "" -#: cp/decl.c:7967 +#: cp/decl.c:8023 #, gcc-internal-format msgid "complex invalid for %qs" msgstr "" -#: cp/decl.c:7996 +#: cp/decl.c:8052 #, gcc-internal-format msgid "qualifiers are not allowed on declaration of %<operator %T%>" msgstr "" -#: cp/decl.c:8009 cp/typeck.c:7189 +#: cp/decl.c:8065 cp/typeck.c:7252 #, gcc-internal-format msgid "ignoring %qV qualifiers added to function type %qT" msgstr "" -#: cp/decl.c:8032 +#: cp/decl.c:8088 #, gcc-internal-format msgid "member %qD cannot be declared both virtual and static" msgstr "" -#: cp/decl.c:8040 +#: cp/decl.c:8096 #, gcc-internal-format msgid "%<%T::%D%> is not a valid declarator" msgstr "" -#: cp/decl.c:8049 +#: cp/decl.c:8105 #, gcc-internal-format msgid "typedef declaration invalid in parameter declaration" msgstr "" -#: cp/decl.c:8055 +#: cp/decl.c:8111 #, gcc-internal-format msgid "storage class specifiers invalid in parameter declarations" msgstr "" -#: cp/decl.c:8059 +#: cp/decl.c:8115 #, gcc-internal-format msgid "parameter declared %<auto%>" msgstr "" -#: cp/decl.c:8068 +#: cp/decl.c:8124 #, gcc-internal-format msgid "%<virtual%> outside class declaration" msgstr "" -#: cp/decl.c:8086 +#: cp/decl.c:8142 #, gcc-internal-format msgid "multiple storage classes in declaration of %qs" msgstr "" -#: cp/decl.c:8109 +#: cp/decl.c:8165 #, gcc-internal-format msgid "storage class specified for %qs" msgstr "" -#: cp/decl.c:8130 +#: cp/decl.c:8186 #, gcc-internal-format msgid "top-level declaration of %qs specifies %<auto%>" msgstr "" -#: cp/decl.c:8143 +#: cp/decl.c:8199 #, gcc-internal-format msgid "storage class specifiers invalid in friend function declarations" msgstr "" -#: cp/decl.c:8257 -#, gcc-internal-format -msgid "invalid use of %<auto%> in conversion operator" -msgstr "" - -#: cp/decl.c:8262 +#: cp/decl.c:8314 #, gcc-internal-format msgid "%qs function uses %<auto%> type specifier without late return type" msgstr "" -#: cp/decl.c:8268 +#: cp/decl.c:8320 #, gcc-internal-format msgid "" "%qs function with late return type has %qT as its type rather than plain %" "<auto%>" msgstr "" -#: cp/decl.c:8276 +#: cp/decl.c:8328 #, gcc-internal-format msgid "" "%qs function with late return type not declared with %<auto%> type specifier" msgstr "" -#: cp/decl.c:8309 +#: cp/decl.c:8361 #, gcc-internal-format msgid "destructor cannot be static member function" msgstr "" -#: cp/decl.c:8314 +#: cp/decl.c:8366 #, gcc-internal-format msgid "destructors may not be cv-qualified" msgstr "" -#: cp/decl.c:8332 +#: cp/decl.c:8384 #, gcc-internal-format msgid "constructors cannot be declared virtual" msgstr "" -#: cp/decl.c:8345 +#: cp/decl.c:8397 #, gcc-internal-format msgid "can't initialize friend function %qs" msgstr "" #. Cannot be both friend and virtual. -#: cp/decl.c:8349 +#: cp/decl.c:8401 #, gcc-internal-format msgid "virtual functions cannot be friends" msgstr "" -#: cp/decl.c:8353 +#: cp/decl.c:8405 #, gcc-internal-format msgid "friend declaration not in class definition" msgstr "" -#: cp/decl.c:8355 +#: cp/decl.c:8407 #, gcc-internal-format msgid "can't define friend function %qs in a local class definition" msgstr "" -#: cp/decl.c:8368 +#: cp/decl.c:8420 #, gcc-internal-format msgid "destructors may not have parameters" msgstr "" -#: cp/decl.c:8387 +#: cp/decl.c:8439 #, gcc-internal-format msgid "cannot declare pointer to %q#T" msgstr "" -#: cp/decl.c:8400 cp/decl.c:8407 +#: cp/decl.c:8452 cp/decl.c:8459 #, gcc-internal-format msgid "cannot declare reference to %q#T" msgstr "" -#: cp/decl.c:8409 +#: cp/decl.c:8461 #, gcc-internal-format msgid "cannot declare pointer to %q#T member" msgstr "" -#: cp/decl.c:8460 +#: cp/decl.c:8512 #, gcc-internal-format msgid "" "cannot declare reference to %q#T, which is not a typedef or a template type " "argument" msgstr "" -#: cp/decl.c:8504 +#: cp/decl.c:8556 #, gcc-internal-format msgid "template-id %qD used as a declarator" msgstr "" -#: cp/decl.c:8555 +#: cp/decl.c:8607 #, gcc-internal-format msgid "member functions are implicitly friends of their class" msgstr "" -#: cp/decl.c:8560 +#: cp/decl.c:8612 #, gcc-internal-format msgid "extra qualification %<%T::%> on member %qs" msgstr "" -#: cp/decl.c:8592 +#: cp/decl.c:8644 #, gcc-internal-format msgid "cannot define member function %<%T::%s%> within %<%T%>" msgstr "" -#: cp/decl.c:8609 +#: cp/decl.c:8661 #, gcc-internal-format msgid "cannot declare member %<%T::%s%> within %qT" msgstr "" -#: cp/decl.c:8632 +#: cp/decl.c:8684 #, gcc-internal-format msgid "non-parameter %qs cannot be a parameter pack" msgstr "" -#: cp/decl.c:8653 +#: cp/decl.c:8705 #, gcc-internal-format msgid "data member may not have variably modified type %qT" msgstr "" -#: cp/decl.c:8655 +#: cp/decl.c:8707 #, gcc-internal-format msgid "parameter may not have variably modified type %qT" msgstr "" #. [dcl.fct.spec] The explicit specifier shall only be used in #. declarations of constructors within a class definition. -#: cp/decl.c:8663 +#: cp/decl.c:8715 #, gcc-internal-format msgid "only declarations of constructors can be %<explicit%>" msgstr "" -#: cp/decl.c:8671 +#: cp/decl.c:8723 #, gcc-internal-format msgid "non-member %qs cannot be declared %<mutable%>" msgstr "" -#: cp/decl.c:8676 +#: cp/decl.c:8728 #, gcc-internal-format msgid "non-object member %qs cannot be declared %<mutable%>" msgstr "" -#: cp/decl.c:8682 +#: cp/decl.c:8734 #, gcc-internal-format msgid "function %qs cannot be declared %<mutable%>" msgstr "" -#: cp/decl.c:8687 +#: cp/decl.c:8739 #, gcc-internal-format msgid "static %qs cannot be declared %<mutable%>" msgstr "" -#: cp/decl.c:8692 +#: cp/decl.c:8744 #, gcc-internal-format msgid "const %qs cannot be declared %<mutable%>" msgstr "" -#: cp/decl.c:8729 +#: cp/decl.c:8781 #, gcc-internal-format msgid "%Jtypedef name may not be a nested-name-specifier" msgstr "" -#: cp/decl.c:8747 +#: cp/decl.c:8799 #, gcc-internal-format msgid "ISO C++ forbids nested type %qD with same name as enclosing class" msgstr "" -#: cp/decl.c:8831 +#: cp/decl.c:8883 #, gcc-internal-format msgid "" "qualified function types cannot be used to declare static member functions" msgstr "" -#: cp/decl.c:8833 +#: cp/decl.c:8885 #, gcc-internal-format msgid "qualified function types cannot be used to declare free functions" msgstr "" -#: cp/decl.c:8859 +#: cp/decl.c:8911 #, gcc-internal-format msgid "type qualifiers specified for friend class declaration" msgstr "" -#: cp/decl.c:8864 +#: cp/decl.c:8916 #, gcc-internal-format msgid "%<inline%> specified for friend class declaration" msgstr "" -#: cp/decl.c:8872 +#: cp/decl.c:8924 #, gcc-internal-format msgid "template parameters cannot be friends" msgstr "" -#: cp/decl.c:8874 +#: cp/decl.c:8926 #, gcc-internal-format msgid "friend declaration requires class-key, i.e. %<friend class %T::%D%>" msgstr "" -#: cp/decl.c:8878 +#: cp/decl.c:8930 #, gcc-internal-format msgid "friend declaration requires class-key, i.e. %<friend %#T%>" msgstr "" -#: cp/decl.c:8891 +#: cp/decl.c:8943 #, gcc-internal-format msgid "trying to make class %qT a friend of global scope" msgstr "" -#: cp/decl.c:8902 +#: cp/decl.c:8954 #, gcc-internal-format msgid "invalid qualifiers on non-member function type" msgstr "" -#: cp/decl.c:8917 +#: cp/decl.c:8969 #, gcc-internal-format msgid "abstract declarator %qT used as declaration" msgstr "" -#: cp/decl.c:8946 +#: cp/decl.c:8998 #, gcc-internal-format msgid "cannot use %<::%> in parameter declaration" msgstr "" #. Something like struct S { int N::j; }; -#: cp/decl.c:8992 +#: cp/decl.c:9044 #, gcc-internal-format msgid "invalid use of %<::%>" msgstr "" -#: cp/decl.c:9007 +#: cp/decl.c:9059 #, gcc-internal-format msgid "can't make %qD into a method -- not in a class" msgstr "" -#: cp/decl.c:9016 +#: cp/decl.c:9068 #, gcc-internal-format msgid "function %qD declared virtual inside a union" msgstr "" -#: cp/decl.c:9025 +#: cp/decl.c:9077 #, gcc-internal-format msgid "%qD cannot be declared virtual, since it is always static" msgstr "" -#: cp/decl.c:9041 +#: cp/decl.c:9095 #, gcc-internal-format msgid "expected qualified name in friend declaration for destructor %qD" msgstr "" -#: cp/decl.c:9051 +#: cp/decl.c:9102 #, gcc-internal-format msgid "declaration of %qD as member of %qT" msgstr "" -#: cp/decl.c:9058 +#: cp/decl.c:9109 #, gcc-internal-format msgid "expected qualified name in friend declaration for constructor %qD" msgstr "" -#: cp/decl.c:9130 +#: cp/decl.c:9172 #, gcc-internal-format msgid "field %qD has incomplete type" msgstr "" -#: cp/decl.c:9132 +#: cp/decl.c:9174 #, gcc-internal-format msgid "name %qT has incomplete type" msgstr "" -#: cp/decl.c:9141 +#: cp/decl.c:9183 #, gcc-internal-format msgid " in instantiation of template %qT" msgstr "" -#: cp/decl.c:9150 +#: cp/decl.c:9192 #, gcc-internal-format msgid "%qE is neither function nor member function; cannot be declared friend" msgstr "" @@ -30353,107 +30167,117 @@ msgstr "" #. the rest of the compiler does not correctly #. handle the initialization unless the member is #. static so we make it static below. -#: cp/decl.c:9202 +#: cp/decl.c:9244 #, gcc-internal-format msgid "ISO C++ forbids initialization of member %qD" msgstr "" -#: cp/decl.c:9204 +#: cp/decl.c:9246 #, gcc-internal-format msgid "making %qD static" msgstr "" -#: cp/decl.c:9269 +#: cp/decl.c:9311 #, gcc-internal-format msgid "storage class %<auto%> invalid for function %qs" msgstr "" -#: cp/decl.c:9271 +#: cp/decl.c:9313 #, gcc-internal-format msgid "storage class %<register%> invalid for function %qs" msgstr "" -#: cp/decl.c:9273 +#: cp/decl.c:9315 #, gcc-internal-format msgid "storage class %<__thread%> invalid for function %qs" msgstr "" -#: cp/decl.c:9285 +#: cp/decl.c:9327 #, gcc-internal-format msgid "" "%<static%> specified invalid for function %qs declared out of global scope" msgstr "" -#: cp/decl.c:9289 +#: cp/decl.c:9331 #, gcc-internal-format msgid "" "%<inline%> specifier invalid for function %qs declared out of global scope" msgstr "" -#: cp/decl.c:9297 +#: cp/decl.c:9338 +#, gcc-internal-format +msgid "%q#T is not a class or a namespace" +msgstr "" + +#: cp/decl.c:9346 #, gcc-internal-format msgid "virtual non-class function %qs" msgstr "" -#: cp/decl.c:9329 +#: cp/decl.c:9353 +#, gcc-internal-format +msgid "%qs defined in a non-class scope" +msgstr "" + +#: cp/decl.c:9386 #, gcc-internal-format msgid "cannot declare member function %qD to have static linkage" msgstr "" #. FIXME need arm citation -#: cp/decl.c:9336 +#: cp/decl.c:9393 #, gcc-internal-format msgid "cannot declare static function inside another function" msgstr "" -#: cp/decl.c:9366 +#: cp/decl.c:9423 #, gcc-internal-format msgid "" "%<static%> may not be used when defining (as opposed to declaring) a static " "data member" msgstr "" -#: cp/decl.c:9373 +#: cp/decl.c:9430 #, gcc-internal-format msgid "static member %qD declared %<register%>" msgstr "" -#: cp/decl.c:9379 +#: cp/decl.c:9436 #, gcc-internal-format msgid "cannot explicitly declare member %q#D to have extern linkage" msgstr "" -#: cp/decl.c:9523 +#: cp/decl.c:9580 #, gcc-internal-format msgid "default argument for %q#D has type %qT" msgstr "" -#: cp/decl.c:9526 +#: cp/decl.c:9583 #, gcc-internal-format msgid "default argument for parameter of type %qT has type %qT" msgstr "" -#: cp/decl.c:9542 +#: cp/decl.c:9599 #, gcc-internal-format msgid "default argument %qE uses local variable %qD" msgstr "" -#: cp/decl.c:9625 +#: cp/decl.c:9682 #, gcc-internal-format msgid "parameter %qD has Java class type" msgstr "" -#: cp/decl.c:9645 +#: cp/decl.c:9702 #, gcc-internal-format msgid "parameter %qD invalidly declared method type" msgstr "" -#: cp/decl.c:9669 +#: cp/decl.c:9726 #, gcc-internal-format msgid "parameter %qD includes %s to array of unknown bound %qT" msgstr "" -#: cp/decl.c:9684 +#: cp/decl.c:9741 #, gcc-internal-format msgid "parameter packs must be at the end of the parameter list" msgstr "" @@ -30473,139 +30297,139 @@ msgstr "" #. or implicitly defined), there's no need to worry about their #. existence. Theoretically, they should never even be #. instantiated, but that's hard to forestall. -#: cp/decl.c:9903 +#: cp/decl.c:9964 #, gcc-internal-format msgid "invalid constructor; you probably meant %<%T (const %T&)%>" msgstr "" -#: cp/decl.c:10025 +#: cp/decl.c:10086 #, gcc-internal-format msgid "%qD may not be declared within a namespace" msgstr "" -#: cp/decl.c:10030 +#: cp/decl.c:10091 #, gcc-internal-format msgid "%qD may not be declared as static" msgstr "" -#: cp/decl.c:10056 +#: cp/decl.c:10117 #, gcc-internal-format msgid "%qD must be a nonstatic member function" msgstr "" -#: cp/decl.c:10065 +#: cp/decl.c:10126 #, gcc-internal-format msgid "" "%qD must be either a non-static member function or a non-member function" msgstr "" -#: cp/decl.c:10087 +#: cp/decl.c:10148 #, gcc-internal-format msgid "%qD must have an argument of class or enumerated type" msgstr "" -#: cp/decl.c:10128 +#: cp/decl.c:10189 #, gcc-internal-format msgid "conversion to %s%s will never use a type conversion operator" msgstr "" #. 13.4.0.3 -#: cp/decl.c:10136 +#: cp/decl.c:10197 #, gcc-internal-format msgid "ISO C++ prohibits overloading operator ?:" msgstr "" -#: cp/decl.c:10141 +#: cp/decl.c:10202 #, gcc-internal-format msgid "%qD must not have variable number of arguments" msgstr "" -#: cp/decl.c:10192 +#: cp/decl.c:10253 #, gcc-internal-format msgid "postfix %qD must take %<int%> as its argument" msgstr "" -#: cp/decl.c:10195 +#: cp/decl.c:10256 #, gcc-internal-format msgid "postfix %qD must take %<int%> as its second argument" msgstr "" -#: cp/decl.c:10203 +#: cp/decl.c:10264 #, gcc-internal-format msgid "%qD must take either zero or one argument" msgstr "" -#: cp/decl.c:10205 +#: cp/decl.c:10266 #, gcc-internal-format msgid "%qD must take either one or two arguments" msgstr "" -#: cp/decl.c:10227 +#: cp/decl.c:10288 #, gcc-internal-format msgid "prefix %qD should return %qT" msgstr "" -#: cp/decl.c:10233 +#: cp/decl.c:10294 #, gcc-internal-format msgid "postfix %qD should return %qT" msgstr "" -#: cp/decl.c:10242 +#: cp/decl.c:10303 #, gcc-internal-format msgid "%qD must take %<void%>" msgstr "" -#: cp/decl.c:10244 cp/decl.c:10253 +#: cp/decl.c:10305 cp/decl.c:10314 #, gcc-internal-format msgid "%qD must take exactly one argument" msgstr "" -#: cp/decl.c:10255 +#: cp/decl.c:10316 #, gcc-internal-format msgid "%qD must take exactly two arguments" msgstr "" -#: cp/decl.c:10264 +#: cp/decl.c:10325 #, gcc-internal-format msgid "user-defined %qD always evaluates both arguments" msgstr "" -#: cp/decl.c:10278 +#: cp/decl.c:10339 #, gcc-internal-format msgid "%qD should return by value" msgstr "" -#: cp/decl.c:10289 cp/decl.c:10294 +#: cp/decl.c:10350 cp/decl.c:10355 #, gcc-internal-format msgid "%qD cannot have default arguments" msgstr "" -#: cp/decl.c:10352 +#: cp/decl.c:10413 #, gcc-internal-format msgid "using template type parameter %qT after %qs" msgstr "" -#: cp/decl.c:10367 +#: cp/decl.c:10428 #, gcc-internal-format msgid "using typedef-name %qD after %qs" msgstr "" -#: cp/decl.c:10368 +#: cp/decl.c:10429 #, gcc-internal-format msgid "%q+D has a previous declaration here" msgstr "" -#: cp/decl.c:10376 +#: cp/decl.c:10437 #, gcc-internal-format msgid "%qT referred to as %qs" msgstr "" -#: cp/decl.c:10377 cp/decl.c:10384 +#: cp/decl.c:10438 cp/decl.c:10445 #, gcc-internal-format msgid "%q+T has a previous declaration here" msgstr "" -#: cp/decl.c:10383 +#: cp/decl.c:10444 #, gcc-internal-format msgid "%qT referred to as enum" msgstr "" @@ -30617,77 +30441,77 @@ msgstr "" #. void f(class C); // No template header here #. #. then the required template argument is missing. -#: cp/decl.c:10398 +#: cp/decl.c:10459 #, gcc-internal-format msgid "template argument required for %<%s %T%>" msgstr "" -#: cp/decl.c:10446 cp/name-lookup.c:2795 +#: cp/decl.c:10507 cp/name-lookup.c:2800 #, gcc-internal-format msgid "%qD has the same name as the class in which it is declared" msgstr "" -#: cp/decl.c:10476 cp/name-lookup.c:2303 +#: cp/decl.c:10537 cp/name-lookup.c:2308 #, gcc-internal-format msgid "reference to %qD is ambiguous" msgstr "" -#: cp/decl.c:10590 +#: cp/decl.c:10651 #, gcc-internal-format msgid "use of enum %q#D without previous declaration" msgstr "" -#: cp/decl.c:10611 +#: cp/decl.c:10672 #, gcc-internal-format msgid "redeclaration of %qT as a non-template" msgstr "" -#: cp/decl.c:10612 +#: cp/decl.c:10673 #, gcc-internal-format msgid "previous declaration %q+D" msgstr "" -#: cp/decl.c:10723 +#: cp/decl.c:10784 #, gcc-internal-format msgid "derived union %qT invalid" msgstr "" -#: cp/decl.c:10732 +#: cp/decl.c:10793 #, gcc-internal-format msgid "Java class %qT cannot have multiple bases" msgstr "" -#: cp/decl.c:10743 +#: cp/decl.c:10804 #, gcc-internal-format msgid "Java class %qT cannot have virtual bases" msgstr "" -#: cp/decl.c:10763 +#: cp/decl.c:10824 #, gcc-internal-format msgid "base type %qT fails to be a struct or class type" msgstr "" -#: cp/decl.c:10796 +#: cp/decl.c:10857 #, gcc-internal-format msgid "recursive type %qT undefined" msgstr "" -#: cp/decl.c:10798 +#: cp/decl.c:10859 #, gcc-internal-format msgid "duplicate base type %qT invalid" msgstr "" -#: cp/decl.c:10882 +#: cp/decl.c:10943 #, gcc-internal-format msgid "multiple definition of %q#T" msgstr "" -#: cp/decl.c:10883 +#: cp/decl.c:10944 #, gcc-internal-format msgid "%Jprevious definition here" msgstr "" -#: cp/decl.c:10927 +#: cp/decl.c:10991 #, gcc-internal-format msgid "underlying type %<%T%> of %<%T%> must be an integral type" msgstr "" @@ -30696,57 +30520,62 @@ msgstr "" #. #. IF no integral type can represent all the enumerator values, the #. enumeration is ill-formed. -#: cp/decl.c:11059 +#: cp/decl.c:11123 #, gcc-internal-format msgid "no integral type can represent all of the enumerator values for %qT" msgstr "" -#: cp/decl.c:11190 +#: cp/decl.c:11254 #, gcc-internal-format msgid "enumerator value for %qD is not an integer constant" msgstr "" -#: cp/decl.c:11222 +#: cp/decl.c:11286 #, gcc-internal-format msgid "overflow in enumeration values at %qD" msgstr "" -#: cp/decl.c:11242 +#: cp/decl.c:11306 #, gcc-internal-format msgid "enumerator value %E is too large for underlying type %<%T%>" msgstr "" -#: cp/decl.c:11339 +#: cp/decl.c:11403 #, gcc-internal-format msgid "return type %q#T is incomplete" msgstr "" -#: cp/decl.c:11341 +#: cp/decl.c:11405 #, gcc-internal-format msgid "return type has Java class type %q#T" msgstr "" -#: cp/decl.c:11466 cp/typeck.c:6876 +#: cp/decl.c:11530 cp/typeck.c:6939 #, gcc-internal-format msgid "%<operator=%> should return a reference to %<*this%>" msgstr "" -#: cp/decl.c:11860 +#: cp/decl.c:11845 +#, gcc-internal-format +msgid "invalid function declaration" +msgstr "" + +#: cp/decl.c:11929 #, gcc-internal-format msgid "parameter %qD declared void" msgstr "" -#: cp/decl.c:12361 +#: cp/decl.c:12430 #, gcc-internal-format msgid "invalid member function declaration" msgstr "" -#: cp/decl.c:12376 +#: cp/decl.c:12445 #, gcc-internal-format msgid "%qD is already defined in class %qT" msgstr "" -#: cp/decl.c:12623 +#: cp/decl.c:12692 #, gcc-internal-format msgid "static member function %q#D declared with type qualifiers" msgstr "" @@ -30788,7 +30617,7 @@ msgstr "" msgid "deleting %qT is undefined" msgstr "" -#: cp/decl2.c:461 cp/pt.c:3838 +#: cp/decl2.c:461 cp/pt.c:3848 #, gcc-internal-format msgid "template declaration of %q#D" msgstr "" @@ -30803,92 +30632,98 @@ msgstr "" msgid "Java method %qD has non-Java parameter type %qT" msgstr "" -#: cp/decl2.c:642 +#: cp/decl2.c:579 +#, gcc-internal-format +msgid "" +"template parameter lists provided don't match the template parameters of %qD" +msgstr "" + +#: cp/decl2.c:647 #, gcc-internal-format msgid "prototype for %q#D does not match any in class %qT" msgstr "" -#: cp/decl2.c:722 +#: cp/decl2.c:727 #, gcc-internal-format msgid "local class %q#T shall not have static data member %q#D" msgstr "" -#: cp/decl2.c:730 +#: cp/decl2.c:735 #, gcc-internal-format msgid "initializer invalid for static member with constructor" msgstr "" -#: cp/decl2.c:733 +#: cp/decl2.c:738 #, gcc-internal-format msgid "(an out of class initialization is required)" msgstr "" -#: cp/decl2.c:793 +#: cp/decl2.c:798 #, gcc-internal-format msgid "member %qD conflicts with virtual function table field name" msgstr "" -#: cp/decl2.c:813 +#: cp/decl2.c:828 #, gcc-internal-format msgid "%qD is already defined in %qT" msgstr "" -#: cp/decl2.c:851 +#: cp/decl2.c:866 #, gcc-internal-format msgid "initializer specified for static member function %qD" msgstr "" -#: cp/decl2.c:874 +#: cp/decl2.c:889 #, gcc-internal-format msgid "field initializer is not constant" msgstr "" -#: cp/decl2.c:901 +#: cp/decl2.c:916 #, gcc-internal-format msgid "%<asm%> specifiers are not permitted on non-static data members" msgstr "" -#: cp/decl2.c:953 +#: cp/decl2.c:968 #, gcc-internal-format msgid "bit-field %qD with non-integral type" msgstr "" -#: cp/decl2.c:959 +#: cp/decl2.c:974 #, gcc-internal-format msgid "cannot declare %qD to be a bit-field type" msgstr "" -#: cp/decl2.c:969 +#: cp/decl2.c:984 #, gcc-internal-format msgid "cannot declare bit-field %qD with function type" msgstr "" -#: cp/decl2.c:976 +#: cp/decl2.c:991 #, gcc-internal-format msgid "%qD is already defined in the class %qT" msgstr "" -#: cp/decl2.c:983 +#: cp/decl2.c:998 #, gcc-internal-format msgid "static member %qD cannot be a bit-field" msgstr "" -#: cp/decl2.c:1251 +#: cp/decl2.c:1266 #, gcc-internal-format msgid "anonymous struct not inside named type" msgstr "" -#: cp/decl2.c:1335 +#: cp/decl2.c:1350 #, gcc-internal-format msgid "namespace-scope anonymous aggregates must be static" msgstr "" -#: cp/decl2.c:1344 +#: cp/decl2.c:1359 #, gcc-internal-format msgid "anonymous union with no members" msgstr "" -#: cp/decl2.c:1380 +#: cp/decl2.c:1396 #, gcc-internal-format msgid "%<operator new%> must return type %qT" msgstr "" @@ -30897,62 +30732,62 @@ msgstr "" #. #. The first parameter shall not have an associated default #. argument. -#: cp/decl2.c:1391 +#: cp/decl2.c:1407 #, gcc-internal-format msgid "the first parameter of %<operator new%> cannot have a default argument" msgstr "" -#: cp/decl2.c:1407 +#: cp/decl2.c:1423 #, gcc-internal-format msgid "%<operator new%> takes type %<size_t%> (%qT) as first parameter" msgstr "" -#: cp/decl2.c:1436 +#: cp/decl2.c:1452 #, gcc-internal-format msgid "%<operator delete%> must return type %qT" msgstr "" -#: cp/decl2.c:1445 +#: cp/decl2.c:1461 #, gcc-internal-format msgid "%<operator delete%> takes type %qT as first parameter" msgstr "" -#: cp/decl2.c:2122 +#: cp/decl2.c:2152 #, gcc-internal-format msgid "%qT has a field %qD whose type uses the anonymous namespace" msgstr "" -#: cp/decl2.c:2129 +#: cp/decl2.c:2159 #, gcc-internal-format msgid "%qT declared with greater visibility than the type of its field %qD" msgstr "" -#: cp/decl2.c:2142 +#: cp/decl2.c:2172 #, gcc-internal-format msgid "%qT has a base %qT whose type uses the anonymous namespace" msgstr "" -#: cp/decl2.c:2148 +#: cp/decl2.c:2178 #, gcc-internal-format msgid "%qT declared with greater visibility than its base %qT" msgstr "" -#: cp/decl2.c:3582 +#: cp/decl2.c:3612 #, gcc-internal-format msgid "inline function %q+D used but never defined" msgstr "" -#: cp/decl2.c:3731 +#: cp/decl2.c:3761 #, gcc-internal-format msgid "default argument missing for parameter %P of %q+#D" msgstr "" -#: cp/decl2.c:3780 cp/search.c:1919 +#: cp/decl2.c:3810 cp/search.c:1912 #, gcc-internal-format msgid "deleted function %q+D" msgstr "" -#: cp/decl2.c:3781 +#: cp/decl2.c:3811 #, gcc-internal-format msgid "used here" msgstr "" @@ -30960,7 +30795,7 @@ msgstr "" #. We really want to suppress this warning in system headers, #. because libstdc++ uses variadic templates even when we aren't #. in C++0x mode. -#: cp/error.c:2701 +#: cp/error.c:2710 #, gcc-internal-format msgid "%s only available with -std=c++0x or -std=gnu++0x" msgstr "" @@ -30982,43 +30817,43 @@ msgstr "" msgid "type %qT is not derived from %<java::lang::Throwable%>" msgstr "" -#: cp/except.c:367 +#: cp/except.c:368 #, gcc-internal-format msgid "mixing C++ and Java catches in a single translation unit" msgstr "" -#: cp/except.c:638 +#: cp/except.c:639 #, gcc-internal-format msgid "throwing NULL, which has integral, not pointer type" msgstr "" -#: cp/except.c:661 cp/init.c:1955 +#: cp/except.c:662 cp/init.c:1896 #, gcc-internal-format msgid "%qD should never be overloaded" msgstr "" -#: cp/except.c:758 +#: cp/except.c:759 #, gcc-internal-format msgid " in thrown expression" msgstr "" -#: cp/except.c:914 +#: cp/except.c:915 #, gcc-internal-format msgid "" "expression %qE of abstract class type %qT cannot be used in throw-expression" msgstr "" -#: cp/except.c:999 +#: cp/except.c:1000 #, gcc-internal-format msgid "%Hexception of type %qT will be caught" msgstr "" -#: cp/except.c:1001 +#: cp/except.c:1002 #, gcc-internal-format msgid "%H by earlier handler for %qT" msgstr "" -#: cp/except.c:1031 +#: cp/except.c:1032 #, gcc-internal-format msgid "%H%<...%> handler must be the last handler for its try block" msgstr "" @@ -31109,273 +30944,273 @@ msgid "" "already been declared and add <> after the function name here) " msgstr "" -#: cp/init.c:372 +#: cp/init.c:351 #, gcc-internal-format msgid "value-initialization of reference" msgstr "" -#: cp/init.c:479 +#: cp/init.c:429 #, gcc-internal-format msgid "%J%qD should be initialized in the member initialization list" msgstr "" -#. TYPE_NEEDS_CONSTRUCTING can be set just because we have a -#. vtable; still give this diagnostic. -#: cp/init.c:525 cp/init.c:548 +#: cp/init.c:454 #, gcc-internal-format -msgid "%Juninitialized member %qD with %<const%> type %qT" +msgid "%Jvalue-initialization of %q#D, which has reference type" msgstr "" -#: cp/init.c:539 +#. TYPE_NEEDS_CONSTRUCTING can be set just because we have a +#. vtable; still give this diagnostic. +#: cp/init.c:495 cp/init.c:510 #, gcc-internal-format -msgid "%Jdefault-initialization of %q#D, which has reference type" +msgid "%Juninitialized member %qD with %<const%> type %qT" msgstr "" -#: cp/init.c:545 +#: cp/init.c:507 #, gcc-internal-format msgid "%Juninitialized reference member %qD" msgstr "" -#: cp/init.c:693 +#: cp/init.c:655 #, gcc-internal-format msgid "%q+D will be initialized after" msgstr "" -#: cp/init.c:696 +#: cp/init.c:658 #, gcc-internal-format msgid "base %qT will be initialized after" msgstr "" -#: cp/init.c:699 +#: cp/init.c:661 #, gcc-internal-format msgid " %q+#D" msgstr "" -#: cp/init.c:701 +#: cp/init.c:663 #, gcc-internal-format msgid " base %qT" msgstr "" -#: cp/init.c:702 +#: cp/init.c:664 #, gcc-internal-format msgid "%J when initialized here" msgstr "" -#: cp/init.c:718 +#: cp/init.c:680 #, gcc-internal-format msgid "%Jmultiple initializations given for %qD" msgstr "" -#: cp/init.c:721 +#: cp/init.c:683 #, gcc-internal-format msgid "%Jmultiple initializations given for base %qT" msgstr "" -#: cp/init.c:788 +#: cp/init.c:750 #, gcc-internal-format msgid "%Jinitializations for multiple members of %qT" msgstr "" -#: cp/init.c:851 +#: cp/init.c:813 #, gcc-internal-format msgid "" "%Jbase class %q#T should be explicitly initialized in the copy constructor" msgstr "" -#: cp/init.c:1080 cp/init.c:1099 +#: cp/init.c:1037 cp/init.c:1056 #, gcc-internal-format msgid "class %qT does not have any field named %qD" msgstr "" -#: cp/init.c:1086 +#: cp/init.c:1043 #, gcc-internal-format msgid "" "%q#D is a static data member; it can only be initialized at its definition" msgstr "" -#: cp/init.c:1093 +#: cp/init.c:1050 #, gcc-internal-format msgid "%q#D is not a non-static data member of %qT" msgstr "" -#: cp/init.c:1132 +#: cp/init.c:1089 #, gcc-internal-format msgid "unnamed initializer for %qT, which has no base classes" msgstr "" -#: cp/init.c:1140 +#: cp/init.c:1097 #, gcc-internal-format msgid "unnamed initializer for %qT, which uses multiple inheritance" msgstr "" -#: cp/init.c:1186 +#: cp/init.c:1143 #, gcc-internal-format msgid "%qD is both a direct base and an indirect virtual base" msgstr "" -#: cp/init.c:1194 +#: cp/init.c:1151 #, gcc-internal-format msgid "type %qT is not a direct or virtual base of %qT" msgstr "" -#: cp/init.c:1197 +#: cp/init.c:1154 #, gcc-internal-format msgid "type %qT is not a direct base of %qT" msgstr "" -#: cp/init.c:1278 +#: cp/init.c:1235 #, gcc-internal-format msgid "bad array initializer" msgstr "" -#: cp/init.c:1457 cp/semantics.c:2490 +#: cp/init.c:1441 cp/semantics.c:2496 #, gcc-internal-format msgid "%qT is not a class type" msgstr "" -#: cp/init.c:1511 +#: cp/init.c:1495 #, gcc-internal-format msgid "incomplete type %qT does not have member %qD" msgstr "" -#: cp/init.c:1524 +#: cp/init.c:1508 #, gcc-internal-format msgid "invalid pointer to bit-field %qD" msgstr "" -#: cp/init.c:1602 +#: cp/init.c:1586 #, gcc-internal-format msgid "invalid use of non-static member function %qD" msgstr "" -#: cp/init.c:1608 +#: cp/init.c:1592 #, gcc-internal-format msgid "invalid use of non-static data member %qD" msgstr "" -#: cp/init.c:1897 +#: cp/init.c:1852 #, gcc-internal-format msgid "invalid type %<void%> for new" msgstr "" -#: cp/init.c:1910 +#: cp/init.c:1865 #, gcc-internal-format msgid "uninitialized const in %<new%> of %q#T" msgstr "" -#: cp/init.c:1949 +#: cp/init.c:1890 #, gcc-internal-format msgid "call to Java constructor with %qs undefined" msgstr "" -#: cp/init.c:1967 +#: cp/init.c:1908 #, gcc-internal-format msgid "Java class %q#T object allocated using placement new" msgstr "" -#: cp/init.c:1997 +#: cp/init.c:1938 #, gcc-internal-format msgid "no suitable %qD found in class %qT" msgstr "" -#: cp/init.c:2004 +#: cp/init.c:1945 #, gcc-internal-format msgid "request for member %qD is ambiguous" msgstr "" -#: cp/init.c:2184 +#: cp/init.c:2124 #, gcc-internal-format msgid "ISO C++ forbids initialization in array new" msgstr "" -#: cp/init.c:2410 +#: cp/init.c:2348 #, gcc-internal-format msgid "size in array new must have integral type" msgstr "" -#: cp/init.c:2423 +#: cp/init.c:2361 #, gcc-internal-format msgid "new cannot be applied to a reference type" msgstr "" -#: cp/init.c:2432 +#: cp/init.c:2370 #, gcc-internal-format msgid "new cannot be applied to a function type" msgstr "" -#: cp/init.c:2471 +#: cp/init.c:2409 #, gcc-internal-format msgid "call to Java constructor, while %<jclass%> undefined" msgstr "" -#: cp/init.c:2489 +#: cp/init.c:2427 #, gcc-internal-format msgid "can't find %<class$%> in %qT" msgstr "" -#: cp/init.c:2858 +#: cp/init.c:2802 #, gcc-internal-format msgid "initializer ends prematurely" msgstr "" -#: cp/init.c:2916 +#: cp/init.c:2860 #, gcc-internal-format msgid "cannot initialize multi-dimensional array with initializer" msgstr "" -#: cp/init.c:3061 +#: cp/init.c:3008 #, gcc-internal-format msgid "possible problem detected in invocation of delete operator:" msgstr "" -#: cp/init.c:3065 +#: cp/init.c:3012 #, gcc-internal-format msgid "" "neither the destructor nor the class-specific operator delete will be " "called, even if they are declared when the class is defined." msgstr "" -#: cp/init.c:3087 +#: cp/init.c:3034 #, gcc-internal-format msgid "unknown array size in delete" msgstr "" -#: cp/init.c:3341 +#: cp/init.c:3288 #, gcc-internal-format msgid "type to vector delete is neither pointer or array type" msgstr "" -#: cp/lex.c:319 +#: cp/lex.c:321 #, gcc-internal-format msgid "junk at end of #pragma %s" msgstr "" -#: cp/lex.c:326 +#: cp/lex.c:328 #, gcc-internal-format msgid "invalid #pragma %s" msgstr "" -#: cp/lex.c:334 +#: cp/lex.c:336 #, gcc-internal-format msgid "#pragma vtable no longer supported" msgstr "" -#: cp/lex.c:406 +#: cp/lex.c:408 #, gcc-internal-format msgid "#pragma implementation for %qs appears after file is included" msgstr "" -#: cp/lex.c:430 +#: cp/lex.c:432 #, gcc-internal-format msgid "junk at end of #pragma GCC java_exceptions" msgstr "" -#: cp/lex.c:444 +#: cp/lex.c:447 #, gcc-internal-format msgid "%qD not defined" msgstr "" -#: cp/lex.c:448 +#: cp/lex.c:451 #, gcc-internal-format msgid "%qD was not declared in this scope" msgstr "" @@ -31390,38 +31225,46 @@ msgstr "" #. Note that we have the exact wording of the following message in #. the manual (trouble.texi, node "Name lookup"), so they need to #. be kept in synch. -#: cp/lex.c:485 +#: cp/lex.c:488 #, gcc-internal-format msgid "" "there are no arguments to %qD that depend on a template parameter, so a " "declaration of %qD must be available" msgstr "" -#: cp/lex.c:494 +#: cp/lex.c:497 #, gcc-internal-format msgid "" "(if you use %<-fpermissive%>, G++ will accept your code, but allowing the " "use of an undeclared name is deprecated)" msgstr "" -#: cp/mangle.c:1687 +#: cp/mangle.c:1690 #, gcc-internal-format msgid "mangling typeof, use decltype instead" msgstr "" -#. FIXME the above hack for T() needs to be replaced with -#. something more general. -#: cp/mangle.c:2282 +#: cp/mangle.c:1903 +#, gcc-internal-format +msgid "mangling unknown fixed point type" +msgstr "" + +#: cp/mangle.c:2338 +#, gcc-internal-format +msgid "mangling %C" +msgstr "" + +#: cp/mangle.c:2375 #, gcc-internal-format -msgid "mangling function-style cast with more than one argument" +msgid "mangling new-expression" msgstr "" -#: cp/mangle.c:2310 +#: cp/mangle.c:2395 #, gcc-internal-format msgid "omitted middle operand to %<?:%> operand cannot be mangled" msgstr "" -#: cp/mangle.c:2625 +#: cp/mangle.c:2710 #, gcc-internal-format msgid "the mangled name of %qD will change in a future version of GCC" msgstr "" @@ -31484,567 +31327,577 @@ msgstr "" msgid "due to different exception specifications" msgstr "" -#: cp/name-lookup.c:899 +#: cp/name-lookup.c:900 #, gcc-internal-format msgid "type mismatch with previous external decl of %q#D" msgstr "" -#: cp/name-lookup.c:900 +#: cp/name-lookup.c:901 #, gcc-internal-format msgid "previous external decl of %q+#D" msgstr "" -#: cp/name-lookup.c:991 +#: cp/name-lookup.c:992 #, gcc-internal-format msgid "extern declaration of %q#D doesn't match" msgstr "" -#: cp/name-lookup.c:992 +#: cp/name-lookup.c:993 #, gcc-internal-format msgid "global declaration %q+#D" msgstr "" -#: cp/name-lookup.c:1029 cp/name-lookup.c:1036 +#: cp/name-lookup.c:1030 cp/name-lookup.c:1040 #, gcc-internal-format msgid "declaration of %q#D shadows a parameter" msgstr "" #. Location of previous decl is not useful in this case. -#: cp/name-lookup.c:1061 +#: cp/name-lookup.c:1065 #, gcc-internal-format msgid "declaration of %qD shadows a member of 'this'" msgstr "" -#: cp/name-lookup.c:1067 +#: cp/name-lookup.c:1071 #, gcc-internal-format msgid "declaration of %qD shadows a previous local" msgstr "" -#: cp/name-lookup.c:1074 +#: cp/name-lookup.c:1078 #, gcc-internal-format msgid "declaration of %qD shadows a global declaration" msgstr "" -#: cp/name-lookup.c:1197 +#: cp/name-lookup.c:1201 #, gcc-internal-format msgid "name lookup of %qD changed" msgstr "" -#: cp/name-lookup.c:1198 +#: cp/name-lookup.c:1202 #, gcc-internal-format msgid " matches this %q+D under ISO standard rules" msgstr "" -#: cp/name-lookup.c:1200 +#: cp/name-lookup.c:1204 #, gcc-internal-format msgid " matches this %q+D under old rules" msgstr "" -#: cp/name-lookup.c:1218 cp/name-lookup.c:1226 +#: cp/name-lookup.c:1222 cp/name-lookup.c:1230 #, gcc-internal-format msgid "name lookup of %qD changed for ISO %<for%> scoping" msgstr "" -#: cp/name-lookup.c:1220 +#: cp/name-lookup.c:1224 #, gcc-internal-format msgid " cannot use obsolete binding at %q+D because it has a destructor" msgstr "" -#: cp/name-lookup.c:1229 +#: cp/name-lookup.c:1233 #, gcc-internal-format msgid " using obsolete binding at %q+D" msgstr "" -#: cp/name-lookup.c:1235 cp/parser.c:10068 +#: cp/name-lookup.c:1239 cp/parser.c:10154 #, gcc-internal-format msgid "(if you use %<-fpermissive%> G++ will accept your code)" msgstr "" -#: cp/name-lookup.c:1291 +#: cp/name-lookup.c:1295 #, gcc-internal-format msgid "%s %s(%E) %p %d\n" msgstr "" -#: cp/name-lookup.c:1294 +#: cp/name-lookup.c:1298 #, gcc-internal-format msgid "%s %s %p %d\n" msgstr "" -#: cp/name-lookup.c:1422 +#: cp/name-lookup.c:1426 #, gcc-internal-format msgid "XXX is_class_level != (current_scope == class_scope)\n" msgstr "" -#: cp/name-lookup.c:2016 +#: cp/name-lookup.c:2021 #, gcc-internal-format msgid "%q#D hides constructor for %q#T" msgstr "" -#: cp/name-lookup.c:2033 +#: cp/name-lookup.c:2038 #, gcc-internal-format msgid "%q#D conflicts with previous using declaration %q#D" msgstr "" -#: cp/name-lookup.c:2056 +#: cp/name-lookup.c:2061 #, gcc-internal-format msgid "previous non-function declaration %q+#D" msgstr "" -#: cp/name-lookup.c:2057 +#: cp/name-lookup.c:2062 #, gcc-internal-format msgid "conflicts with function declaration %q#D" msgstr "" #. It's a nested name with template parameter dependent scope. #. This can only be using-declaration for class member. -#: cp/name-lookup.c:2135 cp/name-lookup.c:2160 +#: cp/name-lookup.c:2140 cp/name-lookup.c:2165 #, gcc-internal-format msgid "%qT is not a namespace" msgstr "" #. 7.3.3/5 #. A using-declaration shall not name a template-id. -#: cp/name-lookup.c:2145 +#: cp/name-lookup.c:2150 #, gcc-internal-format msgid "a using-declaration cannot specify a template-id. Try %<using %D%>" msgstr "" -#: cp/name-lookup.c:2152 +#: cp/name-lookup.c:2157 #, gcc-internal-format msgid "namespace %qD not allowed in using-declaration" msgstr "" -#: cp/name-lookup.c:2188 +#: cp/name-lookup.c:2193 #, gcc-internal-format msgid "%qD not declared" msgstr "" -#: cp/name-lookup.c:2224 cp/name-lookup.c:2261 cp/name-lookup.c:2295 -#: cp/name-lookup.c:2310 +#: cp/name-lookup.c:2229 cp/name-lookup.c:2266 cp/name-lookup.c:2300 +#: cp/name-lookup.c:2315 #, gcc-internal-format msgid "%qD is already declared in this scope" msgstr "" -#: cp/name-lookup.c:2914 +#: cp/name-lookup.c:2919 #, gcc-internal-format msgid "using-declaration for non-member at class scope" msgstr "" -#: cp/name-lookup.c:2921 +#: cp/name-lookup.c:2926 #, gcc-internal-format msgid "%<%T::%D%> names destructor" msgstr "" -#: cp/name-lookup.c:2926 +#: cp/name-lookup.c:2931 #, gcc-internal-format msgid "%<%T::%D%> names constructor" msgstr "" -#: cp/name-lookup.c:2931 +#: cp/name-lookup.c:2936 #, gcc-internal-format msgid "%<%T::%D%> names constructor in %qT" msgstr "" -#: cp/name-lookup.c:2981 +#: cp/name-lookup.c:2986 #, gcc-internal-format msgid "no members matching %<%T::%D%> in %q#T" msgstr "" -#: cp/name-lookup.c:3049 +#: cp/name-lookup.c:3054 #, gcc-internal-format msgid "declaration of %qD not in a namespace surrounding %qD" msgstr "" -#: cp/name-lookup.c:3057 +#: cp/name-lookup.c:3062 #, gcc-internal-format msgid "explicit qualification in declaration of %qD" msgstr "" -#: cp/name-lookup.c:3100 +#: cp/name-lookup.c:3105 #, gcc-internal-format msgid "%qD should have been declared inside %qD" msgstr "" -#: cp/name-lookup.c:3145 +#: cp/name-lookup.c:3150 #, gcc-internal-format msgid "%qD attribute requires a single NTBS argument" msgstr "" -#: cp/name-lookup.c:3152 +#: cp/name-lookup.c:3157 #, gcc-internal-format msgid "" "%qD attribute is meaningless since members of the anonymous namespace get " "local symbols" msgstr "" -#: cp/name-lookup.c:3161 cp/name-lookup.c:3530 +#: cp/name-lookup.c:3166 cp/name-lookup.c:3536 #, gcc-internal-format msgid "%qD attribute directive ignored" msgstr "" -#: cp/name-lookup.c:3206 +#: cp/name-lookup.c:3211 #, gcc-internal-format msgid "namespace alias %qD not allowed here, assuming %qD" msgstr "" -#: cp/name-lookup.c:3518 +#: cp/name-lookup.c:3524 #, gcc-internal-format msgid "strong using only meaningful at namespace scope" msgstr "" -#: cp/name-lookup.c:3522 +#: cp/name-lookup.c:3528 #, gcc-internal-format msgid "current namespace %qD does not enclose strongly used namespace %qD" msgstr "" -#: cp/name-lookup.c:4418 +#: cp/name-lookup.c:4466 #, gcc-internal-format msgid "%q+D is not a function," msgstr "" -#: cp/name-lookup.c:4419 +#: cp/name-lookup.c:4467 #, gcc-internal-format msgid " conflict with %q+D" msgstr "" -#: cp/name-lookup.c:4863 +#: cp/name-lookup.c:4912 #, gcc-internal-format msgid "argument dependent lookup finds %q+D" msgstr "" -#: cp/name-lookup.c:5301 +#: cp/name-lookup.c:5353 #, gcc-internal-format msgid "XXX entering pop_everything ()\n" msgstr "" -#: cp/name-lookup.c:5310 +#: cp/name-lookup.c:5362 #, gcc-internal-format msgid "XXX leaving pop_everything ()\n" msgstr "" -#: cp/parser.c:441 +#: cp/parser.c:440 #, gcc-internal-format msgid "identifier %<%s%> will become a keyword in C++0x" msgstr "" -#: cp/parser.c:2081 +#: cp/parser.c:2080 #, gcc-internal-format msgid "%H%<#pragma%> is not allowed here" msgstr "" -#: cp/parser.c:2112 +#: cp/parser.c:2111 #, gcc-internal-format msgid "%H%<%E::%E%> has not been declared" msgstr "" -#: cp/parser.c:2115 +#: cp/parser.c:2114 #, gcc-internal-format msgid "%H%<::%E%> has not been declared" msgstr "" -#: cp/parser.c:2118 +#: cp/parser.c:2117 #, gcc-internal-format msgid "%Hrequest for member %qE in non-class type %qT" msgstr "" -#: cp/parser.c:2121 +#: cp/parser.c:2120 #, gcc-internal-format msgid "%H%<%T::%E%> has not been declared" msgstr "" -#: cp/parser.c:2124 +#: cp/parser.c:2123 #, gcc-internal-format msgid "%H%qE has not been declared" msgstr "" -#: cp/parser.c:2127 +#: cp/parser.c:2126 #, gcc-internal-format msgid "%H%<%E::%E%> %s" msgstr "" -#: cp/parser.c:2129 +#: cp/parser.c:2128 #, gcc-internal-format msgid "%H%<::%E%> %s" msgstr "" -#: cp/parser.c:2131 +#: cp/parser.c:2130 #, gcc-internal-format msgid "%H%qE %s" msgstr "" -#: cp/parser.c:2166 +#: cp/parser.c:2165 #, gcc-internal-format msgid "%H%<long long long%> is too long for GCC" msgstr "" -#: cp/parser.c:2170 +#: cp/parser.c:2169 #, gcc-internal-format msgid "ISO C++ 1998 does not support %<long long%>" msgstr "" -#: cp/parser.c:2190 +#: cp/parser.c:2189 #, gcc-internal-format msgid "%Hduplicate %qs" msgstr "" -#: cp/parser.c:2234 +#: cp/parser.c:2233 #, gcc-internal-format msgid "%Hnew types may not be defined in a return type" msgstr "" -#: cp/parser.c:2236 +#: cp/parser.c:2235 #, gcc-internal-format msgid "(perhaps a semicolon is missing after the definition of %qT)" msgstr "" -#: cp/parser.c:2256 +#: cp/parser.c:2255 #, gcc-internal-format msgid "%H%qT is not a template" msgstr "" -#: cp/parser.c:2258 +#: cp/parser.c:2257 #, gcc-internal-format msgid "%H%qE is not a template" msgstr "" -#: cp/parser.c:2260 +#: cp/parser.c:2259 #, gcc-internal-format msgid "%Hinvalid template-id" msgstr "" -#: cp/parser.c:2322 +#: cp/parser.c:2321 #, gcc-internal-format msgid "%Hinvalid use of template-name %qE without an argument list" msgstr "" -#: cp/parser.c:2325 +#: cp/parser.c:2324 #, gcc-internal-format msgid "%Hinvalid use of destructor %qD as a type" msgstr "" #. Something like 'unsigned A a;' -#: cp/parser.c:2328 +#: cp/parser.c:2327 #, gcc-internal-format msgid "%Hinvalid combination of multiple type-specifiers" msgstr "" #. Issue an error message. -#: cp/parser.c:2333 +#: cp/parser.c:2332 #, gcc-internal-format msgid "%H%qE does not name a type" msgstr "" -#: cp/parser.c:2366 +#: cp/parser.c:2365 #, gcc-internal-format msgid "(perhaps %<typename %T::%E%> was intended)" msgstr "" -#: cp/parser.c:2381 +#: cp/parser.c:2380 #, gcc-internal-format msgid "%H%qE in namespace %qE does not name a type" msgstr "" -#: cp/parser.c:2384 +#: cp/parser.c:2383 #, gcc-internal-format msgid "%H%qE in class %qT does not name a type" msgstr "" -#: cp/parser.c:2946 +#: cp/parser.c:2945 #, gcc-internal-format msgid "%Hunsupported non-standard concatenation of string literals" msgstr "" -#: cp/parser.c:3224 +#: cp/parser.c:3148 +#, gcc-internal-format +msgid "%Hfixed-point types not supported in C++" +msgstr "" + +#: cp/parser.c:3229 #, gcc-internal-format msgid "ISO C++ forbids braced-groups within expressions" msgstr "" -#: cp/parser.c:3235 +#: cp/parser.c:3240 #, gcc-internal-format msgid "" "%Hstatement-expressions are not allowed outside functions nor in template-" "argument lists" msgstr "" -#: cp/parser.c:3294 +#: cp/parser.c:3299 #, gcc-internal-format msgid "%H%<this%> may not be used in this context" msgstr "" -#: cp/parser.c:3480 +#: cp/parser.c:3508 #, gcc-internal-format msgid "%Hlocal variable %qD may not appear in this context" msgstr "" -#: cp/parser.c:3780 +#: cp/parser.c:3808 #, gcc-internal-format msgid "%Hscope %qT before %<~%> is not a class-name" msgstr "" -#: cp/parser.c:3882 +#: cp/parser.c:3922 #, gcc-internal-format msgid "%Hdeclaration of %<~%T%> as member of %qT" msgstr "" -#: cp/parser.c:3896 +#: cp/parser.c:3936 #, gcc-internal-format msgid "%Htypedef-name %qD used as destructor declarator" msgstr "" -#: cp/parser.c:4110 +#: cp/parser.c:4150 #, gcc-internal-format msgid "%H%qD used without template parameters" msgstr "" -#: cp/parser.c:4114 cp/parser.c:14760 cp/parser.c:17038 +#: cp/parser.c:4154 cp/parser.c:14857 cp/parser.c:17154 #, gcc-internal-format msgid "%Hreference to %qD is ambiguous" msgstr "" -#: cp/parser.c:4160 cp/pt.c:5599 +#: cp/parser.c:4200 cp/pt.c:5659 #, gcc-internal-format msgid "%qT is not a template" msgstr "" #. Warn the user that a compound literal is not #. allowed in standard C++. -#: cp/parser.c:4583 +#: cp/parser.c:4624 #, gcc-internal-format msgid "ISO C++ forbids compound-literals" msgstr "" -#: cp/parser.c:4951 +#: cp/parser.c:4998 #, gcc-internal-format msgid "%H%qE does not have class type" msgstr "" -#: cp/parser.c:5035 +#: cp/parser.c:5082 #, gcc-internal-format msgid "%Hinvalid use of %qD" msgstr "" -#: cp/parser.c:5612 +#: cp/parser.c:5661 #, gcc-internal-format msgid "%Harray bound forbidden after parenthesized type-id" msgstr "" -#: cp/parser.c:5615 +#: cp/parser.c:5664 #, gcc-internal-format msgid "try removing the parentheses around the type-id" msgstr "" -#: cp/parser.c:5808 +#: cp/parser.c:5857 #, gcc-internal-format msgid "%Hexpression in new-declarator must have integral or enumeration type" msgstr "" -#: cp/parser.c:6062 +#: cp/parser.c:6113 #, gcc-internal-format msgid "use of old-style cast" msgstr "" -#: cp/parser.c:6191 +#: cp/parser.c:6244 #, gcc-internal-format msgid "%H%<>>%> operator will be treated as two right angle brackets in C++0x" msgstr "" -#: cp/parser.c:6194 +#: cp/parser.c:6247 #, gcc-internal-format msgid "suggest parentheses around %<>>%> expression" msgstr "" -#: cp/parser.c:7016 +#: cp/parser.c:7084 #, gcc-internal-format msgid "%Hcase label %qE not within a switch statement" msgstr "" -#: cp/parser.c:7028 +#: cp/parser.c:7096 #, gcc-internal-format msgid "%Hcase label not within a switch statement" msgstr "" -#: cp/parser.c:7146 +#: cp/parser.c:7214 #, gcc-internal-format msgid "%H%<else%> without a previous %<if%>" msgstr "" -#: cp/parser.c:7625 +#: cp/parser.c:7693 #, gcc-internal-format msgid "%Hbreak statement not within loop or switch" msgstr "" -#: cp/parser.c:7633 cp/parser.c:7653 +#: cp/parser.c:7701 cp/parser.c:7721 #, gcc-internal-format msgid "%Hinvalid exit from OpenMP structured block" msgstr "" -#: cp/parser.c:7636 +#: cp/parser.c:7704 #, gcc-internal-format msgid "%Hbreak statement used with OpenMP for loop" msgstr "" -#: cp/parser.c:7646 +#: cp/parser.c:7714 #, gcc-internal-format msgid "%Hcontinue statement not within a loop" msgstr "" #. Issue a warning about this use of a GNU extension. -#: cp/parser.c:7689 +#: cp/parser.c:7757 #, gcc-internal-format msgid "ISO C++ forbids computed gotos" msgstr "" -#: cp/parser.c:7829 cp/parser.c:15630 +#: cp/parser.c:7901 cp/parser.c:15736 #, gcc-internal-format msgid "extra %<;%>" msgstr "" -#: cp/parser.c:8050 +#: cp/parser.c:8122 #, gcc-internal-format msgid "%H%<__label__%> not at the beginning of a block" msgstr "" -#: cp/parser.c:8187 +#: cp/parser.c:8259 #, gcc-internal-format msgid "%Hmixing declarations and function-definitions is forbidden" msgstr "" -#: cp/parser.c:8327 +#: cp/parser.c:8399 #, gcc-internal-format msgid "%H%<friend%> used outside of class" msgstr "" -#: cp/parser.c:8383 +#: cp/parser.c:8455 #, gcc-internal-format msgid "%H%<auto%> will change meaning in C++0x; please remove it" msgstr "" -#: cp/parser.c:8502 +#: cp/parser.c:8574 #, gcc-internal-format msgid "%Hclass definition may not be declared a friend" msgstr "" -#: cp/parser.c:8572 cp/parser.c:15946 +#: cp/parser.c:8644 cp/parser.c:16058 #, gcc-internal-format msgid "%Htemplates may not be %<virtual%>" msgstr "" -#: cp/parser.c:9049 +#: cp/parser.c:9047 +#, gcc-internal-format +msgid "invalid use of %<auto%> in conversion operator" +msgstr "" + +#: cp/parser.c:9131 #, gcc-internal-format msgid "%Honly constructors take base initializers" msgstr "" -#: cp/parser.c:9071 +#: cp/parser.c:9153 #, gcc-internal-format msgid "%Hcannot expand initializer for member %<%D%>" msgstr "" -#: cp/parser.c:9126 +#: cp/parser.c:9208 #, gcc-internal-format msgid "anachronistic old-style base class initializer" msgstr "" -#: cp/parser.c:9182 +#: cp/parser.c:9268 #, gcc-internal-format msgid "" "%Hkeyword %<typename%> not allowed in this context (a qualified member " @@ -32052,92 +31905,92 @@ msgid "" msgstr "" #. Warn that we do not support `export'. -#: cp/parser.c:9528 +#: cp/parser.c:9614 #, gcc-internal-format msgid "keyword %<export%> not implemented, and will be ignored" msgstr "" -#: cp/parser.c:9710 cp/parser.c:9808 cp/parser.c:9914 +#: cp/parser.c:9796 cp/parser.c:9894 cp/parser.c:10000 #, gcc-internal-format msgid "%Htemplate parameter pack %qD cannot have a default argument" msgstr "" -#: cp/parser.c:9713 +#: cp/parser.c:9799 #, gcc-internal-format msgid "%Htemplate parameter pack cannot have a default argument" msgstr "" -#: cp/parser.c:9811 cp/parser.c:9918 +#: cp/parser.c:9897 cp/parser.c:10004 #, gcc-internal-format msgid "%Htemplate parameter packs cannot have default arguments" msgstr "" -#: cp/parser.c:10060 +#: cp/parser.c:10146 #, gcc-internal-format msgid "%<<::%> cannot begin a template-argument list" msgstr "" -#: cp/parser.c:10064 +#: cp/parser.c:10150 #, gcc-internal-format msgid "" "%<<:%> is an alternate spelling for %<[%>. Insert whitespace between %<<%> " "and %<::%>" msgstr "" -#: cp/parser.c:10142 +#: cp/parser.c:10228 #, gcc-internal-format msgid "%Hparse error in template argument list" msgstr "" #. Explain what went wrong. -#: cp/parser.c:10257 +#: cp/parser.c:10343 #, gcc-internal-format msgid "%Hnon-template %qD used as template" msgstr "" -#: cp/parser.c:10259 +#: cp/parser.c:10345 #, gcc-internal-format msgid "use %<%T::template %D%> to indicate that it is a template" msgstr "" -#: cp/parser.c:10796 +#: cp/parser.c:10882 #, gcc-internal-format msgid "%Htemplate specialization with C linkage" msgstr "" -#: cp/parser.c:11442 +#: cp/parser.c:11527 #, gcc-internal-format msgid "using %<typename%> outside of template" msgstr "" -#: cp/parser.c:11606 +#: cp/parser.c:11695 #, gcc-internal-format msgid "declaration %qD does not declare anything" msgstr "" -#: cp/parser.c:11691 +#: cp/parser.c:11780 #, gcc-internal-format msgid "attributes ignored on uninstantiated type" msgstr "" -#: cp/parser.c:11695 +#: cp/parser.c:11784 #, gcc-internal-format msgid "attributes ignored on template instantiation" msgstr "" -#: cp/parser.c:11700 +#: cp/parser.c:11789 #, gcc-internal-format msgid "" "attributes ignored on elaborated-type-specifier that is not a forward " "declaration" msgstr "" -#: cp/parser.c:11977 +#: cp/parser.c:12067 #, gcc-internal-format msgid "%H%qD is not a namespace-name" msgstr "" -#: cp/parser.c:12104 +#: cp/parser.c:12194 #, gcc-internal-format msgid "%H%<namespace%> definition is not allowed here" msgstr "" @@ -32145,166 +31998,166 @@ msgstr "" #. [namespace.udecl] #. #. A using declaration shall not name a template-id. -#: cp/parser.c:12244 +#: cp/parser.c:12334 #, gcc-internal-format msgid "%Ha template-id may not appear in a using-declaration" msgstr "" -#: cp/parser.c:12621 +#: cp/parser.c:12711 #, gcc-internal-format msgid "%Han asm-specification is not allowed on a function-definition" msgstr "" -#: cp/parser.c:12625 +#: cp/parser.c:12715 #, gcc-internal-format msgid "%Hattributes are not allowed on a function-definition" msgstr "" -#: cp/parser.c:12778 +#: cp/parser.c:12868 #, gcc-internal-format msgid "%Hinitializer provided for function" msgstr "" -#: cp/parser.c:12800 +#: cp/parser.c:12890 #, gcc-internal-format msgid "attributes after parenthesized initializer ignored" msgstr "" -#: cp/parser.c:13198 +#: cp/parser.c:13295 #, gcc-internal-format msgid "%Harray bound is not an integer constant" msgstr "" -#: cp/parser.c:13310 +#: cp/parser.c:13407 #, gcc-internal-format msgid "%H%<%T::%E%> is not a type" msgstr "" -#: cp/parser.c:13337 +#: cp/parser.c:13434 #, gcc-internal-format msgid "%Hinvalid use of constructor as a template" msgstr "" -#: cp/parser.c:13339 +#: cp/parser.c:13436 #, gcc-internal-format msgid "" "use %<%T::%D%> instead of %<%T::%D%> to name the constructor in a qualified " "name" msgstr "" -#: cp/parser.c:13512 +#: cp/parser.c:13609 #, gcc-internal-format msgid "%H%qD is a namespace" msgstr "" -#: cp/parser.c:13587 +#: cp/parser.c:13684 #, gcc-internal-format msgid "%Hduplicate cv-qualifier" msgstr "" -#: cp/parser.c:13699 +#: cp/parser.c:13796 #, gcc-internal-format msgid "invalid use of %<auto%>" msgstr "" -#: cp/parser.c:14273 +#: cp/parser.c:14370 #, gcc-internal-format msgid "%Hfile ends in default argument" msgstr "" -#: cp/parser.c:14319 +#: cp/parser.c:14416 #, gcc-internal-format msgid "deprecated use of default argument for parameter of non-function" msgstr "" -#: cp/parser.c:14322 +#: cp/parser.c:14419 #, gcc-internal-format msgid "%Hdefault arguments are only permitted for function parameters" msgstr "" -#: cp/parser.c:14340 +#: cp/parser.c:14437 #, gcc-internal-format msgid "%H%sparameter pack %qD cannot have a default argument" msgstr "" -#: cp/parser.c:14344 +#: cp/parser.c:14441 #, gcc-internal-format msgid "%H%sparameter pack cannot have a default argument" msgstr "" -#: cp/parser.c:14607 +#: cp/parser.c:14704 #, gcc-internal-format msgid "ISO C++ does not allow designated initializers" msgstr "" -#: cp/parser.c:15223 +#: cp/parser.c:15329 #, gcc-internal-format msgid "%Hinvalid class name in declaration of %qD" msgstr "" -#: cp/parser.c:15236 +#: cp/parser.c:15342 #, gcc-internal-format msgid "%Hdeclaration of %qD in namespace %qD which does not enclose %qD" msgstr "" -#: cp/parser.c:15241 +#: cp/parser.c:15347 #, gcc-internal-format msgid "%Hdeclaration of %qD in %qD which does not enclose %qD" msgstr "" -#: cp/parser.c:15255 +#: cp/parser.c:15361 #, gcc-internal-format msgid "%Hextra qualification not allowed" msgstr "" -#: cp/parser.c:15267 +#: cp/parser.c:15373 #, gcc-internal-format msgid "%Han explicit specialization must be preceded by %<template <>%>" msgstr "" -#: cp/parser.c:15296 +#: cp/parser.c:15402 #, gcc-internal-format msgid "%Hfunction template %qD redeclared as a class template" msgstr "" -#: cp/parser.c:15378 +#: cp/parser.c:15484 #, gcc-internal-format msgid "%Hredefinition of %q#T" msgstr "" -#: cp/parser.c:15380 +#: cp/parser.c:15486 #, gcc-internal-format msgid "%Hprevious definition of %q+#T" msgstr "" -#: cp/parser.c:15648 +#: cp/parser.c:15754 #, gcc-internal-format msgid "%Ha class-key must be used when declaring a friend" msgstr "" -#: cp/parser.c:15663 +#: cp/parser.c:15769 #, gcc-internal-format msgid "%Hfriend declaration does not name a class or function" msgstr "" -#: cp/parser.c:15843 +#: cp/parser.c:15949 #, gcc-internal-format msgid "%Hpure-specifier on function-definition" msgstr "" -#: cp/parser.c:16150 +#: cp/parser.c:16262 #, gcc-internal-format msgid "%Hkeyword %<typename%> not allowed outside of templates" msgstr "" -#: cp/parser.c:16153 +#: cp/parser.c:16265 #, gcc-internal-format msgid "" "%Hkeyword %<typename%> not allowed in this context (the base class is " "implicitly a type)" msgstr "" -#: cp/parser.c:17216 +#: cp/parser.c:17332 #, gcc-internal-format msgid "%Htoo few template-parameter-lists" msgstr "" @@ -32313,13 +32166,13 @@ msgstr "" #. something like: #. #. template <class T> template <class U> void S::f(); -#: cp/parser.c:17231 +#: cp/parser.c:17347 #, gcc-internal-format msgid "%Htoo many template-parameter-lists" msgstr "" #. Issue an error message. -#: cp/parser.c:17505 +#: cp/parser.c:17621 #, gcc-internal-format msgid "%Hnamed return values are no longer supported" msgstr "" @@ -32327,303 +32180,303 @@ msgstr "" #. 14.5.2.2 [temp.mem] #. #. A local class shall not have member templates. -#: cp/parser.c:17580 +#: cp/parser.c:17696 #, gcc-internal-format msgid "%Hinvalid declaration of member template in local class" msgstr "" -#: cp/parser.c:17590 +#: cp/parser.c:17706 #, gcc-internal-format msgid "%Htemplate with C linkage" msgstr "" -#: cp/parser.c:17737 +#: cp/parser.c:17853 #, gcc-internal-format msgid "%Htemplate declaration of %qs" msgstr "" -#: cp/parser.c:17801 +#: cp/parser.c:17917 #, gcc-internal-format msgid "%Hexplicit template specialization cannot have a storage class" msgstr "" -#: cp/parser.c:18019 +#: cp/parser.c:18135 #, gcc-internal-format msgid "%H%<>>%> should be %<> >%> within a nested template argument list" msgstr "" -#: cp/parser.c:18032 +#: cp/parser.c:18148 #, gcc-internal-format msgid "%Hspurious %<>>%>, use %<>%> to terminate a template argument list" msgstr "" -#: cp/parser.c:18361 +#: cp/parser.c:18482 #, gcc-internal-format msgid "%Hinvalid use of %qD in linkage specification" msgstr "" -#: cp/parser.c:18374 +#: cp/parser.c:18495 #, gcc-internal-format msgid "%H%<__thread%> before %qD" msgstr "" -#: cp/parser.c:18695 +#: cp/parser.c:18816 #, gcc-internal-format msgid "%qs tag used in naming %q#T" msgstr "" -#: cp/parser.c:18716 +#: cp/parser.c:18837 #, gcc-internal-format msgid "%H%qD redeclared with different access" msgstr "" -#: cp/parser.c:18734 +#: cp/parser.c:18855 #, gcc-internal-format msgid "%H%<template%> (as a disambiguator) is only allowed within templates" msgstr "" -#: cp/parser.c:19000 cp/parser.c:19927 cp/parser.c:20059 +#: cp/parser.c:19121 cp/parser.c:20048 cp/parser.c:20180 #, gcc-internal-format msgid "%Hmisplaced %<@%D%> Objective-C++ construct" msgstr "" -#: cp/parser.c:19144 +#: cp/parser.c:19265 #, gcc-internal-format msgid "%H%<@encode%> must specify a type as an argument" msgstr "" -#: cp/parser.c:19460 +#: cp/parser.c:19581 #, gcc-internal-format msgid "%Hinvalid Objective-C++ selector name" msgstr "" -#: cp/parser.c:19791 +#: cp/parser.c:19912 #, gcc-internal-format msgid "%Hidentifier expected after %<@protocol%>" msgstr "" -#: cp/parser.c:20152 +#: cp/parser.c:20273 #, gcc-internal-format msgid "%Htoo many %qs clauses" msgstr "" -#: cp/parser.c:20266 +#: cp/parser.c:20387 #, gcc-internal-format msgid "%Hcollapse argument needs positive constant integer expression" msgstr "" -#: cp/parser.c:20555 +#: cp/parser.c:20676 #, gcc-internal-format msgid "%Hschedule %<runtime%> does not take a %<chunk_size%> parameter" msgstr "" -#: cp/parser.c:20558 +#: cp/parser.c:20679 #, gcc-internal-format msgid "%Hschedule %<auto%> does not take a %<chunk_size%> parameter" msgstr "" -#: cp/parser.c:20706 +#: cp/parser.c:20827 #, gcc-internal-format msgid "%H%qs is not valid for %qs" msgstr "" -#: cp/parser.c:21130 +#: cp/parser.c:21250 #, gcc-internal-format msgid "parenthesized initialization is not allowed in OpenMP %<for%> loop" msgstr "" -#: cp/parser.c:21242 cp/parser.c:21280 +#: cp/parser.c:21375 cp/parser.c:21413 #, gcc-internal-format msgid "%Hiteration variable %qD should not be firstprivate" msgstr "" -#: cp/parser.c:21284 +#: cp/parser.c:21417 #, gcc-internal-format msgid "%Hiteration variable %qD should not be reduction" msgstr "" -#: cp/parser.c:21360 +#: cp/parser.c:21484 #, gcc-internal-format msgid "%Hnot enough collapsed for loops" msgstr "" -#: cp/parser.c:21406 +#: cp/parser.c:21530 #, gcc-internal-format msgid "%Hcollapsed loops not perfectly nested" msgstr "" -#: cp/parser.c:21817 +#: cp/parser.c:21941 #, gcc-internal-format msgid "%Hjunk at end of %<#pragma GCC pch_preprocess%>" msgstr "" -#: cp/parser.c:21821 +#: cp/parser.c:21945 #, gcc-internal-format msgid "%Hexpected string literal" msgstr "" -#: cp/parser.c:21854 +#: cp/parser.c:21978 #, gcc-internal-format msgid "%H%<#pragma GCC pch_preprocess%> must be first" msgstr "" -#: cp/parser.c:21865 +#: cp/parser.c:21989 #, gcc-internal-format msgid "%H%<#pragma omp barrier%> may only be used in compound statements" msgstr "" -#: cp/parser.c:21880 +#: cp/parser.c:22004 #, gcc-internal-format msgid "%H%<#pragma omp flush%> may only be used in compound statements" msgstr "" -#: cp/parser.c:21895 +#: cp/parser.c:22019 #, gcc-internal-format msgid "%H%<#pragma omp taskwait%> may only be used in compound statements" msgstr "" -#: cp/parser.c:21923 +#: cp/parser.c:22047 #, gcc-internal-format msgid "" "%H%<#pragma omp section%> may only be used in %<#pragma omp sections%> " "construct" msgstr "" -#: cp/parser.c:21981 +#: cp/parser.c:22105 #, gcc-internal-format msgid "inter-module optimizations not implemented for C++" msgstr "" -#: cp/pt.c:252 +#: cp/pt.c:254 #, gcc-internal-format msgid "data member %qD cannot be a member template" msgstr "" -#: cp/pt.c:264 +#: cp/pt.c:266 #, gcc-internal-format msgid "invalid member template declaration %qD" msgstr "" -#: cp/pt.c:611 +#: cp/pt.c:613 #, gcc-internal-format msgid "explicit specialization in non-namespace scope %qD" msgstr "" -#: cp/pt.c:625 +#: cp/pt.c:627 #, gcc-internal-format msgid "enclosing class templates are not explicitly specialized" msgstr "" -#: cp/pt.c:713 +#: cp/pt.c:715 #, gcc-internal-format msgid "specialization of %qD in different namespace" msgstr "" -#: cp/pt.c:714 cp/pt.c:815 +#: cp/pt.c:716 cp/pt.c:817 #, gcc-internal-format msgid " from definition of %q+#D" msgstr "" -#: cp/pt.c:731 +#: cp/pt.c:733 #, gcc-internal-format msgid "" "explicit instantiation of %qD in namespace %qD (which does not enclose " "namespace %qD)" msgstr "" -#: cp/pt.c:749 +#: cp/pt.c:751 #, gcc-internal-format msgid "name of class shadows template template parameter %qD" msgstr "" -#: cp/pt.c:782 +#: cp/pt.c:784 #, gcc-internal-format msgid "specialization of %qT after instantiation" msgstr "" -#: cp/pt.c:814 +#: cp/pt.c:816 #, gcc-internal-format msgid "specializing %q#T in different namespace" msgstr "" -#: cp/pt.c:829 +#: cp/pt.c:831 #, gcc-internal-format msgid "specialization %qT after instantiation %qT" msgstr "" -#: cp/pt.c:842 +#: cp/pt.c:844 #, gcc-internal-format msgid "explicit specialization of non-template %qT" msgstr "" -#: cp/pt.c:1249 +#: cp/pt.c:1251 #, gcc-internal-format msgid "specialization of %qD after instantiation" msgstr "" -#: cp/pt.c:1471 +#: cp/pt.c:1473 #, gcc-internal-format msgid "%qD is not a function template" msgstr "" -#: cp/pt.c:1680 +#: cp/pt.c:1682 #, gcc-internal-format msgid "template-id %qD for %q+D does not match any template declaration" msgstr "" -#: cp/pt.c:1688 +#: cp/pt.c:1690 #, gcc-internal-format msgid "ambiguous template specialization %qD for %q+D" msgstr "" #. This case handles bogus declarations like template <> #. template <class T> void f<int>(); -#: cp/pt.c:1923 cp/pt.c:1977 +#: cp/pt.c:1925 cp/pt.c:1979 #, gcc-internal-format msgid "template-id %qD in declaration of primary template" msgstr "" -#: cp/pt.c:1936 +#: cp/pt.c:1938 #, gcc-internal-format msgid "template parameter list used in explicit instantiation" msgstr "" -#: cp/pt.c:1942 +#: cp/pt.c:1944 #, gcc-internal-format msgid "definition provided for explicit instantiation" msgstr "" -#: cp/pt.c:1950 +#: cp/pt.c:1952 #, gcc-internal-format msgid "too many template parameter lists in declaration of %qD" msgstr "" -#: cp/pt.c:1953 +#: cp/pt.c:1955 #, gcc-internal-format msgid "too few template parameter lists in declaration of %qD" msgstr "" -#: cp/pt.c:1955 +#: cp/pt.c:1957 #, gcc-internal-format msgid "explicit specialization of %qD must be introduced by %<template <>%>" msgstr "" -#: cp/pt.c:1974 +#: cp/pt.c:1976 #, gcc-internal-format msgid "function template partial specialization %qD is not allowed" msgstr "" -#: cp/pt.c:2006 +#: cp/pt.c:2008 #, gcc-internal-format msgid "default argument specified in explicit specialization" msgstr "" -#: cp/pt.c:2036 +#: cp/pt.c:2038 #, gcc-internal-format msgid "%qD is not a template function" msgstr "" -#: cp/pt.c:2044 +#: cp/pt.c:2046 #, gcc-internal-format msgid "%qD is not declared in %qD" msgstr "" @@ -32636,104 +32489,104 @@ msgstr "" #. program is ill-formed. #. #. Similar language is found in [temp.explicit]. -#: cp/pt.c:2106 +#: cp/pt.c:2108 #, gcc-internal-format msgid "specialization of implicitly-declared special member function" msgstr "" -#: cp/pt.c:2150 +#: cp/pt.c:2152 #, gcc-internal-format msgid "no member function %qD declared in %qT" msgstr "" -#: cp/pt.c:2627 +#: cp/pt.c:2633 #, gcc-internal-format msgid "base initializer expansion %<%T%> contains no parameter packs" msgstr "" -#: cp/pt.c:2686 +#: cp/pt.c:2692 #, gcc-internal-format msgid "expansion pattern %<%T%> contains no argument packs" msgstr "" -#: cp/pt.c:2688 +#: cp/pt.c:2694 #, gcc-internal-format msgid "expansion pattern %<%E%> contains no argument packs" msgstr "" -#: cp/pt.c:2729 +#: cp/pt.c:2735 #, gcc-internal-format msgid "parameter packs not expanded with %<...%>:" msgstr "" -#: cp/pt.c:2744 cp/pt.c:3365 +#: cp/pt.c:2750 cp/pt.c:3371 #, gcc-internal-format msgid " %qD" msgstr "" -#: cp/pt.c:2746 +#: cp/pt.c:2752 #, gcc-internal-format msgid " <anonymous>" msgstr "" -#: cp/pt.c:2854 +#: cp/pt.c:2860 #, gcc-internal-format msgid "declaration of %q+#D" msgstr "" -#: cp/pt.c:2855 +#: cp/pt.c:2861 #, gcc-internal-format msgid " shadows template parm %q+#D" msgstr "" -#: cp/pt.c:3361 +#: cp/pt.c:3367 #, gcc-internal-format msgid "template parameters not used in partial specialization:" msgstr "" -#: cp/pt.c:3376 +#: cp/pt.c:3382 #, gcc-internal-format msgid "partial specialization %qT does not specialize any template arguments" msgstr "" -#: cp/pt.c:3421 +#: cp/pt.c:3427 #, gcc-internal-format msgid "" "parameter pack argument %qE must be at the end of the template argument list" msgstr "" -#: cp/pt.c:3423 +#: cp/pt.c:3429 #, gcc-internal-format msgid "" "parameter pack argument %qT must be at the end of the template argument list" msgstr "" -#: cp/pt.c:3444 +#: cp/pt.c:3450 #, gcc-internal-format msgid "template argument %qE involves template parameter(s)" msgstr "" -#: cp/pt.c:3488 +#: cp/pt.c:3494 #, gcc-internal-format msgid "type %qT of template argument %qE depends on template parameter(s)" msgstr "" -#: cp/pt.c:3595 +#: cp/pt.c:3602 #, gcc-internal-format msgid "no default argument for %qD" msgstr "" -#: cp/pt.c:3613 +#: cp/pt.c:3623 #, gcc-internal-format msgid "parameter pack %qE must be at the end of the template parameter list" msgstr "" -#: cp/pt.c:3616 +#: cp/pt.c:3626 #, gcc-internal-format msgid "parameter pack %qT must be at the end of the template parameter list" msgstr "" -#: cp/pt.c:3804 +#: cp/pt.c:3814 #, gcc-internal-format msgid "template class without a name" msgstr "" @@ -32741,7 +32594,7 @@ msgstr "" #. [temp.mem] #. #. A destructor shall not be a member template. -#: cp/pt.c:3814 +#: cp/pt.c:3824 #, gcc-internal-format msgid "destructor %qD declared as member template" msgstr "" @@ -32751,72 +32604,72 @@ msgstr "" #. An allocation function can be a function #. template. ... Template allocation functions shall #. have two or more parameters. -#: cp/pt.c:3829 +#: cp/pt.c:3839 #, gcc-internal-format msgid "invalid template declaration of %qD" msgstr "" -#: cp/pt.c:3946 +#: cp/pt.c:3956 #, gcc-internal-format msgid "template definition of non-template %q#D" msgstr "" -#: cp/pt.c:3989 +#: cp/pt.c:3999 #, gcc-internal-format msgid "expected %d levels of template parms for %q#D, got %d" msgstr "" -#: cp/pt.c:4001 +#: cp/pt.c:4011 #, gcc-internal-format msgid "got %d template parameters for %q#D" msgstr "" -#: cp/pt.c:4004 +#: cp/pt.c:4014 #, gcc-internal-format msgid "got %d template parameters for %q#T" msgstr "" -#: cp/pt.c:4006 +#: cp/pt.c:4016 #, gcc-internal-format msgid " but %d required" msgstr "" -#: cp/pt.c:4024 +#: cp/pt.c:4034 #, gcc-internal-format msgid "template arguments to %qD do not match original template %qD" msgstr "" -#: cp/pt.c:4028 +#: cp/pt.c:4038 #, gcc-internal-format msgid "use template<> for an explicit specialization" msgstr "" -#: cp/pt.c:4124 +#: cp/pt.c:4134 #, gcc-internal-format msgid "%qT is not a template type" msgstr "" -#: cp/pt.c:4137 +#: cp/pt.c:4147 #, gcc-internal-format msgid "template specifiers not specified in declaration of %qD" msgstr "" -#: cp/pt.c:4147 +#: cp/pt.c:4157 #, gcc-internal-format msgid "redeclared with %d template parameter(s)" msgstr "" -#: cp/pt.c:4149 +#: cp/pt.c:4159 #, gcc-internal-format msgid "previous declaration %q+D used %d template parameter(s)" msgstr "" -#: cp/pt.c:4183 +#: cp/pt.c:4193 #, gcc-internal-format msgid "template parameter %q+#D" msgstr "" -#: cp/pt.c:4184 +#: cp/pt.c:4194 #, gcc-internal-format msgid "redeclared here as %q#D" msgstr "" @@ -32825,203 +32678,220 @@ msgstr "" #. #. A template-parameter may not be given default arguments #. by two different declarations in the same scope. -#: cp/pt.c:4194 +#: cp/pt.c:4204 #, gcc-internal-format msgid "redefinition of default argument for %q#D" msgstr "" -#: cp/pt.c:4195 +#: cp/pt.c:4205 #, gcc-internal-format msgid "%Joriginal definition appeared here" msgstr "" -#: cp/pt.c:4299 +#: cp/pt.c:4309 #, gcc-internal-format msgid "" "%qE is not a valid template argument for type %qT because function %qD has " "not external linkage" msgstr "" -#: cp/pt.c:4340 +#: cp/pt.c:4350 #, gcc-internal-format msgid "" "%qE is not a valid template argument for type %qT because string literals " "can never be used in this context" msgstr "" -#: cp/pt.c:4417 +#: cp/pt.c:4427 #, gcc-internal-format msgid "" "%qE is not a valid template argument for type %qT because it is a non-" "constant expression" msgstr "" -#: cp/pt.c:4461 +#: cp/pt.c:4471 #, gcc-internal-format msgid "" "%qD is not a valid template argument because %qD is a variable, not the " "address of a variable" msgstr "" -#: cp/pt.c:4479 +#: cp/pt.c:4489 #, gcc-internal-format msgid "" "%qE is not a valid template argument of type %qT because %qE is not a " "variable" msgstr "" -#: cp/pt.c:4486 +#: cp/pt.c:4496 #, gcc-internal-format msgid "" "%qE is not a valid template argument of type %qT because %qD does not have " "external linkage" msgstr "" -#: cp/pt.c:4516 +#: cp/pt.c:4526 #, gcc-internal-format msgid "" "%qE is not a valid template argument for type %qT because of conflicts in cv-" "qualification" msgstr "" -#: cp/pt.c:4523 +#: cp/pt.c:4533 #, gcc-internal-format msgid "" "%qE is not a valid template argument for type %qT because it is not an lvalue" msgstr "" -#: cp/pt.c:4536 +#: cp/pt.c:4546 #, gcc-internal-format msgid "" "%qE is not a valid template argument for type %qT because object %qD has not " "external linkage" msgstr "" -#: cp/pt.c:4576 +#: cp/pt.c:4578 +#, gcc-internal-format +msgid "%qE is not a valid template argument for type %qT" +msgstr "" + +#: cp/pt.c:4579 +#, gcc-internal-format +msgid "it must be the address of a function with external linkage" +msgstr "" + +#: cp/pt.c:4593 #, gcc-internal-format msgid "" "%qE is not a valid template argument for type %qT because it is a pointer" msgstr "" -#: cp/pt.c:4578 +#: cp/pt.c:4595 #, gcc-internal-format msgid "try using %qE instead" msgstr "" -#: cp/pt.c:4613 +#: cp/pt.c:4630 #, gcc-internal-format msgid "" "%qE is not a valid template argument for type %qT because it is of type %qT" msgstr "" -#: cp/pt.c:4616 +#: cp/pt.c:4633 #, gcc-internal-format msgid "standard conversions are not allowed in this context" msgstr "" -#: cp/pt.c:4950 +#: cp/pt.c:4970 #, gcc-internal-format msgid "to refer to a type member of a template parameter, use %<typename %E%>" msgstr "" -#: cp/pt.c:4966 cp/pt.c:4985 cp/pt.c:5035 +#: cp/pt.c:4986 cp/pt.c:5005 cp/pt.c:5055 #, gcc-internal-format msgid "type/value mismatch at argument %d in template parameter list for %qD" msgstr "" -#: cp/pt.c:4970 +#: cp/pt.c:4990 #, gcc-internal-format msgid " expected a constant of type %qT, got %qT" msgstr "" -#: cp/pt.c:4974 +#: cp/pt.c:4994 #, gcc-internal-format msgid " expected a class template, got %qE" msgstr "" -#: cp/pt.c:4976 +#: cp/pt.c:4996 #, gcc-internal-format msgid " expected a type, got %qE" msgstr "" -#: cp/pt.c:4989 +#: cp/pt.c:5009 #, gcc-internal-format msgid " expected a type, got %qT" msgstr "" -#: cp/pt.c:4991 +#: cp/pt.c:5011 #, gcc-internal-format msgid " expected a class template, got %qT" msgstr "" -#: cp/pt.c:5038 +#: cp/pt.c:5058 #, gcc-internal-format msgid " expected a template of type %qD, got %qD" msgstr "" -#: cp/pt.c:5081 +#. Not sure if this is reachable, but it doesn't hurt +#. to be robust. +#: cp/pt.c:5091 +#, gcc-internal-format +msgid "type mismatch in nontype parameter pack" +msgstr "" + +#: cp/pt.c:5113 #, gcc-internal-format msgid "could not convert template argument %qE to %qT" msgstr "" -#: cp/pt.c:5137 +#: cp/pt.c:5169 #, gcc-internal-format msgid "wrong number of template arguments (%d, should be %d)" msgstr "" -#: cp/pt.c:5269 +#: cp/pt.c:5306 #, gcc-internal-format msgid "wrong number of template arguments (%d, should be %d%s)" msgstr "" -#: cp/pt.c:5273 +#: cp/pt.c:5310 #, gcc-internal-format msgid "provided for %q+D" msgstr "" -#: cp/pt.c:5332 +#: cp/pt.c:5375 #, gcc-internal-format msgid "cannot expand %<%E%> into a fixed-length argument list" msgstr "" -#: cp/pt.c:5335 +#: cp/pt.c:5378 #, gcc-internal-format msgid "cannot expand %<%T%> into a fixed-length argument list" msgstr "" -#: cp/pt.c:5351 +#: cp/pt.c:5394 #, gcc-internal-format msgid "template argument %d is invalid" msgstr "" -#: cp/pt.c:5611 +#: cp/pt.c:5671 #, gcc-internal-format msgid "non-template type %qT used as a template" msgstr "" -#: cp/pt.c:5613 +#: cp/pt.c:5673 #, gcc-internal-format msgid "for template declaration %q+D" msgstr "" -#: cp/pt.c:6315 +#: cp/pt.c:6375 #, gcc-internal-format msgid "" "template instantiation depth exceeds maximum of %d (use -ftemplate-depth-NN " "to increase the maximum) instantiating %qD" msgstr "" -#: cp/pt.c:7445 +#: cp/pt.c:7572 #, gcc-internal-format msgid "mismatched argument pack lengths while expanding %<%T%>" msgstr "" -#: cp/pt.c:7449 +#: cp/pt.c:7576 #, gcc-internal-format msgid "mismatched argument pack lengths while expanding %<%E%>" msgstr "" -#: cp/pt.c:8404 +#: cp/pt.c:8548 #, gcc-internal-format msgid "instantiation of %q+D as type %qT" msgstr "" @@ -33039,241 +32909,241 @@ msgstr "" #. #. is an attempt to declare a variable with function #. type. -#: cp/pt.c:8539 +#: cp/pt.c:8688 #, gcc-internal-format msgid "variable %qD has function type" msgstr "" -#: cp/pt.c:8686 +#: cp/pt.c:8835 #, gcc-internal-format msgid "invalid parameter type %qT" msgstr "" -#: cp/pt.c:8688 +#: cp/pt.c:8837 #, gcc-internal-format msgid "in declaration %q+D" msgstr "" -#: cp/pt.c:8765 +#: cp/pt.c:8914 #, gcc-internal-format msgid "function returning an array" msgstr "" -#: cp/pt.c:8767 +#: cp/pt.c:8916 #, gcc-internal-format msgid "function returning a function" msgstr "" -#: cp/pt.c:8794 +#: cp/pt.c:8943 #, gcc-internal-format msgid "creating pointer to member function of non-class type %qT" msgstr "" -#: cp/pt.c:9001 +#: cp/pt.c:9164 #, gcc-internal-format msgid "array bound is not an integer constant" msgstr "" -#: cp/pt.c:9021 +#: cp/pt.c:9184 #, gcc-internal-format msgid "creating array with negative size (%qE)" msgstr "" -#: cp/pt.c:9270 +#: cp/pt.c:9433 #, gcc-internal-format msgid "forming reference to void" msgstr "" -#: cp/pt.c:9272 +#: cp/pt.c:9435 #, gcc-internal-format msgid "forming %s to reference type %qT" msgstr "" -#: cp/pt.c:9323 +#: cp/pt.c:9486 #, gcc-internal-format msgid "creating pointer to member of non-class type %qT" msgstr "" -#: cp/pt.c:9329 +#: cp/pt.c:9492 #, gcc-internal-format msgid "creating pointer to member reference type %qT" msgstr "" -#: cp/pt.c:9335 +#: cp/pt.c:9498 #, gcc-internal-format msgid "creating pointer to member of type void" msgstr "" -#: cp/pt.c:9402 +#: cp/pt.c:9565 #, gcc-internal-format msgid "creating array of %qT" msgstr "" -#: cp/pt.c:9408 +#: cp/pt.c:9571 #, gcc-internal-format msgid "creating array of %qT, which is an abstract class type" msgstr "" -#: cp/pt.c:9459 +#: cp/pt.c:9622 #, gcc-internal-format msgid "%qT is not a class, struct, or union type" msgstr "" -#: cp/pt.c:9494 +#: cp/pt.c:9657 #, gcc-internal-format msgid "%qT resolves to %qT, which is not an enumeration type" msgstr "" -#: cp/pt.c:9497 +#: cp/pt.c:9660 #, gcc-internal-format msgid "%qT resolves to %qT, which is is not a class type" msgstr "" -#: cp/pt.c:9603 +#: cp/pt.c:9766 #, gcc-internal-format msgid "use of %qs in template" msgstr "" -#: cp/pt.c:9740 +#: cp/pt.c:9903 #, gcc-internal-format msgid "" "dependent-name %qE is parsed as a non-type, but instantiation yields a type" msgstr "" -#: cp/pt.c:9742 +#: cp/pt.c:9905 #, gcc-internal-format msgid "say %<typename %E%> if a type is meant" msgstr "" -#: cp/pt.c:9886 +#: cp/pt.c:10047 #, gcc-internal-format msgid "using invalid field %qD" msgstr "" -#: cp/pt.c:10216 cp/pt.c:10870 +#: cp/pt.c:10377 cp/pt.c:11040 #, gcc-internal-format msgid "invalid use of pack expansion expression" msgstr "" -#: cp/pt.c:10220 cp/pt.c:10874 +#: cp/pt.c:10381 cp/pt.c:11044 #, gcc-internal-format msgid "use %<...%> to expand argument pack" msgstr "" -#: cp/pt.c:10365 +#: cp/pt.c:10536 #, gcc-internal-format msgid "iteration variable %qD should not be reduction" msgstr "" -#: cp/pt.c:11034 +#: cp/pt.c:11204 #, gcc-internal-format msgid "" "a cast to a type other than an integral or enumeration type cannot appear in " "a constant-expression" msgstr "" -#: cp/pt.c:11507 +#: cp/pt.c:11671 #, gcc-internal-format msgid "%qT is not a class or namespace" msgstr "" -#: cp/pt.c:11510 +#: cp/pt.c:11674 #, gcc-internal-format msgid "%qD is not a class or namespace" msgstr "" -#: cp/pt.c:11724 +#: cp/pt.c:11894 #, gcc-internal-format msgid "%qT is/uses anonymous type" msgstr "" -#: cp/pt.c:11726 +#: cp/pt.c:11896 #, gcc-internal-format msgid "template argument for %qD uses local type %qT" msgstr "" -#: cp/pt.c:11736 +#: cp/pt.c:11906 #, gcc-internal-format msgid "%qT is a variably modified type" msgstr "" -#: cp/pt.c:11747 +#: cp/pt.c:11917 #, gcc-internal-format msgid "integral expression %qE is not constant" msgstr "" -#: cp/pt.c:11752 +#: cp/pt.c:11935 #, gcc-internal-format msgid " trying to instantiate %qD" msgstr "" -#: cp/pt.c:14531 +#: cp/pt.c:14723 #, gcc-internal-format msgid "ambiguous class template instantiation for %q#T" msgstr "" -#: cp/pt.c:14534 +#: cp/pt.c:14726 #, gcc-internal-format msgid "%s %+#T" msgstr "" -#: cp/pt.c:14557 cp/pt.c:14640 +#: cp/pt.c:14749 cp/pt.c:14832 #, gcc-internal-format msgid "explicit instantiation of non-template %q#D" msgstr "" -#: cp/pt.c:14572 +#: cp/pt.c:14764 #, gcc-internal-format msgid "%qD is not a static data member of a class template" msgstr "" -#: cp/pt.c:14578 cp/pt.c:14635 +#: cp/pt.c:14770 cp/pt.c:14827 #, gcc-internal-format msgid "no matching template for %qD found" msgstr "" -#: cp/pt.c:14583 +#: cp/pt.c:14775 #, gcc-internal-format msgid "" "type %qT for explicit instantiation %qD does not match declared type %qT" msgstr "" -#: cp/pt.c:14591 +#: cp/pt.c:14783 #, gcc-internal-format msgid "explicit instantiation of %q#D" msgstr "" -#: cp/pt.c:14627 +#: cp/pt.c:14819 #, gcc-internal-format msgid "duplicate explicit instantiation of %q#D" msgstr "" -#: cp/pt.c:14650 cp/pt.c:14742 +#: cp/pt.c:14842 cp/pt.c:14934 #, gcc-internal-format msgid "ISO C++ 1998 forbids the use of %<extern%> on explicit instantiations" msgstr "" -#: cp/pt.c:14655 cp/pt.c:14759 +#: cp/pt.c:14847 cp/pt.c:14951 #, gcc-internal-format msgid "storage class %qD applied to template instantiation" msgstr "" -#: cp/pt.c:14720 +#: cp/pt.c:14912 #, gcc-internal-format msgid "explicit instantiation of non-template type %qT" msgstr "" -#: cp/pt.c:14729 +#: cp/pt.c:14921 #, gcc-internal-format msgid "explicit instantiation of %q#T before definition of template" msgstr "" -#: cp/pt.c:14747 +#: cp/pt.c:14939 #, gcc-internal-format msgid "ISO C++ forbids the use of %qE on explicit instantiations" msgstr "" -#: cp/pt.c:14793 +#: cp/pt.c:14985 #, gcc-internal-format msgid "duplicate explicit instantiation of %q#T" msgstr "" @@ -33285,12 +33155,12 @@ msgstr "" #. member function or static data member of a class template #. shall be present in every translation unit in which it is #. explicitly instantiated. -#: cp/pt.c:15237 +#: cp/pt.c:15435 #, gcc-internal-format msgid "explicit instantiation of %qD but no definition available" msgstr "" -#: cp/pt.c:15428 +#: cp/pt.c:15601 #, gcc-internal-format msgid "" "template instantiation depth exceeds maximum of %d instantiating %q+D, " @@ -33298,19 +33168,19 @@ msgid "" "the maximum)" msgstr "" -#: cp/pt.c:15783 +#: cp/pt.c:15956 #, gcc-internal-format msgid "%q#T is not a valid type for a template constant parameter" msgstr "" -#: cp/pt.c:16749 +#: cp/pt.c:16932 #, gcc-internal-format msgid "" "deducing auto from brace-enclosed initializer list requires #include " "<initializer_list>" msgstr "" -#: cp/pt.c:16790 +#: cp/pt.c:16973 #, gcc-internal-format msgid "unable to deduce %qT from %qE" msgstr "" @@ -33372,415 +33242,415 @@ msgstr "" msgid "%qT is an inaccessible base of %qT" msgstr "" -#: cp/search.c:1869 +#: cp/search.c:1862 #, gcc-internal-format msgid "deprecated covariant return type for %q+#D" msgstr "" -#: cp/search.c:1871 cp/search.c:1886 cp/search.c:1891 cp/search.c:1910 +#: cp/search.c:1864 cp/search.c:1879 cp/search.c:1884 cp/search.c:1903 #, gcc-internal-format msgid " overriding %q+#D" msgstr "" -#: cp/search.c:1885 +#: cp/search.c:1878 #, gcc-internal-format msgid "invalid covariant return type for %q+#D" msgstr "" -#: cp/search.c:1890 +#: cp/search.c:1883 #, gcc-internal-format msgid "conflicting return type specified for %q+#D" msgstr "" -#: cp/search.c:1900 +#: cp/search.c:1893 #, gcc-internal-format msgid "looser throw specifier for %q+#F" msgstr "" -#: cp/search.c:1901 +#: cp/search.c:1894 #, gcc-internal-format msgid " overriding %q+#F" msgstr "" -#: cp/search.c:1909 +#: cp/search.c:1902 #, gcc-internal-format msgid "conflicting type attributes specified for %q+#D" msgstr "" -#: cp/search.c:1920 +#: cp/search.c:1913 #, gcc-internal-format msgid "overriding non-deleted function %q+D" msgstr "" -#: cp/search.c:1924 +#: cp/search.c:1917 #, gcc-internal-format msgid "non-deleted function %q+D" msgstr "" -#: cp/search.c:1925 +#: cp/search.c:1918 #, gcc-internal-format msgid "overriding deleted function %q+D" msgstr "" #. A static member function cannot match an inherited #. virtual member function. -#: cp/search.c:2017 +#: cp/search.c:2010 #, gcc-internal-format msgid "%q+#D cannot be declared" msgstr "" -#: cp/search.c:2018 +#: cp/search.c:2011 #, gcc-internal-format msgid " since %q+#D declared in base class" msgstr "" -#: cp/semantics.c:756 +#: cp/semantics.c:761 #, gcc-internal-format msgid "suggest explicit braces around empty body in %<do%> statement" msgstr "" -#: cp/semantics.c:1294 +#: cp/semantics.c:1285 #, gcc-internal-format msgid "type of asm operand %qE could not be determined" msgstr "" -#: cp/semantics.c:1350 +#: cp/semantics.c:1341 #, gcc-internal-format msgid "__label__ declarations are only allowed in function scopes" msgstr "" -#: cp/semantics.c:1438 +#: cp/semantics.c:1429 #, gcc-internal-format msgid "invalid use of member %q+D in static member function" msgstr "" -#: cp/semantics.c:1440 +#: cp/semantics.c:1431 #, gcc-internal-format msgid "invalid use of non-static data member %q+D" msgstr "" -#: cp/semantics.c:1441 cp/semantics.c:1480 +#: cp/semantics.c:1432 cp/semantics.c:1471 #, gcc-internal-format msgid "from this location" msgstr "" -#: cp/semantics.c:1479 +#: cp/semantics.c:1470 #, gcc-internal-format msgid "object missing in reference to %q+D" msgstr "" -#: cp/semantics.c:1958 +#: cp/semantics.c:1964 #, gcc-internal-format msgid "arguments to destructor are not allowed" msgstr "" -#: cp/semantics.c:2010 +#: cp/semantics.c:2016 #, gcc-internal-format msgid "%<this%> is unavailable for static member functions" msgstr "" -#: cp/semantics.c:2016 +#: cp/semantics.c:2022 #, gcc-internal-format msgid "invalid use of %<this%> in non-member function" msgstr "" -#: cp/semantics.c:2018 +#: cp/semantics.c:2024 #, gcc-internal-format msgid "invalid use of %<this%> at top level" msgstr "" -#: cp/semantics.c:2042 +#: cp/semantics.c:2048 #, gcc-internal-format msgid "invalid qualifying scope in pseudo-destructor name" msgstr "" -#: cp/semantics.c:2047 cp/typeck.c:2116 +#: cp/semantics.c:2053 cp/typeck.c:2130 #, gcc-internal-format msgid "qualified type %qT does not match destructor name ~%qT" msgstr "" -#: cp/semantics.c:2069 +#: cp/semantics.c:2075 #, gcc-internal-format msgid "%qE is not of type %qT" msgstr "" -#: cp/semantics.c:2113 +#: cp/semantics.c:2119 #, gcc-internal-format msgid "compound literal of non-object type %qT" msgstr "" -#: cp/semantics.c:2197 +#: cp/semantics.c:2203 #, gcc-internal-format msgid "template type parameters must use the keyword %<class%> or %<typename%>" msgstr "" -#: cp/semantics.c:2238 +#: cp/semantics.c:2244 #, gcc-internal-format msgid "" "invalid use of type %qT as a default value for a template template-parameter" msgstr "" -#: cp/semantics.c:2241 +#: cp/semantics.c:2247 #, gcc-internal-format msgid "invalid default argument for a template template parameter" msgstr "" -#: cp/semantics.c:2258 +#: cp/semantics.c:2264 #, gcc-internal-format msgid "definition of %q#T inside template parameter list" msgstr "" -#: cp/semantics.c:2269 +#: cp/semantics.c:2275 #, gcc-internal-format msgid "invalid definition of qualified type %qT" msgstr "" -#: cp/semantics.c:2485 +#: cp/semantics.c:2491 #, gcc-internal-format msgid "invalid base-class specification" msgstr "" -#: cp/semantics.c:2497 +#: cp/semantics.c:2503 #, gcc-internal-format msgid "base class %qT has cv qualifiers" msgstr "" -#: cp/semantics.c:2522 +#: cp/semantics.c:2528 #, gcc-internal-format msgid "%Hincomplete type %qT used in nested name specifier" msgstr "" -#: cp/semantics.c:2526 +#: cp/semantics.c:2532 #, gcc-internal-format msgid "%Hreference to %<%T::%D%> is ambiguous" msgstr "" -#: cp/semantics.c:2530 +#: cp/semantics.c:2536 #, gcc-internal-format msgid "%H%qD is not a member of %qT" msgstr "" -#: cp/semantics.c:2533 +#: cp/semantics.c:2539 #, gcc-internal-format msgid "%H%qD is not a member of %qD" msgstr "" -#: cp/semantics.c:2535 +#: cp/semantics.c:2541 #, gcc-internal-format msgid "%H%<::%D%> has not been declared" msgstr "" -#: cp/semantics.c:2676 +#: cp/semantics.c:2682 #, gcc-internal-format msgid "use of %<auto%> variable from containing function" msgstr "" -#: cp/semantics.c:2678 +#: cp/semantics.c:2684 #, gcc-internal-format msgid " %q+#D declared here" msgstr "" -#: cp/semantics.c:2716 +#: cp/semantics.c:2722 #, gcc-internal-format msgid "" "template parameter %qD of type %qT is not allowed in an integral constant " "expression because it is not of integral or enumeration type" msgstr "" -#: cp/semantics.c:2885 +#: cp/semantics.c:2891 #, gcc-internal-format msgid "%qD cannot appear in a constant-expression" msgstr "" -#: cp/semantics.c:2893 +#: cp/semantics.c:2899 #, gcc-internal-format msgid "use of namespace %qD as expression" msgstr "" -#: cp/semantics.c:2898 +#: cp/semantics.c:2904 #, gcc-internal-format msgid "use of class template %qT as expression" msgstr "" #. Ambiguous reference to base members. -#: cp/semantics.c:2904 +#: cp/semantics.c:2910 #, gcc-internal-format msgid "request for member %qD is ambiguous in multiple inheritance lattice" msgstr "" -#: cp/semantics.c:3026 cp/semantics.c:4633 +#: cp/semantics.c:3032 cp/semantics.c:4762 #, gcc-internal-format msgid "type of %qE is unknown" msgstr "" -#: cp/semantics.c:3041 +#: cp/semantics.c:3047 #, gcc-internal-format msgid "cannot apply %<offsetof%> to destructor %<~%T%>" msgstr "" -#: cp/semantics.c:3052 +#: cp/semantics.c:3058 #, gcc-internal-format msgid "cannot apply %<offsetof%> to member function %qD" msgstr "" -#: cp/semantics.c:3488 +#: cp/semantics.c:3503 #, gcc-internal-format msgid "%qD is not a variable in clause %qs" msgstr "" -#: cp/semantics.c:3497 cp/semantics.c:3519 cp/semantics.c:3541 +#: cp/semantics.c:3512 cp/semantics.c:3534 cp/semantics.c:3556 #, gcc-internal-format msgid "%qD appears more than once in data clauses" msgstr "" -#: cp/semantics.c:3511 +#: cp/semantics.c:3526 #, gcc-internal-format msgid "%qD is not a variable in clause %<firstprivate%>" msgstr "" -#: cp/semantics.c:3533 +#: cp/semantics.c:3548 #, gcc-internal-format msgid "%qD is not a variable in clause %<lastprivate%>" msgstr "" -#: cp/semantics.c:3563 +#: cp/semantics.c:3578 #, gcc-internal-format msgid "num_threads expression must be integral" msgstr "" -#: cp/semantics.c:3577 +#: cp/semantics.c:3592 #, gcc-internal-format msgid "schedule chunk size expression must be integral" msgstr "" -#: cp/semantics.c:3709 +#: cp/semantics.c:3724 #, gcc-internal-format msgid "%qE has reference type for %qs" msgstr "" -#: cp/semantics.c:3780 +#: cp/semantics.c:3795 #, gcc-internal-format msgid "%<threadprivate%> %qD is not file, namespace or block scope variable" msgstr "" -#: cp/semantics.c:3794 +#: cp/semantics.c:3809 #, gcc-internal-format msgid "%<threadprivate%> %qE directive not in %qT definition" msgstr "" -#: cp/semantics.c:3926 +#: cp/semantics.c:3944 #, gcc-internal-format msgid "%Hinvalid controlling predicate" msgstr "" -#: cp/semantics.c:3936 +#: cp/semantics.c:3954 #, gcc-internal-format msgid "%Hdifference between %qE and %qD does not have integer type" msgstr "" -#: cp/semantics.c:4031 +#: cp/semantics.c:4049 #, gcc-internal-format msgid "%Hinvalid increment expression" msgstr "" -#: cp/semantics.c:4157 cp/semantics.c:4228 +#: cp/semantics.c:4175 cp/semantics.c:4246 #, gcc-internal-format msgid "%Hexpected iteration declaration or initialization" msgstr "" -#: cp/semantics.c:4168 +#: cp/semantics.c:4186 #, gcc-internal-format msgid "%Hmissing controlling predicate" msgstr "" -#: cp/semantics.c:4174 +#: cp/semantics.c:4192 #, gcc-internal-format msgid "%Hmissing increment expression" msgstr "" -#: cp/semantics.c:4254 +#: cp/semantics.c:4272 #, gcc-internal-format msgid "%Hinvalid type for iteration variable %qE" msgstr "" #. Report the error. -#: cp/semantics.c:4434 +#: cp/semantics.c:4474 #, gcc-internal-format msgid "static assertion failed: %E" msgstr "" -#: cp/semantics.c:4436 +#: cp/semantics.c:4476 #, gcc-internal-format msgid "non-constant condition for static assertion" msgstr "" -#: cp/semantics.c:4461 cp/semantics.c:4556 +#: cp/semantics.c:4568 cp/semantics.c:4685 #, gcc-internal-format msgid "argument to decltype must be an expression" msgstr "" -#: cp/semantics.c:4507 +#: cp/semantics.c:4635 #, gcc-internal-format msgid "%qE refers to a set of overloaded functions" msgstr "" -#: cp/semantics.c:4589 +#: cp/semantics.c:4718 #, gcc-internal-format msgid "unable to determine the declared type of expression %<%E%>" msgstr "" -#: cp/semantics.c:4802 +#: cp/semantics.c:4949 #, gcc-internal-format msgid "__is_convertible_to" msgstr "" -#: cp/semantics.c:4831 +#: cp/semantics.c:4988 cp/semantics.c:4998 #, gcc-internal-format msgid "incomplete type %qT not allowed" msgstr "" -#: cp/tree.c:863 +#: cp/tree.c:881 #, gcc-internal-format msgid "%qV qualifiers cannot be applied to %qT" msgstr "" -#: cp/tree.c:2184 +#: cp/tree.c:2215 #, gcc-internal-format msgid "%qE attribute can only be applied to Java class definitions" msgstr "" -#: cp/tree.c:2213 +#: cp/tree.c:2244 #, gcc-internal-format msgid "%qE attribute can only be applied to class definitions" msgstr "" -#: cp/tree.c:2219 +#: cp/tree.c:2250 #, gcc-internal-format msgid "%qE is obsolete; g++ vtables are now COM-compatible by default" msgstr "" -#: cp/tree.c:2243 +#: cp/tree.c:2274 #, gcc-internal-format msgid "requested init_priority is not an integer constant" msgstr "" -#: cp/tree.c:2264 +#: cp/tree.c:2295 #, gcc-internal-format msgid "" "can only use %qE attribute on file-scope definitions of objects of class type" msgstr "" -#: cp/tree.c:2272 +#: cp/tree.c:2303 #, gcc-internal-format msgid "requested init_priority is out of range" msgstr "" -#: cp/tree.c:2282 +#: cp/tree.c:2313 #, gcc-internal-format msgid "requested init_priority is reserved for internal use" msgstr "" -#: cp/tree.c:2293 +#: cp/tree.c:2324 #, gcc-internal-format msgid "%qE attribute is not supported on this platform" msgstr "" @@ -33801,250 +33671,255 @@ msgstr "" msgid "%s between distinct pointer-to-member types %qT and %qT lacks a cast" msgstr "" -#: cp/typeck.c:1186 +#: cp/typeck.c:1200 #, gcc-internal-format msgid "canonical types differ for identical types %T and %T" msgstr "" -#: cp/typeck.c:1193 +#: cp/typeck.c:1207 #, gcc-internal-format msgid "same canonical type node for different types %T and %T" msgstr "" -#: cp/typeck.c:1306 +#: cp/typeck.c:1320 #, gcc-internal-format msgid "invalid application of %qs to a member function" msgstr "" -#: cp/typeck.c:1374 +#: cp/typeck.c:1388 #, gcc-internal-format msgid "invalid application of %<sizeof%> to a bit-field" msgstr "" -#: cp/typeck.c:1382 +#: cp/typeck.c:1396 #, gcc-internal-format msgid "ISO C++ forbids applying %<sizeof%> to an expression of function type" msgstr "" -#: cp/typeck.c:1431 +#: cp/typeck.c:1445 #, gcc-internal-format msgid "invalid application of %<__alignof%> to a bit-field" msgstr "" -#: cp/typeck.c:1442 +#: cp/typeck.c:1456 #, gcc-internal-format msgid "" "ISO C++ forbids applying %<__alignof%> to an expression of function type" msgstr "" -#: cp/typeck.c:1500 +#: cp/typeck.c:1514 #, gcc-internal-format msgid "invalid use of non-static member function" msgstr "" -#: cp/typeck.c:1762 +#: cp/typeck.c:1776 #, gcc-internal-format msgid "deprecated conversion from string constant to %qT" msgstr "" -#: cp/typeck.c:1885 cp/typeck.c:2246 +#: cp/typeck.c:1899 cp/typeck.c:2274 #, gcc-internal-format msgid "request for member %qD in %qE, which is of non-class type %qT" msgstr "" -#: cp/typeck.c:1914 +#: cp/typeck.c:1928 #, gcc-internal-format msgid "invalid use of nonstatic data member %qE" msgstr "" -#: cp/typeck.c:1916 +#: cp/typeck.c:1930 #, gcc-internal-format msgid "%qD is not a member of %qT" msgstr "" -#: cp/typeck.c:1969 +#: cp/typeck.c:1983 #, gcc-internal-format msgid "invalid access to non-static data member %qD of NULL object" msgstr "" -#: cp/typeck.c:1972 cp/typeck.c:2003 +#: cp/typeck.c:1986 cp/typeck.c:2017 #, gcc-internal-format msgid "(perhaps the %<offsetof%> macro was used incorrectly)" msgstr "" -#: cp/typeck.c:2000 +#: cp/typeck.c:2014 #, gcc-internal-format msgid "invalid access to non-static data member %qD of NULL object" msgstr "" -#: cp/typeck.c:2090 +#: cp/typeck.c:2104 #, gcc-internal-format msgid "invalid use of %qD" msgstr "" -#: cp/typeck.c:2122 +#: cp/typeck.c:2142 +#, gcc-internal-format +msgid "object type %qT does not match destructor name ~%qT" +msgstr "" + +#: cp/typeck.c:2150 #, gcc-internal-format msgid "the type being destroyed is %qT, but the destructor refers to %qT" msgstr "" -#: cp/typeck.c:2161 cp/typeck.c:2181 +#: cp/typeck.c:2189 cp/typeck.c:2209 #, gcc-internal-format msgid "%qD is not a template" msgstr "" -#: cp/typeck.c:2285 +#: cp/typeck.c:2313 #, gcc-internal-format msgid "%<%D::%D%> is not a member of %qT" msgstr "" -#: cp/typeck.c:2301 +#: cp/typeck.c:2329 #, gcc-internal-format msgid "%qT is not a base of %qT" msgstr "" -#: cp/typeck.c:2321 +#: cp/typeck.c:2349 #, gcc-internal-format msgid "%qD has no member named %qE" msgstr "" -#: cp/typeck.c:2337 +#: cp/typeck.c:2365 #, gcc-internal-format msgid "%qD is not a member template function" msgstr "" -#: cp/typeck.c:2481 +#: cp/typeck.c:2509 #, gcc-internal-format msgid "%qT is not a pointer-to-object type" msgstr "" -#: cp/typeck.c:2509 +#: cp/typeck.c:2537 #, gcc-internal-format msgid "invalid use of %qs on pointer to member" msgstr "" -#: cp/typeck.c:2513 +#: cp/typeck.c:2541 #, gcc-internal-format msgid "invalid type argument of %qs" msgstr "" -#: cp/typeck.c:2515 +#: cp/typeck.c:2543 #, gcc-internal-format msgid "invalid type argument" msgstr "" -#: cp/typeck.c:2542 +#: cp/typeck.c:2570 #, gcc-internal-format msgid "subscript missing in array reference" msgstr "" -#: cp/typeck.c:2622 +#: cp/typeck.c:2650 #, gcc-internal-format msgid "ISO C++ forbids subscripting non-lvalue array" msgstr "" -#: cp/typeck.c:2634 +#: cp/typeck.c:2662 #, gcc-internal-format msgid "subscripting array declared %<register%>" msgstr "" -#: cp/typeck.c:2726 +#: cp/typeck.c:2754 #, gcc-internal-format msgid "object missing in use of %qE" msgstr "" -#: cp/typeck.c:2859 +#: cp/typeck.c:2891 #, gcc-internal-format msgid "ISO C++ forbids calling %<::main%> from within program" msgstr "" -#: cp/typeck.c:2878 +#: cp/typeck.c:2910 #, gcc-internal-format msgid "" "must use %<.*%> or %<->*%> to call pointer-to-member function in %<%E (...)%" ">, e.g. %<(... ->* %E) (...)%>" msgstr "" -#: cp/typeck.c:2893 +#: cp/typeck.c:2925 #, gcc-internal-format msgid "%qE cannot be used as a function" msgstr "" -#: cp/typeck.c:2986 +#: cp/typeck.c:3018 #, gcc-internal-format msgid "too many arguments to %s %q+#D" msgstr "" -#: cp/typeck.c:2988 cp/typeck.c:3101 +#: cp/typeck.c:3020 cp/typeck.c:3133 #, gcc-internal-format msgid "at this point in file" msgstr "" -#: cp/typeck.c:2991 +#: cp/typeck.c:3023 #, gcc-internal-format msgid "too many arguments to function" msgstr "" -#: cp/typeck.c:3026 +#: cp/typeck.c:3058 #, gcc-internal-format msgid "parameter %P of %qD has incomplete type %qT" msgstr "" -#: cp/typeck.c:3029 +#: cp/typeck.c:3061 #, gcc-internal-format msgid "parameter %P has incomplete type %qT" msgstr "" -#: cp/typeck.c:3099 +#: cp/typeck.c:3131 #, gcc-internal-format msgid "too few arguments to %s %q+#D" msgstr "" -#: cp/typeck.c:3104 +#: cp/typeck.c:3136 #, gcc-internal-format msgid "too few arguments to function" msgstr "" -#: cp/typeck.c:3282 cp/typeck.c:3293 +#: cp/typeck.c:3342 cp/typeck.c:3353 #, gcc-internal-format msgid "assuming cast to type %qT from overloaded function" msgstr "" -#: cp/typeck.c:3501 +#: cp/typeck.c:3561 #, gcc-internal-format msgid "left rotate count is negative" msgstr "" -#: cp/typeck.c:3502 +#: cp/typeck.c:3562 #, gcc-internal-format msgid "right rotate count is negative" msgstr "" -#: cp/typeck.c:3508 +#: cp/typeck.c:3568 #, gcc-internal-format msgid "left rotate count >= width of type" msgstr "" -#: cp/typeck.c:3509 +#: cp/typeck.c:3569 #, gcc-internal-format msgid "right rotate count >= width of type" msgstr "" -#: cp/typeck.c:3528 cp/typeck.c:3751 +#: cp/typeck.c:3588 cp/typeck.c:3811 #, gcc-internal-format msgid "comparison with string literal results in unspecified behaviour" msgstr "" -#: cp/typeck.c:3568 cp/typeck.c:3576 cp/typeck.c:3771 cp/typeck.c:3779 +#: cp/typeck.c:3628 cp/typeck.c:3636 cp/typeck.c:3831 cp/typeck.c:3839 #, gcc-internal-format msgid "ISO C++ forbids comparison between pointer and integer" msgstr "" -#: cp/typeck.c:3796 +#: cp/typeck.c:3856 #, gcc-internal-format msgid "unordered comparison on non-floating point argument" msgstr "" -#: cp/typeck.c:3835 +#: cp/typeck.c:3895 #, gcc-internal-format msgid "invalid operands of types %qT and %qT to binary %qO" msgstr "" @@ -34053,173 +33928,173 @@ msgstr "" #. performed. Note that pointer-difference and pointer-addition #. have already been handled above, and so we don't end up here in #. that case. -#: cp/typeck.c:3925 +#: cp/typeck.c:3985 #, gcc-internal-format msgid "NULL used in arithmetic" msgstr "" -#: cp/typeck.c:3992 +#: cp/typeck.c:4052 #, gcc-internal-format msgid "ISO C++ forbids using pointer of type %<void *%> in subtraction" msgstr "" -#: cp/typeck.c:3994 +#: cp/typeck.c:4054 #, gcc-internal-format msgid "ISO C++ forbids using pointer to a function in subtraction" msgstr "" -#: cp/typeck.c:3996 +#: cp/typeck.c:4056 #, gcc-internal-format msgid "ISO C++ forbids using pointer to a method in subtraction" msgstr "" -#: cp/typeck.c:4009 +#: cp/typeck.c:4069 #, gcc-internal-format msgid "invalid use of a pointer to an incomplete type in pointer arithmetic" msgstr "" -#: cp/typeck.c:4069 +#: cp/typeck.c:4129 #, gcc-internal-format msgid "invalid use of %qE to form a pointer-to-member-function" msgstr "" -#: cp/typeck.c:4072 +#: cp/typeck.c:4132 #, gcc-internal-format msgid " a qualified-id is required" msgstr "" -#: cp/typeck.c:4077 +#: cp/typeck.c:4137 #, gcc-internal-format msgid "" "parentheses around %qE cannot be used to form a pointer-to-member-function" msgstr "" -#: cp/typeck.c:4100 +#: cp/typeck.c:4160 #, gcc-internal-format msgid "taking address of temporary" msgstr "" -#: cp/typeck.c:4360 +#: cp/typeck.c:4420 #, gcc-internal-format msgid "ISO C++ forbids incrementing an enum" msgstr "" -#: cp/typeck.c:4361 +#: cp/typeck.c:4421 #, gcc-internal-format msgid "ISO C++ forbids decrementing an enum" msgstr "" -#: cp/typeck.c:4377 +#: cp/typeck.c:4437 #, gcc-internal-format msgid "cannot increment a pointer to incomplete type %qT" msgstr "" -#: cp/typeck.c:4378 +#: cp/typeck.c:4438 #, gcc-internal-format msgid "cannot decrement a pointer to incomplete type %qT" msgstr "" -#: cp/typeck.c:4389 +#: cp/typeck.c:4449 #, gcc-internal-format msgid "ISO C++ forbids incrementing a pointer of type %qT" msgstr "" -#: cp/typeck.c:4390 +#: cp/typeck.c:4450 #, gcc-internal-format msgid "ISO C++ forbids decrementing a pointer of type %qT" msgstr "" -#: cp/typeck.c:4416 +#: cp/typeck.c:4476 #, gcc-internal-format msgid "invalid use of Boolean expression as operand to %<operator--%>" msgstr "" -#: cp/typeck.c:4448 +#: cp/typeck.c:4511 #, gcc-internal-format msgid "ISO C++ forbids taking address of function %<::main%>" msgstr "" #. An expression like &memfn. -#: cp/typeck.c:4509 +#: cp/typeck.c:4572 #, gcc-internal-format msgid "" "ISO C++ forbids taking the address of an unqualified or parenthesized non-" "static member function to form a pointer to member function. Say %<&%T::%D%>" msgstr "" -#: cp/typeck.c:4514 +#: cp/typeck.c:4577 #, gcc-internal-format msgid "" "ISO C++ forbids taking the address of a bound member function to form a " "pointer to member function. Say %<&%T::%D%>" msgstr "" -#: cp/typeck.c:4543 +#: cp/typeck.c:4606 #, gcc-internal-format msgid "ISO C++ forbids taking the address of a cast to a non-lvalue expression" msgstr "" -#: cp/typeck.c:4571 +#: cp/typeck.c:4634 #, gcc-internal-format msgid "cannot create pointer to reference member %qD" msgstr "" -#: cp/typeck.c:4786 +#: cp/typeck.c:4849 #, gcc-internal-format msgid "cannot take the address of %<this%>, which is an rvalue expression" msgstr "" -#: cp/typeck.c:4809 +#: cp/typeck.c:4872 #, gcc-internal-format msgid "address of explicit register variable %qD requested" msgstr "" -#: cp/typeck.c:4814 +#: cp/typeck.c:4877 #, gcc-internal-format msgid "address requested for %qD, which is declared %<register%>" msgstr "" -#: cp/typeck.c:4881 +#: cp/typeck.c:4944 #, gcc-internal-format msgid "%s expression list treated as compound expression" msgstr "" -#: cp/typeck.c:4971 +#: cp/typeck.c:5034 #, gcc-internal-format msgid "cast from type %qT to type %qT casts away constness" msgstr "" -#: cp/typeck.c:4976 +#: cp/typeck.c:5039 #, gcc-internal-format msgid "static_cast from type %qT to type %qT casts away constness" msgstr "" -#: cp/typeck.c:4981 +#: cp/typeck.c:5044 #, gcc-internal-format msgid "reinterpret_cast from type %qT to type %qT casts away constness" msgstr "" -#: cp/typeck.c:5301 +#: cp/typeck.c:5364 #, gcc-internal-format msgid "invalid static_cast from type %qT to type %qT" msgstr "" -#: cp/typeck.c:5324 +#: cp/typeck.c:5387 #, gcc-internal-format msgid "converting from %qT to %qT" msgstr "" -#: cp/typeck.c:5373 +#: cp/typeck.c:5436 #, gcc-internal-format msgid "invalid cast of an rvalue expression of type %qT to type %qT" msgstr "" -#: cp/typeck.c:5435 +#: cp/typeck.c:5498 #, gcc-internal-format msgid "cast from %qT to %qT loses precision" msgstr "" -#: cp/typeck.c:5465 +#: cp/typeck.c:5528 #, gcc-internal-format msgid "cast from %qT to %qT increases required alignment of target type" msgstr "" @@ -34228,160 +34103,160 @@ msgstr "" #. where possible, and it is necessary in some cases. DR 195 #. addresses this issue, but as of 2004/10/26 is still in #. drafting. -#: cp/typeck.c:5484 +#: cp/typeck.c:5547 #, gcc-internal-format msgid "" "ISO C++ forbids casting between pointer-to-function and pointer-to-object" msgstr "" -#: cp/typeck.c:5496 +#: cp/typeck.c:5559 #, gcc-internal-format msgid "invalid cast from type %qT to type %qT" msgstr "" -#: cp/typeck.c:5552 +#: cp/typeck.c:5615 #, gcc-internal-format msgid "" "invalid use of const_cast with type %qT, which is not a pointer, reference, " "nor a pointer-to-data-member type" msgstr "" -#: cp/typeck.c:5561 +#: cp/typeck.c:5624 #, gcc-internal-format msgid "" "invalid use of const_cast with type %qT, which is a pointer or reference to " "a function type" msgstr "" -#: cp/typeck.c:5586 +#: cp/typeck.c:5649 #, gcc-internal-format msgid "invalid const_cast of an rvalue of type %qT to type %qT" msgstr "" -#: cp/typeck.c:5635 +#: cp/typeck.c:5698 #, gcc-internal-format msgid "invalid const_cast from type %qT to type %qT" msgstr "" -#: cp/typeck.c:5712 cp/typeck.c:5720 +#: cp/typeck.c:5775 cp/typeck.c:5783 #, gcc-internal-format msgid "ISO C++ forbids casting to an array type %qT" msgstr "" -#: cp/typeck.c:5729 +#: cp/typeck.c:5792 #, gcc-internal-format msgid "invalid cast to function type %qT" msgstr "" -#: cp/typeck.c:5968 +#: cp/typeck.c:6031 #, gcc-internal-format msgid " in evaluation of %<%Q(%#T, %#T)%>" msgstr "" -#: cp/typeck.c:6019 +#: cp/typeck.c:6082 #, gcc-internal-format msgid "incompatible types in assignment of %qT to %qT" msgstr "" -#: cp/typeck.c:6032 +#: cp/typeck.c:6095 #, gcc-internal-format msgid "array used as initializer" msgstr "" -#: cp/typeck.c:6034 +#: cp/typeck.c:6097 #, gcc-internal-format msgid "invalid array assignment" msgstr "" -#: cp/typeck.c:6132 +#: cp/typeck.c:6195 #, gcc-internal-format msgid " in pointer to member function conversion" msgstr "" -#: cp/typeck.c:6143 +#: cp/typeck.c:6206 #, gcc-internal-format msgid "pointer to member conversion via virtual base %qT" msgstr "" -#: cp/typeck.c:6183 cp/typeck.c:6195 +#: cp/typeck.c:6246 cp/typeck.c:6258 #, gcc-internal-format msgid " in pointer to member conversion" msgstr "" -#: cp/typeck.c:6273 +#: cp/typeck.c:6336 #, gcc-internal-format msgid "invalid conversion to type %qT from type %qT" msgstr "" -#: cp/typeck.c:6544 +#: cp/typeck.c:6607 #, gcc-internal-format msgid "cannot convert %qT to %qT for argument %qP to %qD" msgstr "" -#: cp/typeck.c:6547 +#: cp/typeck.c:6610 #, gcc-internal-format msgid "cannot convert %qT to %qT in %s" msgstr "" -#: cp/typeck.c:6561 +#: cp/typeck.c:6624 #, gcc-internal-format msgid "%s might be a candidate for a format attribute" msgstr "" -#: cp/typeck.c:6650 cp/typeck.c:6652 +#: cp/typeck.c:6713 cp/typeck.c:6715 #, gcc-internal-format msgid "in passing argument %P of %q+D" msgstr "" -#: cp/typeck.c:6702 +#: cp/typeck.c:6765 #, gcc-internal-format msgid "returning reference to temporary" msgstr "" -#: cp/typeck.c:6709 +#: cp/typeck.c:6772 #, gcc-internal-format msgid "reference to non-lvalue returned" msgstr "" -#: cp/typeck.c:6725 +#: cp/typeck.c:6788 #, gcc-internal-format msgid "reference to local variable %q+D returned" msgstr "" -#: cp/typeck.c:6728 +#: cp/typeck.c:6791 #, gcc-internal-format msgid "address of local variable %q+D returned" msgstr "" -#: cp/typeck.c:6763 +#: cp/typeck.c:6826 #, gcc-internal-format msgid "returning a value from a destructor" msgstr "" #. If a return statement appears in a handler of the #. function-try-block of a constructor, the program is ill-formed. -#: cp/typeck.c:6771 +#: cp/typeck.c:6834 #, gcc-internal-format msgid "cannot return from a handler of a function-try-block of a constructor" msgstr "" #. You can't return a value from a constructor. -#: cp/typeck.c:6774 +#: cp/typeck.c:6837 #, gcc-internal-format msgid "returning a value from a constructor" msgstr "" -#: cp/typeck.c:6799 +#: cp/typeck.c:6862 #, gcc-internal-format msgid "return-statement with no value, in function returning %qT" msgstr "" -#: cp/typeck.c:6820 +#: cp/typeck.c:6883 #, gcc-internal-format msgid "return-statement with a value, in function returning 'void'" msgstr "" -#: cp/typeck.c:6850 +#: cp/typeck.c:6913 #, gcc-internal-format msgid "" "%<operator new%> must not return NULL unless it is declared %<throw()%> (or -" @@ -34499,92 +34374,97 @@ msgstr "" msgid "int-array initialized from incompatible wide string" msgstr "" -#: cp/typeck2.c:829 +#: cp/typeck2.c:831 #, gcc-internal-format msgid "cannot initialize aggregate of type %qT with a compound literal" msgstr "" -#: cp/typeck2.c:838 +#: cp/typeck2.c:840 #, gcc-internal-format msgid "array must be initialized with a brace-enclosed initializer" msgstr "" -#: cp/typeck2.c:920 cp/typeck2.c:1028 +#: cp/typeck2.c:922 cp/typeck2.c:1030 #, gcc-internal-format msgid "non-trivial designated initializers not supported" msgstr "" -#: cp/typeck2.c:1052 cp/typeck2.c:1066 +#: cp/typeck2.c:1054 cp/typeck2.c:1068 #, gcc-internal-format msgid "missing initializer for member %qD" msgstr "" -#: cp/typeck2.c:1057 +#: cp/typeck2.c:1059 #, gcc-internal-format msgid "uninitialized const member %qD" msgstr "" -#: cp/typeck2.c:1059 +#: cp/typeck2.c:1061 #, gcc-internal-format msgid "member %qD with uninitialized const fields" msgstr "" -#: cp/typeck2.c:1061 +#: cp/typeck2.c:1063 #, gcc-internal-format msgid "member %qD is uninitialized reference" msgstr "" -#: cp/typeck2.c:1119 +#: cp/typeck2.c:1131 #, gcc-internal-format msgid "no field %qD found in union being initialized" msgstr "" -#: cp/typeck2.c:1128 +#: cp/typeck2.c:1140 #, gcc-internal-format msgid "index value instead of field name in union initializer" msgstr "" -#: cp/typeck2.c:1283 +#: cp/typeck2.c:1299 #, gcc-internal-format msgid "circular pointer delegation detected" msgstr "" -#: cp/typeck2.c:1296 +#: cp/typeck2.c:1312 #, gcc-internal-format msgid "base operand of %<->%> has non-pointer type %qT" msgstr "" -#: cp/typeck2.c:1320 +#: cp/typeck2.c:1336 #, gcc-internal-format msgid "result of %<operator->()%> yields non-pointer result" msgstr "" -#: cp/typeck2.c:1322 +#: cp/typeck2.c:1338 #, gcc-internal-format msgid "base operand of %<->%> is not a pointer" msgstr "" -#: cp/typeck2.c:1344 +#: cp/typeck2.c:1360 #, gcc-internal-format msgid "%qE cannot be used as a member pointer, since it is of type %qT" msgstr "" -#: cp/typeck2.c:1353 +#: cp/typeck2.c:1369 #, gcc-internal-format msgid "cannot apply member pointer %qE to %qE, which is of non-class type %qT" msgstr "" -#: cp/typeck2.c:1375 +#: cp/typeck2.c:1391 #, gcc-internal-format msgid "pointer to member type %qT incompatible with object type %qT" msgstr "" -#: cp/typeck2.c:1616 +#: cp/typeck2.c:1451 +#, gcc-internal-format +msgid "invalid value-initialization of reference types" +msgstr "" + +#: cp/typeck2.c:1638 #, gcc-internal-format msgid "call to function %qD which throws incomplete type %q#T" msgstr "" -#: cp/typeck2.c:1619 +#: cp/typeck2.c:1641 #, gcc-internal-format msgid "call to function which throws incomplete type %q#T" msgstr "" @@ -34619,19 +34499,19 @@ msgstr "" msgid "address of register variable %qs requested" msgstr "" -#: fortran/trans-array.c:5714 +#: fortran/trans-array.c:5732 #, gcc-internal-format msgid "" "Possible frontend bug: Deferred array size without pointer, allocatable " "attribute or derived type without allocatable components." msgstr "" -#: fortran/trans-array.c:6195 +#: fortran/trans-array.c:6213 #, gcc-internal-format msgid "bad expression type during walk (%d)" msgstr "" -#: fortran/trans-const.c:326 +#: fortran/trans-const.c:330 #, gcc-internal-format msgid "gfc_conv_constant_to_tree(): invalid type: %s" msgstr "" @@ -34641,7 +34521,7 @@ msgstr "" msgid "intrinsic variable which isn't a procedure" msgstr "" -#: fortran/trans-decl.c:3131 +#: fortran/trans-decl.c:3165 #, gcc-internal-format msgid "backend decl for module variable %s already exists" msgstr "" @@ -34656,32 +34536,32 @@ msgstr "" msgid "Intrinsic function %s(%d) not recognized" msgstr "" -#: fortran/trans-io.c:2105 +#: fortran/trans-io.c:2103 #, gcc-internal-format msgid "Bad IO basetype (%d)" msgstr "" -#: fortran/trans-types.c:392 +#: fortran/trans-types.c:378 #, gcc-internal-format msgid "integer kind=8 not available for -fdefault-integer-8 option" msgstr "" -#: fortran/trans-types.c:415 +#: fortran/trans-types.c:401 #, gcc-internal-format msgid "real kind=8 not available for -fdefault-real-8 option" msgstr "" -#: fortran/trans-types.c:428 +#: fortran/trans-types.c:414 #, gcc-internal-format msgid "Use of -fdefault-double-8 requires -fdefault-real-8" msgstr "" -#: fortran/trans-types.c:1261 +#: fortran/trans-types.c:1247 #, gcc-internal-format msgid "Array element size too big" msgstr "" -#: fortran/trans.c:1232 +#: fortran/trans.c:1233 #, gcc-internal-format msgid "gfc_trans_code(): Bad statement code" msgstr "" diff --git a/gcc/protoize.c b/gcc/protoize.c deleted file mode 100644 index aab1291dbb2..00000000000 --- a/gcc/protoize.c +++ /dev/null @@ -1,4535 +0,0 @@ -/* Protoize program - Original version by Ron Guilmette (rfg@segfault.us.com). - Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008 Free Software - Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free -Software Foundation; either version 3, or (at your option) any later -version. - -GCC is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING3. If not see -<http://www.gnu.org/licenses/>. */ - -#include "config.h" -#include "system.h" -#include "coretypes.h" -#include "tm.h" -#include "intl.h" -#include "cppdefault.h" - -#include <setjmp.h> -#include <signal.h> -#if ! defined( SIGCHLD ) && defined( SIGCLD ) -# define SIGCHLD SIGCLD -#endif -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif -#include "version.h" - -/* Include getopt.h for the sake of getopt_long. */ -#include "getopt.h" - -/* Macro to see if the path elements match. */ -#ifdef HAVE_DOS_BASED_FILE_SYSTEM -#define IS_SAME_PATH_CHAR(a,b) (TOUPPER (a) == TOUPPER (b)) -#else -#define IS_SAME_PATH_CHAR(a,b) ((a) == (b)) -#endif - -/* Macro to see if the paths match. */ -#define IS_SAME_PATH(a,b) (FILENAME_CMP (a, b) == 0) - -/* Suffix for aux-info files. */ -#ifdef __MSDOS__ -#define AUX_INFO_SUFFIX "X" -#else -#define AUX_INFO_SUFFIX ".X" -#endif - -/* Suffix for saved files. */ -#ifdef __MSDOS__ -#define SAVE_SUFFIX "sav" -#else -#define SAVE_SUFFIX ".save" -#endif - -/* Suffix for renamed C++ files. */ -#ifdef HAVE_DOS_BASED_FILE_SYSTEM -#define CPLUS_FILE_SUFFIX "cc" -#else -#define CPLUS_FILE_SUFFIX "C" -#endif - -static void usage (void) ATTRIBUTE_NORETURN; -static void aux_info_corrupted (void) ATTRIBUTE_NORETURN; -static void declare_source_confusing (const char *) ATTRIBUTE_NORETURN; -static const char *shortpath (const char *, const char *); -static void notice (const char *, ...) ATTRIBUTE_PRINTF_1; -static char *savestring (const char *, unsigned int); -static char *dupnstr (const char *, size_t); -static int safe_read (int, void *, int); -static void safe_write (int, void *, int, const char *); -static void save_pointers (void); -static void restore_pointers (void); -static int is_id_char (int); -static int in_system_include_dir (const char *); -static int directory_specified_p (const char *); -static int file_excluded_p (const char *); -static char *unexpand_if_needed (const char *); -static char *abspath (const char *, const char *); -static void check_aux_info (int); -static const char *find_corresponding_lparen (const char *); -static int referenced_file_is_newer (const char *, time_t); -static void save_def_or_dec (const char *, int); -static void munge_compile_params (const char *); -static int gen_aux_info_file (const char *); -static void process_aux_info_file (const char *, int, int); -static int identify_lineno (const char *); -static void check_source (int, const char *); -static const char *seek_to_line (int); -static const char *forward_to_next_token_char (const char *); -static void output_bytes (const char *, size_t); -static void output_string (const char *); -static void output_up_to (const char *); -static int other_variable_style_function (const char *); -static const char *find_rightmost_formals_list (const char *); -static void do_cleaning (char *, const char *); -static const char *careful_find_l_paren (const char *); -static void do_processing (void); - -/* Look for these where the `const' qualifier is intentionally cast aside. */ -#define NONCONST - -/* Define a default place to find the SYSCALLS.X file. */ - -#ifndef UNPROTOIZE - -#ifndef STANDARD_EXEC_PREFIX -#define STANDARD_EXEC_PREFIX "/usr/local/lib/gcc-lib/" -#endif /* !defined STANDARD_EXEC_PREFIX */ - -static const char * const standard_exec_prefix = STANDARD_EXEC_PREFIX; -static const char * const target_machine = DEFAULT_TARGET_MACHINE; -static const char * const target_version = DEFAULT_TARGET_VERSION; - -#endif /* !defined (UNPROTOIZE) */ - -/* Suffix of aux_info files. */ - -static const char * const aux_info_suffix = AUX_INFO_SUFFIX; - -/* String to attach to filenames for saved versions of original files. */ - -static const char * const save_suffix = SAVE_SUFFIX; - -#ifndef UNPROTOIZE - -/* String to attach to C filenames renamed to C++. */ - -static const char * const cplus_suffix = CPLUS_FILE_SUFFIX; - -/* File name of the file which contains descriptions of standard system - routines. Note that we never actually do anything with this file per se, - but we do read in its corresponding aux_info file. */ - -static const char syscalls_filename[] = "SYSCALLS.c"; - -/* Default place to find the above file. */ - -static const char * default_syscalls_dir; - -/* Variable to hold the complete absolutized filename of the SYSCALLS.c.X - file. */ - -static char * syscalls_absolute_filename; - -#endif /* !defined (UNPROTOIZE) */ - -/* Type of the structure that holds information about macro unexpansions. */ - -struct unexpansion_struct { - const char *const expanded; - const char *const contracted; -}; -typedef struct unexpansion_struct unexpansion; - -/* A table of conversions that may need to be made for some (stupid) older - operating systems where these types are preprocessor macros rather than - typedefs (as they really ought to be). - - WARNING: The contracted forms must be as small (or smaller) as the - expanded forms, or else havoc will ensue. */ - -static const unexpansion unexpansions[] = { - { "struct _iobuf", "FILE" }, - { 0, 0 } -}; - -/* The number of "primary" slots in the hash tables for filenames and for - function names. This can be as big or as small as you like, except that - it must be a power of two. */ - -#define HASH_TABLE_SIZE (1 << 9) - -/* Bit mask to use when computing hash values. */ - -static const int hash_mask = (HASH_TABLE_SIZE - 1); - - -/* Datatype for lists of directories or filenames. */ -struct string_list -{ - const char *name; - struct string_list *next; -}; - -static struct string_list *string_list_cons (const char *, - struct string_list *); - -/* List of directories in which files should be converted. */ - -struct string_list *directory_list; - -/* List of file names which should not be converted. - A file is excluded if the end of its name, following a /, - matches one of the names in this list. */ - -struct string_list *exclude_list; - -/* The name of the other style of variable-number-of-parameters functions - (i.e. the style that we want to leave unconverted because we don't yet - know how to convert them to this style. This string is used in warning - messages. */ - -/* Also define here the string that we can search for in the parameter lists - taken from the .X files which will unambiguously indicate that we have - found a varargs style function. */ - -#ifdef UNPROTOIZE -static const char * const other_var_style = "stdarg"; -#else /* !defined (UNPROTOIZE) */ -static const char * const other_var_style = "varargs"; -static const char *varargs_style_indicator = "va_alist"; -#endif /* !defined (UNPROTOIZE) */ - -/* The following two types are used to create hash tables. In this program, - there are two hash tables which are used to store and quickly lookup two - different classes of strings. The first type of strings stored in the - first hash table are absolute filenames of files which protoize needs to - know about. The second type of strings (stored in the second hash table) - are function names. It is this second class of strings which really - inspired the use of the hash tables, because there may be a lot of them. */ - -typedef struct hash_table_entry_struct hash_table_entry; - -/* Do some typedefs so that we don't have to write "struct" so often. */ - -typedef struct def_dec_info_struct def_dec_info; -typedef struct file_info_struct file_info; -typedef struct f_list_chain_item_struct f_list_chain_item; - -#ifndef UNPROTOIZE -static int is_syscalls_file (const file_info *); -static void rename_c_file (const hash_table_entry *); -static const def_dec_info *find_extern_def (const def_dec_info *, - const def_dec_info *); -static const def_dec_info *find_static_definition (const def_dec_info *); -static void connect_defs_and_decs (const hash_table_entry *); -static void add_local_decl (const def_dec_info *, const char *); -static void add_global_decls (const file_info *, const char *); -#endif /* ! UNPROTOIZE */ -static int needs_to_be_converted (const file_info *); -static void visit_each_hash_node (const hash_table_entry *, - void (*)(const hash_table_entry *)); -static hash_table_entry *add_symbol (hash_table_entry *, const char *); -static hash_table_entry *lookup (hash_table_entry *, const char *); -static void free_def_dec (def_dec_info *); -static file_info *find_file (const char *, int); -static void reverse_def_dec_list (const hash_table_entry *); -static void edit_fn_declaration (const def_dec_info *, const char *); -static int edit_formals_lists (const char *, unsigned int, - const def_dec_info *); -static void edit_fn_definition (const def_dec_info *, const char *); -static void scan_for_missed_items (const file_info *); -static void edit_file (const hash_table_entry *); - -/* In the struct below, note that the "_info" field has two different uses - depending on the type of hash table we are in (i.e. either the filenames - hash table or the function names hash table). In the filenames hash table - the info fields of the entries point to the file_info struct which is - associated with each filename (1 per filename). In the function names - hash table, the info field points to the head of a singly linked list of - def_dec_info entries which are all defs or decs of the function whose - name is pointed to by the "symbol" field. Keeping all of the defs/decs - for a given function name on a special list specifically for that function - name makes it quick and easy to find out all of the important information - about a given (named) function. */ - -struct hash_table_entry_struct { - hash_table_entry * hash_next; /* -> to secondary entries */ - const char * symbol; /* -> to the hashed string */ - union { - const def_dec_info * _ddip; - file_info * _fip; - } _info; -}; -#define ddip _info._ddip -#define fip _info._fip - -/* Define a type specifically for our two hash tables. */ - -typedef hash_table_entry hash_table[HASH_TABLE_SIZE]; - -/* The following struct holds all of the important information about any - single filename (e.g. file) which we need to know about. */ - -struct file_info_struct { - const hash_table_entry * hash_entry; /* -> to associated hash entry */ - const def_dec_info * defs_decs; /* -> to chain of defs/decs */ - time_t mtime; /* Time of last modification. */ -}; - -/* Due to the possibility that functions may return pointers to functions, - (which may themselves have their own parameter lists) and due to the - fact that returned pointers-to-functions may be of type "pointer-to- - function-returning-pointer-to-function" (ad nauseum) we have to keep - an entire chain of ANSI style formal parameter lists for each function. - - Normally, for any given function, there will only be one formals list - on the chain, but you never know. - - Note that the head of each chain of formals lists is pointed to by the - `f_list_chain' field of the corresponding def_dec_info record. - - For any given chain, the item at the head of the chain is the *leftmost* - parameter list seen in the actual C language function declaration. If - there are other members of the chain, then these are linked in left-to-right - order from the head of the chain. */ - -struct f_list_chain_item_struct { - const f_list_chain_item * chain_next; /* -> to next item on chain */ - const char * formals_list; /* -> to formals list string */ -}; - -/* The following struct holds all of the important information about any - single function definition or declaration which we need to know about. - Note that for unprotoize we don't need to know very much because we - never even create records for stuff that we don't intend to convert - (like for instance defs and decs which are already in old K&R format - and "implicit" function declarations). */ - -struct def_dec_info_struct { - const def_dec_info * next_in_file; /* -> to rest of chain for file */ - file_info * file; /* -> file_info for containing file */ - int line; /* source line number of def/dec */ - const char * ansi_decl; /* -> left end of ansi decl */ - hash_table_entry * hash_entry; /* -> hash entry for function name */ - unsigned int is_func_def; /* = 0 means this is a declaration */ - const def_dec_info * next_for_func; /* -> to rest of chain for func name */ - unsigned int f_list_count; /* count of formals lists we expect */ - char prototyped; /* = 0 means already prototyped */ -#ifndef UNPROTOIZE - const f_list_chain_item * f_list_chain; /* -> chain of formals lists */ - const def_dec_info * definition; /* -> def/dec containing related def */ - char is_static; /* = 0 means visibility is "extern" */ - char is_implicit; /* != 0 for implicit func decl's */ - char written; /* != 0 means written for implicit */ -#else /* !defined (UNPROTOIZE) */ - const char * formal_names; /* -> to list of names of formals */ - const char * formal_decls; /* -> to string of formal declarations */ -#endif /* !defined (UNPROTOIZE) */ -}; - -/* Pointer to the tail component of the filename by which this program was - invoked. Used everywhere in error and warning messages. */ - -static const char *pname; - -/* Error counter. Will be nonzero if we should give up at the next convenient - stopping point. */ - -static int errors = 0; - -/* Option flags. */ -/* ??? The variables are not marked static because some of them have - the same names as gcc variables declared in options.h. */ -/* ??? These comments should say what the flag mean as well as the options - that set them. */ - -/* File name to use for running gcc. Allows GCC 2 to be named - something other than gcc. */ -static const char *compiler_file_name = "gcc"; - -int version_flag = 0; /* Print our version number. */ -int quiet_flag = 0; /* Don't print messages normally. */ -int nochange_flag = 0; /* Don't convert, just say what files - we would have converted. */ -int nosave_flag = 0; /* Don't save the old version. */ -int keep_flag = 0; /* Don't delete the .X files. */ -static const char ** compile_params = 0; /* Option string for gcc. */ -#ifdef UNPROTOIZE -static const char *indent_string = " "; /* Indentation for newly - inserted parm decls. */ -#else /* !defined (UNPROTOIZE) */ -int local_flag = 0; /* Insert new local decls (when?). */ -int global_flag = 0; /* set by -g option */ -int cplusplus_flag = 0; /* Rename converted files to *.C. */ -static const char *nondefault_syscalls_dir = 0; /* Dir to look for - SYSCALLS.c.X in. */ -#endif /* !defined (UNPROTOIZE) */ - -/* An index into the compile_params array where we should insert the source - file name when we are ready to exec the C compiler. A zero value indicates - that we have not yet called munge_compile_params. */ - -static int input_file_name_index = 0; - -/* An index into the compile_params array where we should insert the filename - for the aux info file, when we run the C compiler. */ -static int aux_info_file_name_index = 0; - -/* Count of command line arguments which were "filename" arguments. */ - -static int n_base_source_files = 0; - -/* Points to a malloc'ed list of pointers to all of the filenames of base - source files which were specified on the command line. */ - -static const char **base_source_filenames; - -/* Line number of the line within the current aux_info file that we - are currently processing. Used for error messages in case the prototypes - info file is corrupted somehow. */ - -static int current_aux_info_lineno; - -/* Pointer to the name of the source file currently being converted. */ - -static const char *convert_filename; - -/* Pointer to relative root string (taken from aux_info file) which indicates - where directory the user was in when he did the compilation step that - produced the containing aux_info file. */ - -static const char *invocation_filename; - -/* Pointer to the base of the input buffer that holds the original text for the - source file currently being converted. */ - -static const char *orig_text_base; - -/* Pointer to the byte just beyond the end of the input buffer that holds the - original text for the source file currently being converted. */ - -static const char *orig_text_limit; - -/* Pointer to the base of the input buffer that holds the cleaned text for the - source file currently being converted. */ - -static const char *clean_text_base; - -/* Pointer to the byte just beyond the end of the input buffer that holds the - cleaned text for the source file currently being converted. */ - -static const char *clean_text_limit; - -/* Pointer to the last byte in the cleaned text buffer that we have already - (virtually) copied to the output buffer (or decided to ignore). */ - -static const char * clean_read_ptr; - -/* Pointer to the base of the output buffer that holds the replacement text - for the source file currently being converted. */ - -static char *repl_text_base; - -/* Pointer to the byte just beyond the end of the output buffer that holds the - replacement text for the source file currently being converted. */ - -static char *repl_text_limit; - -/* Pointer to the last byte which has been stored into the output buffer. - The next byte to be stored should be stored just past where this points - to. */ - -static char * repl_write_ptr; - -/* Pointer into the cleaned text buffer for the source file we are currently - converting. This points to the first character of the line that we last - did a "seek_to_line" to (see below). */ - -static const char *last_known_line_start; - -/* Number of the line (in the cleaned text buffer) that we last did a - "seek_to_line" to. Will be one if we just read a new source file - into the cleaned text buffer. */ - -static int last_known_line_number; - -/* The filenames hash table. */ - -static hash_table filename_primary; - -/* The function names hash table. */ - -static hash_table function_name_primary; - -/* The place to keep the recovery address which is used only in cases where - we get hopelessly confused by something in the cleaned original text. */ - -static jmp_buf source_confusion_recovery; - -/* A pointer to the current directory filename (used by abspath). */ - -static char *cwd_buffer; - -/* A place to save the read pointer until we are sure that an individual - attempt at editing will succeed. */ - -static const char * saved_clean_read_ptr; - -/* A place to save the write pointer until we are sure that an individual - attempt at editing will succeed. */ - -static char * saved_repl_write_ptr; - -/* Translate and output an error message. */ -static void -notice (const char *cmsgid, ...) -{ - va_list ap; - - va_start (ap, cmsgid); - vfprintf (stderr, _(cmsgid), ap); - va_end (ap); -} - - -/* Make a copy of a string INPUT with size SIZE. */ - -static char * -savestring (const char *input, unsigned int size) -{ - char *output = xmalloc (size + 1); - strcpy (output, input); - return output; -} - - -/* Make a duplicate of the first N bytes of a given string in a newly - allocated area. */ - -static char * -dupnstr (const char *s, size_t n) -{ - char *ret_val = xmalloc (n + 1); - - strncpy (ret_val, s, n); - ret_val[n] = '\0'; - return ret_val; -} - -/* Read LEN bytes at PTR from descriptor DESC, for file FILENAME, - retrying if necessary. Return the actual number of bytes read. */ - -static int -safe_read (int desc, void *ptr, int len) -{ - int left = len; - while (left > 0) { - int nchars = read (desc, ptr, left); - if (nchars < 0) - { -#ifdef EINTR - if (errno == EINTR) - continue; -#endif - return nchars; - } - if (nchars == 0) - break; - /* Arithmetic on void pointers is a gcc extension. */ - ptr = (char *) ptr + nchars; - left -= nchars; - } - return len - left; -} - -/* Write LEN bytes at PTR to descriptor DESC, - retrying if necessary, and treating any real error as fatal. */ - -static void -safe_write (int desc, void *ptr, int len, const char *out_fname) -{ - while (len > 0) { - int written = write (desc, ptr, len); - if (written < 0) - { - int errno_val = errno; -#ifdef EINTR - if (errno_val == EINTR) - continue; -#endif - notice ("%s: error writing file '%s': %s\n", - pname, shortpath (NULL, out_fname), xstrerror (errno_val)); - return; - } - /* Arithmetic on void pointers is a gcc extension. */ - ptr = (char *) ptr + written; - len -= written; - } -} - -/* Get setup to recover in case the edit we are about to do goes awry. */ - -static void -save_pointers (void) -{ - saved_clean_read_ptr = clean_read_ptr; - saved_repl_write_ptr = repl_write_ptr; -} - -/* Call this routine to recover our previous state whenever something looks - too confusing in the source code we are trying to edit. */ - -static void -restore_pointers (void) -{ - clean_read_ptr = saved_clean_read_ptr; - repl_write_ptr = saved_repl_write_ptr; -} - -/* Return true if the given character is a valid identifier character. */ - -static int -is_id_char (int ch) -{ - return (ISIDNUM (ch) || (ch == '$')); -} - -/* Give a message indicating the proper way to invoke this program and then - exit with nonzero status. */ - -static void -usage (void) -{ -#ifdef UNPROTOIZE - notice ("%s: usage '%s [ -VqfnkN ] [ -i <istring> ] [ filename ... ]'\n", - pname, pname); -#else /* !defined (UNPROTOIZE) */ - notice ("%s: usage '%s [ -VqfnkNlgC ] [ -B <dirname> ] [ filename ... ]'\n", - pname, pname); -#endif /* !defined (UNPROTOIZE) */ - exit (FATAL_EXIT_CODE); -} - -/* Return true if the given filename (assumed to be an absolute filename) - designates a file residing anywhere beneath any one of the "system" - include directories. */ - -static int -in_system_include_dir (const char *path) -{ - const struct default_include *p; - - gcc_assert (IS_ABSOLUTE_PATH (path)); - - for (p = cpp_include_defaults; p->fname; p++) - if (!strncmp (path, p->fname, strlen (p->fname)) - && IS_DIR_SEPARATOR (path[strlen (p->fname)])) - return 1; - return 0; -} - -#if 0 -/* Return true if the given filename designates a file that the user has - read access to and for which the user has write access to the containing - directory. */ - -static int -file_could_be_converted (const char *path) -{ - char *const dir_name = alloca (strlen (path) + 1); - - if (access (path, R_OK)) - return 0; - - { - char *dir_last_slash; - - strcpy (dir_name, path); - dir_last_slash = strrchr (dir_name, DIR_SEPARATOR); -#ifdef DIR_SEPARATOR_2 - { - char *slash; - - slash = strrchr (dir_last_slash ? dir_last_slash : dir_name, - DIR_SEPARATOR_2); - if (slash) - dir_last_slash = slash; - } -#endif - gcc_assert (dir_last_slash); - *dir_last_slash = '\0'; - } - - if (access (path, W_OK)) - return 0; - - return 1; -} - -/* Return true if the given filename designates a file that we are allowed - to modify. Files which we should not attempt to modify are (a) "system" - include files, and (b) files which the user doesn't have write access to, - and (c) files which reside in directories which the user doesn't have - write access to. Unless requested to be quiet, give warnings about - files that we will not try to convert for one reason or another. An - exception is made for "system" include files, which we never try to - convert and for which we don't issue the usual warnings. */ - -static int -file_normally_convertible (const char *path) -{ - char *const dir_name = alloca (strlen (path) + 1); - - if (in_system_include_dir (path)) - return 0; - - { - char *dir_last_slash; - - strcpy (dir_name, path); - dir_last_slash = strrchr (dir_name, DIR_SEPARATOR); -#ifdef DIR_SEPARATOR_2 - { - char *slash; - - slash = strrchr (dir_last_slash ? dir_last_slash : dir_name, - DIR_SEPARATOR_2); - if (slash) - dir_last_slash = slash; - } -#endif - gcc_assert (dir_last_slash); - *dir_last_slash = '\0'; - } - - if (access (path, R_OK)) - { - if (!quiet_flag) - notice ("%s: warning: no read access for file '%s'\n", - pname, shortpath (NULL, path)); - return 0; - } - - if (access (path, W_OK)) - { - if (!quiet_flag) - notice ("%s: warning: no write access for file '%s'\n", - pname, shortpath (NULL, path)); - return 0; - } - - if (access (dir_name, W_OK)) - { - if (!quiet_flag) - notice ("%s: warning: no write access for dir containing '%s'\n", - pname, shortpath (NULL, path)); - return 0; - } - - return 1; -} -#endif /* 0 */ - -#ifndef UNPROTOIZE - -/* Return true if the given file_info struct refers to the special SYSCALLS.c.X - file. Return false otherwise. */ - -static int -is_syscalls_file (const file_info *fi_p) -{ - char const *f = fi_p->hash_entry->symbol; - size_t fl = strlen (f), sysl = sizeof (syscalls_filename) - 1; - return sysl <= fl && strcmp (f + fl - sysl, syscalls_filename) == 0; -} - -#endif /* !defined (UNPROTOIZE) */ - -/* Check to see if this file will need to have anything done to it on this - run. If there is nothing in the given file which both needs conversion - and for which we have the necessary stuff to do the conversion, return - false. Otherwise, return true. - - Note that (for protoize) it is only valid to call this function *after* - the connections between declarations and definitions have all been made - by connect_defs_and_decs. */ - -static int -needs_to_be_converted (const file_info *file_p) -{ - const def_dec_info *ddp; - -#ifndef UNPROTOIZE - - if (is_syscalls_file (file_p)) - return 0; - -#endif /* !defined (UNPROTOIZE) */ - - for (ddp = file_p->defs_decs; ddp; ddp = ddp->next_in_file) - - if ( - -#ifndef UNPROTOIZE - - /* ... and if we a protoizing and this function is in old style ... */ - !ddp->prototyped - /* ... and if this a definition or is a decl with an associated def ... */ - && (ddp->is_func_def || (!ddp->is_func_def && ddp->definition)) - -#else /* defined (UNPROTOIZE) */ - - /* ... and if we are unprotoizing and this function is in new style ... */ - ddp->prototyped - -#endif /* defined (UNPROTOIZE) */ - ) - /* ... then the containing file needs converting. */ - return -1; - return 0; -} - -/* Return 1 if the file name NAME is in a directory - that should be converted. */ - -static int -directory_specified_p (const char *name) -{ - struct string_list *p; - - for (p = directory_list; p; p = p->next) - if (!strncmp (name, p->name, strlen (p->name)) - && IS_DIR_SEPARATOR (name[strlen (p->name)])) - { - const char *q = name + strlen (p->name) + 1; - - /* If there are more slashes, it's in a subdir, so - this match doesn't count. */ - while (*q++) - if (IS_DIR_SEPARATOR (*(q-1))) - goto lose; - return 1; - - lose: ; - } - - return 0; -} - -/* Return 1 if the file named NAME should be excluded from conversion. */ - -static int -file_excluded_p (const char *name) -{ - struct string_list *p; - int len = strlen (name); - - for (p = exclude_list; p; p = p->next) - if (!strcmp (name + len - strlen (p->name), p->name) - && IS_DIR_SEPARATOR (name[len - strlen (p->name) - 1])) - return 1; - - return 0; -} - -/* Construct a new element of a string_list. - STRING is the new element value, and REST holds the remaining elements. */ - -static struct string_list * -string_list_cons (const char *string, struct string_list *rest) -{ - struct string_list *temp = xmalloc (sizeof (struct string_list)); - - temp->next = rest; - temp->name = string; - return temp; -} - -/* ??? The GNU convention for mentioning function args in its comments - is to capitalize them. So change "hash_tab_p" to HASH_TAB_P below. - Likewise for all the other functions. */ - -/* Given a hash table, apply some function to each node in the table. The - table to traverse is given as the "hash_tab_p" argument, and the - function to be applied to each node in the table is given as "func" - argument. */ - -static void -visit_each_hash_node (const hash_table_entry *hash_tab_p, - void (*func) (const hash_table_entry *)) -{ - const hash_table_entry *primary; - - for (primary = hash_tab_p; primary < &hash_tab_p[HASH_TABLE_SIZE]; primary++) - if (primary->symbol) - { - hash_table_entry *second; - - (*func)(primary); - for (second = primary->hash_next; second; second = second->hash_next) - (*func) (second); - } -} - -/* Initialize all of the fields of a new hash table entry, pointed - to by the "p" parameter. Note that the space to hold the entry - is assumed to have already been allocated before this routine is - called. */ - -static hash_table_entry * -add_symbol (hash_table_entry *p, const char *s) -{ - p->hash_next = NULL; - p->symbol = xstrdup (s); - p->ddip = NULL; - p->fip = NULL; - return p; -} - -/* Look for a particular function name or filename in the particular - hash table indicated by "hash_tab_p". If the name is not in the - given hash table, add it. Either way, return a pointer to the - hash table entry for the given name. */ - -static hash_table_entry * -lookup (hash_table_entry *hash_tab_p, const char *search_symbol) -{ - int hash_value = 0; - const char *search_symbol_char_p = search_symbol; - hash_table_entry *p; - - while (*search_symbol_char_p) - hash_value += *search_symbol_char_p++; - hash_value &= hash_mask; - p = &hash_tab_p[hash_value]; - if (! p->symbol) - return add_symbol (p, search_symbol); - if (!strcmp (p->symbol, search_symbol)) - return p; - while (p->hash_next) - { - p = p->hash_next; - if (!strcmp (p->symbol, search_symbol)) - return p; - } - p->hash_next = xmalloc (sizeof (hash_table_entry)); - p = p->hash_next; - return add_symbol (p, search_symbol); -} - -/* Throw a def/dec record on the junk heap. - - Also, since we are not using this record anymore, free up all of the - stuff it pointed to. */ - -static void -free_def_dec (def_dec_info *p) -{ - free ((NONCONST void *) p->ansi_decl); - -#ifndef UNPROTOIZE - { - const f_list_chain_item * curr; - const f_list_chain_item * next; - - for (curr = p->f_list_chain; curr; curr = next) - { - next = curr->chain_next; - free ((NONCONST void *) curr); - } - } -#endif /* !defined (UNPROTOIZE) */ - - free (p); -} - -/* Unexpand as many macro symbols as we can find. - - If the given line must be unexpanded, make a copy of it in the heap and - return a pointer to the unexpanded copy. Otherwise return NULL. */ - -static char * -unexpand_if_needed (const char *aux_info_line) -{ - static char *line_buf = 0; - static int line_buf_size = 0; - const unexpansion *unexp_p; - int got_unexpanded = 0; - const char *s; - char *copy_p = line_buf; - - if (line_buf == 0) - { - line_buf_size = 1024; - line_buf = xmalloc (line_buf_size); - } - - copy_p = line_buf; - - /* Make a copy of the input string in line_buf, expanding as necessary. */ - - for (s = aux_info_line; *s != '\n'; ) - { - for (unexp_p = unexpansions; unexp_p->expanded; unexp_p++) - { - const char *in_p = unexp_p->expanded; - size_t len = strlen (in_p); - - if (*s == *in_p && !strncmp (s, in_p, len) && !is_id_char (s[len])) - { - int size = strlen (unexp_p->contracted); - got_unexpanded = 1; - if (copy_p + size - line_buf >= line_buf_size) - { - int offset = copy_p - line_buf; - line_buf_size *= 2; - line_buf_size += size; - line_buf = xrealloc (line_buf, line_buf_size); - copy_p = line_buf + offset; - } - strcpy (copy_p, unexp_p->contracted); - copy_p += size; - - /* Assume that there will not be another replacement required - within the text just replaced. */ - - s += len; - goto continue_outer; - } - } - if (copy_p - line_buf == line_buf_size) - { - int offset = copy_p - line_buf; - line_buf_size *= 2; - line_buf = xrealloc (line_buf, line_buf_size); - copy_p = line_buf + offset; - } - *copy_p++ = *s++; -continue_outer: ; - } - if (copy_p + 2 - line_buf >= line_buf_size) - { - int offset = copy_p - line_buf; - line_buf_size *= 2; - line_buf = xrealloc (line_buf, line_buf_size); - copy_p = line_buf + offset; - } - *copy_p++ = '\n'; - *copy_p = '\0'; - - return (got_unexpanded ? savestring (line_buf, copy_p - line_buf) : 0); -} - -/* Return the absolutized filename for the given relative - filename. Note that if that filename is already absolute, it may - still be returned in a modified form because this routine also - eliminates redundant slashes and single dots and eliminates double - dots to get a shortest possible filename from the given input - filename. The absolutization of relative filenames is made by - assuming that the given filename is to be taken as relative to - the first argument (cwd) or to the current directory if cwd is - NULL. */ - -static char * -abspath (const char *cwd, const char *rel_filename) -{ - /* Setup the current working directory as needed. */ - const char *const cwd2 = (cwd) ? cwd : cwd_buffer; - char *const abs_buffer = alloca (strlen (cwd2) + strlen (rel_filename) + 2); - char *endp = abs_buffer; - char *outp, *inp; - - /* Copy the filename (possibly preceded by the current working - directory name) into the absolutization buffer. */ - - { - const char *src_p; - - if (! IS_ABSOLUTE_PATH (rel_filename)) - { - src_p = cwd2; - while ((*endp++ = *src_p++)) - continue; - *(endp-1) = DIR_SEPARATOR; /* overwrite null */ - } -#ifdef HAVE_DOS_BASED_FILE_SYSTEM - else if (IS_DIR_SEPARATOR (rel_filename[0])) - { - /* A path starting with a directory separator is considered absolute - for dos based filesystems, but it's really not -- it's just the - convention used throughout GCC and it works. However, in this - case, we still need to prepend the drive spec from cwd_buffer. */ - *endp++ = cwd2[0]; - *endp++ = cwd2[1]; - } -#endif - src_p = rel_filename; - while ((*endp++ = *src_p++)) - continue; - } - - /* Now make a copy of abs_buffer into abs_buffer, shortening the - filename (by taking out slashes and dots) as we go. */ - - outp = inp = abs_buffer; - *outp++ = *inp++; /* copy first slash */ -#if defined (apollo) || defined (_WIN32) || defined (__INTERIX) - if (IS_DIR_SEPARATOR (inp[0])) - *outp++ = *inp++; /* copy second slash */ -#endif - for (;;) - { - if (!inp[0]) - break; - else if (IS_DIR_SEPARATOR (inp[0]) && IS_DIR_SEPARATOR (outp[-1])) - { - inp++; - continue; - } - else if (inp[0] == '.' && IS_DIR_SEPARATOR (outp[-1])) - { - if (!inp[1]) - break; - else if (IS_DIR_SEPARATOR (inp[1])) - { - inp += 2; - continue; - } - else if ((inp[1] == '.') && (inp[2] == 0 - || IS_DIR_SEPARATOR (inp[2]))) - { - inp += (IS_DIR_SEPARATOR (inp[2])) ? 3 : 2; - outp -= 2; - while (outp >= abs_buffer && ! IS_DIR_SEPARATOR (*outp)) - outp--; - if (outp < abs_buffer) - { - /* Catch cases like /.. where we try to backup to a - point above the absolute root of the logical file - system. */ - - notice ("%s: invalid file name: %s\n", - pname, rel_filename); - exit (FATAL_EXIT_CODE); - } - *++outp = '\0'; - continue; - } - } - *outp++ = *inp++; - } - - /* On exit, make sure that there is a trailing null, and make sure that - the last character of the returned string is *not* a slash. */ - - *outp = '\0'; - if (IS_DIR_SEPARATOR (outp[-1])) - *--outp = '\0'; - - /* Make a copy (in the heap) of the stuff left in the absolutization - buffer and return a pointer to the copy. */ - - return savestring (abs_buffer, outp - abs_buffer); -} - -/* Given a filename (and possibly a directory name from which the filename - is relative) return a string which is the shortest possible - equivalent for the corresponding full (absolutized) filename. The - shortest possible equivalent may be constructed by converting the - absolutized filename to be a relative filename (i.e. relative to - the actual current working directory). However if a relative filename - is longer, then the full absolute filename is returned. - - KNOWN BUG: - - Note that "simple-minded" conversion of any given type of filename (either - relative or absolute) may not result in a valid equivalent filename if any - subpart of the original filename is actually a symbolic link. */ - -static const char * -shortpath (const char *cwd, const char *filename) -{ - char *rel_buffer; - char *rel_buf_p; - char *cwd_p = cwd_buffer; - char *path_p; - int unmatched_slash_count = 0; - size_t filename_len = strlen (filename); - - path_p = abspath (cwd, filename); - rel_buf_p = rel_buffer = xmalloc (filename_len); - - while (*cwd_p && IS_SAME_PATH_CHAR (*cwd_p, *path_p)) - { - cwd_p++; - path_p++; - } - if (!*cwd_p && (!*path_p || IS_DIR_SEPARATOR (*path_p))) - { - /* whole pwd matched */ - if (!*path_p) /* input *is* the current path! */ - return "."; - else - return ++path_p; - } - else - { - if (*path_p) - { - --cwd_p; - --path_p; - while (! IS_DIR_SEPARATOR (*cwd_p)) /* backup to last slash */ - { - --cwd_p; - --path_p; - } - cwd_p++; - path_p++; - unmatched_slash_count++; - } - - /* Find out how many directory levels in cwd were *not* matched. */ - while (*cwd_p++) - if (IS_DIR_SEPARATOR (*(cwd_p-1))) - unmatched_slash_count++; - - /* Now we know how long the "short name" will be. - Reject it if longer than the input. */ - if (unmatched_slash_count * 3 + strlen (path_p) >= filename_len) - return filename; - - /* For each of them, put a `../' at the beginning of the short name. */ - while (unmatched_slash_count--) - { - /* Give up if the result gets to be longer - than the absolute path name. */ - if (rel_buffer + filename_len <= rel_buf_p + 3) - return filename; - *rel_buf_p++ = '.'; - *rel_buf_p++ = '.'; - *rel_buf_p++ = DIR_SEPARATOR; - } - - /* Then tack on the unmatched part of the desired file's name. */ - do - { - if (rel_buffer + filename_len <= rel_buf_p) - return filename; - } - while ((*rel_buf_p++ = *path_p++)); - - --rel_buf_p; - if (IS_DIR_SEPARATOR (*(rel_buf_p-1))) - *--rel_buf_p = '\0'; - return rel_buffer; - } -} - -/* Lookup the given filename in the hash table for filenames. If it is a - new one, then the hash table info pointer will be null. In this case, - we create a new file_info record to go with the filename, and we initialize - that record with some reasonable values. */ - -/* FILENAME was const, but that causes a warning on AIX when calling stat. - That is probably a bug in AIX, but might as well avoid the warning. */ - -static file_info * -find_file (const char *filename, int do_not_stat) -{ - hash_table_entry *hash_entry_p; - - hash_entry_p = lookup (filename_primary, filename); - if (hash_entry_p->fip) - return hash_entry_p->fip; - else - { - struct stat stat_buf; - file_info *file_p = xmalloc (sizeof (file_info)); - - /* If we cannot get status on any given source file, give a warning - and then just set its time of last modification to infinity. */ - - if (do_not_stat) - stat_buf.st_mtime = (time_t) 0; - else - { - if (stat (filename, &stat_buf) == -1) - { - int errno_val = errno; - notice ("%s: %s: can't get status: %s\n", - pname, shortpath (NULL, filename), - xstrerror (errno_val)); - stat_buf.st_mtime = (time_t) -1; - } - } - - hash_entry_p->fip = file_p; - file_p->hash_entry = hash_entry_p; - file_p->defs_decs = NULL; - file_p->mtime = stat_buf.st_mtime; - return file_p; - } -} - -/* Generate a fatal error because some part of the aux_info file is - messed up. */ - -static void -aux_info_corrupted (void) -{ - notice ("\n%s: fatal error: aux info file corrupted at line %d\n", - pname, current_aux_info_lineno); - exit (FATAL_EXIT_CODE); -} - -/* ??? This comment is vague. Say what the condition is for. */ -/* Check to see that a condition is true. This is kind of like an assert. */ - -static void -check_aux_info (int cond) -{ - if (! cond) - aux_info_corrupted (); -} - -/* Given a pointer to the closing right parenthesis for a particular formals - list (in an aux_info file) find the corresponding left parenthesis and - return a pointer to it. */ - -static const char * -find_corresponding_lparen (const char *p) -{ - const char *q; - int paren_depth; - - for (paren_depth = 1, q = p-1; paren_depth; q--) - { - switch (*q) - { - case ')': - paren_depth++; - break; - case '(': - paren_depth--; - break; - } - } - return ++q; -} - -/* Given a line from an aux info file, and a time at which the aux info - file it came from was created, check to see if the item described in - the line comes from a file which has been modified since the aux info - file was created. If so, return nonzero, else return zero. */ - -static int -referenced_file_is_newer (const char *l, time_t aux_info_mtime) -{ - const char *p; - file_info *fi_p; - char *filename; - - check_aux_info (l[0] == '/'); - check_aux_info (l[1] == '*'); - check_aux_info (l[2] == ' '); - - { - const char *filename_start = p = l + 3; - - while (*p != ':' -#ifdef HAVE_DOS_BASED_FILE_SYSTEM - || (*p == ':' && *p && *(p+1) && IS_DIR_SEPARATOR (*(p+1))) -#endif - ) - p++; - filename = alloca ((size_t) (p - filename_start) + 1); - strncpy (filename, filename_start, (size_t) (p - filename_start)); - filename[p-filename_start] = '\0'; - } - - /* Call find_file to find the file_info record associated with the file - which contained this particular def or dec item. Note that this call - may cause a new file_info record to be created if this is the first time - that we have ever known about this particular file. */ - - fi_p = find_file (abspath (invocation_filename, filename), 0); - - return (fi_p->mtime > aux_info_mtime); -} - -/* Given a line of info from the aux_info file, create a new - def_dec_info record to remember all of the important information about - a function definition or declaration. - - Link this record onto the list of such records for the particular file in - which it occurred in proper (descending) line number order (for now). - - If there is an identical record already on the list for the file, throw - this one away. Doing so takes care of the (useless and troublesome) - duplicates which are bound to crop up due to multiple inclusions of any - given individual header file. - - Finally, link the new def_dec record onto the list of such records - pertaining to this particular function name. */ - -static void -save_def_or_dec (const char *l, int is_syscalls) -{ - const char *p; - const char *semicolon_p; - def_dec_info *def_dec_p = xmalloc (sizeof (def_dec_info)); - -#ifndef UNPROTOIZE - def_dec_p->written = 0; -#endif /* !defined (UNPROTOIZE) */ - - /* Start processing the line by picking off 5 pieces of information from - the left hand end of the line. These are filename, line number, - new/old/implicit flag (new = ANSI prototype format), definition or - declaration flag, and extern/static flag). */ - - check_aux_info (l[0] == '/'); - check_aux_info (l[1] == '*'); - check_aux_info (l[2] == ' '); - - { - const char *filename_start = p = l + 3; - char *filename; - - while (*p != ':' -#ifdef HAVE_DOS_BASED_FILE_SYSTEM - || (*p == ':' && *p && *(p+1) && IS_DIR_SEPARATOR (*(p+1))) -#endif - ) - p++; - filename = alloca ((size_t) (p - filename_start) + 1); - strncpy (filename, filename_start, (size_t) (p - filename_start)); - filename[p-filename_start] = '\0'; - - /* Call find_file to find the file_info record associated with the file - which contained this particular def or dec item. Note that this call - may cause a new file_info record to be created if this is the first time - that we have ever known about this particular file. - - Note that we started out by forcing all of the base source file names - (i.e. the names of the aux_info files with the .X stripped off) into the - filenames hash table, and we simultaneously setup file_info records for - all of these base file names (even if they may be useless later). - The file_info records for all of these "base" file names (properly) - act as file_info records for the "original" (i.e. un-included) files - which were submitted to gcc for compilation (when the -aux-info - option was used). */ - - def_dec_p->file = find_file (abspath (invocation_filename, filename), is_syscalls); - } - - { - const char *line_number_start = ++p; - char line_number[10]; - - while (*p != ':' -#ifdef HAVE_DOS_BASED_FILE_SYSTEM - || (*p == ':' && *p && *(p+1) && IS_DIR_SEPARATOR (*(p+1))) -#endif - ) - p++; - strncpy (line_number, line_number_start, (size_t) (p - line_number_start)); - line_number[p-line_number_start] = '\0'; - def_dec_p->line = atoi (line_number); - } - - /* Check that this record describes a new-style, old-style, or implicit - definition or declaration. */ - - p++; /* Skip over the `:'. */ - check_aux_info ((*p == 'N') || (*p == 'O') || (*p == 'I')); - - /* Is this a new style (ANSI prototyped) definition or declaration? */ - - def_dec_p->prototyped = (*p == 'N'); - -#ifndef UNPROTOIZE - - /* Is this an implicit declaration? */ - - def_dec_p->is_implicit = (*p == 'I'); - -#endif /* !defined (UNPROTOIZE) */ - - p++; - - check_aux_info ((*p == 'C') || (*p == 'F')); - - /* Is this item a function definition (F) or a declaration (C). Note that - we treat item taken from the syscalls file as though they were function - definitions regardless of what the stuff in the file says. */ - - def_dec_p->is_func_def = ((*p++ == 'F') || is_syscalls); - -#ifndef UNPROTOIZE - def_dec_p->definition = 0; /* Fill this in later if protoizing. */ -#endif /* !defined (UNPROTOIZE) */ - - check_aux_info (*p++ == ' '); - check_aux_info (*p++ == '*'); - check_aux_info (*p++ == '/'); - check_aux_info (*p++ == ' '); - -#ifdef UNPROTOIZE - check_aux_info ((!strncmp (p, "static", 6)) || (!strncmp (p, "extern", 6))); -#else /* !defined (UNPROTOIZE) */ - if (!strncmp (p, "static", 6)) - def_dec_p->is_static = -1; - else if (!strncmp (p, "extern", 6)) - def_dec_p->is_static = 0; - else - check_aux_info (0); /* Didn't find either `extern' or `static'. */ -#endif /* !defined (UNPROTOIZE) */ - - { - const char *ansi_start = p; - - p += 6; /* Pass over the "static" or "extern". */ - - /* We are now past the initial stuff. Search forward from here to find - the terminating semicolon that should immediately follow the entire - ANSI format function declaration. */ - - while (*++p != ';') - continue; - - semicolon_p = p; - - /* Make a copy of the ansi declaration part of the line from the aux_info - file. */ - - def_dec_p->ansi_decl - = dupnstr (ansi_start, (size_t) ((semicolon_p+1) - ansi_start)); - - /* Backup and point at the final right paren of the final argument list. */ - - p--; - -#ifndef UNPROTOIZE - def_dec_p->f_list_chain = NULL; -#endif /* !defined (UNPROTOIZE) */ - - while (p != ansi_start && (p[-1] == ' ' || p[-1] == '\t')) p--; - if (*p != ')') - { - free_def_dec (def_dec_p); - return; - } - } - - /* Now isolate a whole set of formal argument lists, one-by-one. Normally, - there will only be one list to isolate, but there could be more. */ - - def_dec_p->f_list_count = 0; - - for (;;) - { - const char *left_paren_p = find_corresponding_lparen (p); -#ifndef UNPROTOIZE - { - f_list_chain_item *cip = xmalloc (sizeof (f_list_chain_item)); - - cip->formals_list - = dupnstr (left_paren_p + 1, (size_t) (p - (left_paren_p+1))); - - /* Add the new chain item at the head of the current list. */ - - cip->chain_next = def_dec_p->f_list_chain; - def_dec_p->f_list_chain = cip; - } -#endif /* !defined (UNPROTOIZE) */ - def_dec_p->f_list_count++; - - p = left_paren_p - 2; - - /* p must now point either to another right paren, or to the last - character of the name of the function that was declared/defined. - If p points to another right paren, then this indicates that we - are dealing with multiple formals lists. In that case, there - really should be another right paren preceding this right paren. */ - - if (*p != ')') - break; - else - check_aux_info (*--p == ')'); - } - - - { - const char *past_fn = p + 1; - - check_aux_info (*past_fn == ' '); - - /* Scan leftwards over the identifier that names the function. */ - - while (is_id_char (*p)) - p--; - p++; - - /* p now points to the leftmost character of the function name. */ - - { - char *fn_string = alloca (past_fn - p + 1); - - strncpy (fn_string, p, (size_t) (past_fn - p)); - fn_string[past_fn-p] = '\0'; - def_dec_p->hash_entry = lookup (function_name_primary, fn_string); - } - } - - /* Look at all of the defs and decs for this function name that we have - collected so far. If there is already one which is at the same - line number in the same file, then we can discard this new def_dec_info - record. - - As an extra assurance that any such pair of (nominally) identical - function declarations are in fact identical, we also compare the - ansi_decl parts of the lines from the aux_info files just to be on - the safe side. - - This comparison will fail if (for instance) the user was playing - messy games with the preprocessor which ultimately causes one - function declaration in one header file to look differently when - that file is included by two (or more) other files. */ - - { - const def_dec_info *other; - - for (other = def_dec_p->hash_entry->ddip; other; other = other->next_for_func) - { - if (def_dec_p->line == other->line && def_dec_p->file == other->file) - { - if (strcmp (def_dec_p->ansi_decl, other->ansi_decl)) - { - notice ("%s:%d: declaration of function '%s' takes different forms\n", - def_dec_p->file->hash_entry->symbol, - def_dec_p->line, - def_dec_p->hash_entry->symbol); - exit (FATAL_EXIT_CODE); - } - free_def_dec (def_dec_p); - return; - } - } - } - -#ifdef UNPROTOIZE - - /* If we are doing unprotoizing, we must now setup the pointers that will - point to the K&R name list and to the K&R argument declarations list. - - Note that if this is only a function declaration, then we should not - expect to find any K&R style formals list following the ANSI-style - formals list. This is because GCC knows that such information is - useless in the case of function declarations (function definitions - are a different story however). - - Since we are unprotoizing, we don't need any such lists anyway. - All we plan to do is to delete all characters between ()'s in any - case. */ - - def_dec_p->formal_names = NULL; - def_dec_p->formal_decls = NULL; - - if (def_dec_p->is_func_def) - { - p = semicolon_p; - check_aux_info (*++p == ' '); - check_aux_info (*++p == '/'); - check_aux_info (*++p == '*'); - check_aux_info (*++p == ' '); - check_aux_info (*++p == '('); - - { - const char *kr_names_start = ++p; /* Point just inside '('. */ - - while (*p++ != ')') - continue; - p--; /* point to closing right paren */ - - /* Make a copy of the K&R parameter names list. */ - - def_dec_p->formal_names - = dupnstr (kr_names_start, (size_t) (p - kr_names_start)); - } - - check_aux_info (*++p == ' '); - p++; - - /* p now points to the first character of the K&R style declarations - list (if there is one) or to the star-slash combination that ends - the comment in which such lists get embedded. */ - - /* Make a copy of the K&R formal decls list and set the def_dec record - to point to it. */ - - if (*p == '*') /* Are there no K&R declarations? */ - { - check_aux_info (*++p == '/'); - def_dec_p->formal_decls = ""; - } - else - { - const char *kr_decls_start = p; - - while (p[0] != '*' || p[1] != '/') - p++; - p--; - - check_aux_info (*p == ' '); - - def_dec_p->formal_decls - = dupnstr (kr_decls_start, (size_t) (p - kr_decls_start)); - } - - /* Handle a special case. If we have a function definition marked as - being in "old" style, and if its formal names list is empty, then - it may actually have the string "void" in its real formals list - in the original source code. Just to make sure, we will get setup - to convert such things anyway. - - This kludge only needs to be here because of an insurmountable - problem with generating .X files. */ - - if (!def_dec_p->prototyped && !*def_dec_p->formal_names) - def_dec_p->prototyped = 1; - } - - /* Since we are unprotoizing, if this item is already in old (K&R) style, - we can just ignore it. If that is true, throw away the item now. */ - - if (!def_dec_p->prototyped) - { - free_def_dec (def_dec_p); - return; - } - -#endif /* defined (UNPROTOIZE) */ - - /* Add this record to the head of the list of records pertaining to this - particular function name. */ - - def_dec_p->next_for_func = def_dec_p->hash_entry->ddip; - def_dec_p->hash_entry->ddip = def_dec_p; - - /* Add this new def_dec_info record to the sorted list of def_dec_info - records for this file. Note that we don't have to worry about duplicates - (caused by multiple inclusions of header files) here because we have - already eliminated duplicates above. */ - - if (!def_dec_p->file->defs_decs) - { - def_dec_p->file->defs_decs = def_dec_p; - def_dec_p->next_in_file = NULL; - } - else - { - int line = def_dec_p->line; - const def_dec_info *prev = NULL; - const def_dec_info *curr = def_dec_p->file->defs_decs; - const def_dec_info *next = curr->next_in_file; - - while (next && (line < curr->line)) - { - prev = curr; - curr = next; - next = next->next_in_file; - } - if (line >= curr->line) - { - def_dec_p->next_in_file = curr; - if (prev) - ((NONCONST def_dec_info *) prev)->next_in_file = def_dec_p; - else - def_dec_p->file->defs_decs = def_dec_p; - } - else /* assert (next == NULL); */ - { - ((NONCONST def_dec_info *) curr)->next_in_file = def_dec_p; - /* assert (next == NULL); */ - def_dec_p->next_in_file = next; - } - } -} - -/* Set up the vector COMPILE_PARAMS which is the argument list for running GCC. - Also set input_file_name_index and aux_info_file_name_index - to the indices of the slots where the file names should go. */ - -/* We initialize the vector by removing -g, -O, -S, -c, and -o options, - and adding '-aux-info AUXFILE -S -o /dev/null INFILE' at the end. */ - -static void -munge_compile_params (const char *params_list) -{ - /* Build up the contents in a temporary vector - that is so big that to has to be big enough. */ - const char **temp_params - = alloca ((strlen (params_list) + 8) * sizeof (char *)); - int param_count = 0; - const char *param; - struct stat st; - - temp_params[param_count++] = compiler_file_name; - for (;;) - { - while (ISSPACE ((const unsigned char)*params_list)) - params_list++; - if (!*params_list) - break; - param = params_list; - while (*params_list && !ISSPACE ((const unsigned char)*params_list)) - params_list++; - if (param[0] != '-') - temp_params[param_count++] - = dupnstr (param, (size_t) (params_list - param)); - else - { - switch (param[1]) - { - case 'g': - case 'O': - case 'S': - case 'c': - break; /* Don't copy these. */ - case 'o': - while (ISSPACE ((const unsigned char)*params_list)) - params_list++; - while (*params_list - && !ISSPACE ((const unsigned char)*params_list)) - params_list++; - break; - default: - temp_params[param_count++] - = dupnstr (param, (size_t) (params_list - param)); - } - } - if (!*params_list) - break; - } - temp_params[param_count++] = "-aux-info"; - - /* Leave room for the aux-info file name argument. */ - aux_info_file_name_index = param_count; - temp_params[param_count++] = NULL; - - temp_params[param_count++] = "-S"; - temp_params[param_count++] = "-o"; - - if ((stat (HOST_BIT_BUCKET, &st) == 0) - && (!S_ISDIR (st.st_mode)) - && (access (HOST_BIT_BUCKET, W_OK) == 0)) - temp_params[param_count++] = HOST_BIT_BUCKET; - else - /* FIXME: This is hardly likely to be right, if HOST_BIT_BUCKET is not - writable. But until this is rejigged to use make_temp_file(), this - is the best we can do. */ - temp_params[param_count++] = "/dev/null"; - - /* Leave room for the input file name argument. */ - input_file_name_index = param_count; - temp_params[param_count++] = NULL; - /* Terminate the list. */ - temp_params[param_count++] = NULL; - - /* Make a copy of the compile_params in heap space. */ - - compile_params = xmalloc (sizeof (char *) * (param_count+1)); - memcpy (compile_params, temp_params, sizeof (char *) * param_count); -} - -/* Do a recompilation for the express purpose of generating a new aux_info - file to go with a specific base source file. - - The result is a boolean indicating success. */ - -static int -gen_aux_info_file (const char *base_filename) -{ - if (!input_file_name_index) - munge_compile_params (""); - - /* Store the full source file name in the argument vector. */ - compile_params[input_file_name_index] = shortpath (NULL, base_filename); - /* Add .X to source file name to get aux-info file name. */ - compile_params[aux_info_file_name_index] = - concat (compile_params[input_file_name_index], aux_info_suffix, NULL); - - if (!quiet_flag) - notice ("%s: compiling '%s'\n", - pname, compile_params[input_file_name_index]); - - { - char *errmsg_fmt, *errmsg_arg; - int wait_status, pid; - - pid = pexecute (compile_params[0], (char * const *) compile_params, - pname, NULL, &errmsg_fmt, &errmsg_arg, - PEXECUTE_FIRST | PEXECUTE_LAST | PEXECUTE_SEARCH); - - if (pid == -1) - { - int errno_val = errno; - fprintf (stderr, "%s: ", pname); - fprintf (stderr, errmsg_fmt, errmsg_arg); - fprintf (stderr, ": %s\n", xstrerror (errno_val)); - return 0; - } - - pid = pwait (pid, &wait_status, 0); - if (pid == -1) - { - notice ("%s: wait: %s\n", pname, xstrerror (errno)); - return 0; - } - if (WIFSIGNALED (wait_status)) - { - notice ("%s: subprocess got fatal signal %d\n", - pname, WTERMSIG (wait_status)); - return 0; - } - if (WIFEXITED (wait_status)) - { - if (WEXITSTATUS (wait_status) != 0) - { - notice ("%s: %s exited with status %d\n", - pname, compile_params[0], WEXITSTATUS (wait_status)); - return 0; - } - return 1; - } - gcc_unreachable (); - } -} - -/* Read in all of the information contained in a single aux_info file. - Save all of the important stuff for later. */ - -static void -process_aux_info_file (const char *base_source_filename, int keep_it, - int is_syscalls) -{ - size_t base_len = strlen (base_source_filename); - char * aux_info_filename = alloca (base_len + strlen (aux_info_suffix) + 1); - char *aux_info_base; - char *aux_info_limit; - char *aux_info_relocated_name; - const char *aux_info_second_line; - time_t aux_info_mtime; - size_t aux_info_size; - int must_create; - - /* Construct the aux_info filename from the base source filename. */ - - strcpy (aux_info_filename, base_source_filename); - strcat (aux_info_filename, aux_info_suffix); - - /* Check that the aux_info file exists and is readable. If it does not - exist, try to create it (once only). */ - - /* If file doesn't exist, set must_create. - Likewise if it exists and we can read it but it is obsolete. - Otherwise, report an error. */ - must_create = 0; - - /* Come here with must_create set to 1 if file is out of date. */ -start_over: ; - - if (access (aux_info_filename, R_OK) == -1) - { - if (errno == ENOENT) - { - if (is_syscalls) - { - notice ("%s: warning: missing SYSCALLS file '%s'\n", - pname, aux_info_filename); - return; - } - must_create = 1; - } - else - { - int errno_val = errno; - notice ("%s: can't read aux info file '%s': %s\n", - pname, shortpath (NULL, aux_info_filename), - xstrerror (errno_val)); - errors++; - return; - } - } -#if 0 /* There is code farther down to take care of this. */ - else - { - struct stat s1, s2; - stat (aux_info_file_name, &s1); - stat (base_source_file_name, &s2); - if (s2.st_mtime > s1.st_mtime) - must_create = 1; - } -#endif /* 0 */ - - /* If we need a .X file, create it, and verify we can read it. */ - if (must_create) - { - if (!gen_aux_info_file (base_source_filename)) - { - errors++; - return; - } - if (access (aux_info_filename, R_OK) == -1) - { - int errno_val = errno; - notice ("%s: can't read aux info file '%s': %s\n", - pname, shortpath (NULL, aux_info_filename), - xstrerror (errno_val)); - errors++; - return; - } - } - - { - struct stat stat_buf; - - /* Get some status information about this aux_info file. */ - - if (stat (aux_info_filename, &stat_buf) == -1) - { - int errno_val = errno; - notice ("%s: can't get status of aux info file '%s': %s\n", - pname, shortpath (NULL, aux_info_filename), - xstrerror (errno_val)); - errors++; - return; - } - - /* Check on whether or not this aux_info file is zero length. If it is, - then just ignore it and return. */ - - if ((aux_info_size = stat_buf.st_size) == 0) - return; - - /* Get the date/time of last modification for this aux_info file and - remember it. We will have to check that any source files that it - contains information about are at least this old or older. */ - - aux_info_mtime = stat_buf.st_mtime; - - if (!is_syscalls) - { - /* Compare mod time with the .c file; update .X file if obsolete. - The code later on can fail to check the .c file - if it did not directly define any functions. */ - - if (stat (base_source_filename, &stat_buf) == -1) - { - int errno_val = errno; - notice ("%s: can't get status of aux info file '%s': %s\n", - pname, shortpath (NULL, base_source_filename), - xstrerror (errno_val)); - errors++; - return; - } - if (stat_buf.st_mtime > aux_info_mtime) - { - must_create = 1; - goto start_over; - } - } - } - - { - int aux_info_file; - int fd_flags; - - /* Open the aux_info file. */ - - fd_flags = O_RDONLY; -#ifdef O_BINARY - /* Use binary mode to avoid having to deal with different EOL characters. */ - fd_flags |= O_BINARY; -#endif - if ((aux_info_file = open (aux_info_filename, fd_flags, 0444 )) == -1) - { - int errno_val = errno; - notice ("%s: can't open aux info file '%s' for reading: %s\n", - pname, shortpath (NULL, aux_info_filename), - xstrerror (errno_val)); - return; - } - - /* Allocate space to hold the aux_info file in memory. */ - - aux_info_base = xmalloc (aux_info_size + 1); - aux_info_limit = aux_info_base + aux_info_size; - *aux_info_limit = '\0'; - - /* Read the aux_info file into memory. */ - - if (safe_read (aux_info_file, aux_info_base, aux_info_size) != - (int) aux_info_size) - { - int errno_val = errno; - notice ("%s: error reading aux info file '%s': %s\n", - pname, shortpath (NULL, aux_info_filename), - xstrerror (errno_val)); - free (aux_info_base); - close (aux_info_file); - return; - } - - /* Close the aux info file. */ - - if (close (aux_info_file)) - { - int errno_val = errno; - notice ("%s: error closing aux info file '%s': %s\n", - pname, shortpath (NULL, aux_info_filename), - xstrerror (errno_val)); - free (aux_info_base); - close (aux_info_file); - return; - } - } - - /* Delete the aux_info file (unless requested not to). If the deletion - fails for some reason, don't even worry about it. */ - - if (must_create && !keep_it) - if (unlink (aux_info_filename) == -1) - { - int errno_val = errno; - notice ("%s: can't delete aux info file '%s': %s\n", - pname, shortpath (NULL, aux_info_filename), - xstrerror (errno_val)); - } - - /* Save a pointer into the first line of the aux_info file which - contains the filename of the directory from which the compiler - was invoked when the associated source file was compiled. - This information is used later to help create complete - filenames out of the (potentially) relative filenames in - the aux_info file. */ - - { - char *p = aux_info_base; - - while (*p != ':' -#ifdef HAVE_DOS_BASED_FILE_SYSTEM - || (*p == ':' && *p && *(p+1) && IS_DIR_SEPARATOR (*(p+1))) -#endif - ) - p++; - p++; - while (*p == ' ') - p++; - invocation_filename = p; /* Save a pointer to first byte of path. */ - while (*p != ' ') - p++; - *p++ = DIR_SEPARATOR; - *p++ = '\0'; - while (*p++ != '\n') - continue; - aux_info_second_line = p; - aux_info_relocated_name = 0; - if (! IS_ABSOLUTE_PATH (invocation_filename)) - { - /* INVOCATION_FILENAME is relative; - append it to BASE_SOURCE_FILENAME's dir. */ - char *dir_end; - aux_info_relocated_name = xmalloc (base_len + (p-invocation_filename)); - strcpy (aux_info_relocated_name, base_source_filename); - dir_end = strrchr (aux_info_relocated_name, DIR_SEPARATOR); -#ifdef DIR_SEPARATOR_2 - { - char *slash; - - slash = strrchr (dir_end ? dir_end : aux_info_relocated_name, - DIR_SEPARATOR_2); - if (slash) - dir_end = slash; - } -#endif - if (dir_end) - dir_end++; - else - dir_end = aux_info_relocated_name; - strcpy (dir_end, invocation_filename); - invocation_filename = aux_info_relocated_name; - } - } - - - { - const char *aux_info_p; - - /* Do a pre-pass on the lines in the aux_info file, making sure that all - of the source files referenced in there are at least as old as this - aux_info file itself. If not, go back and regenerate the aux_info - file anew. Don't do any of this for the syscalls file. */ - - if (!is_syscalls) - { - current_aux_info_lineno = 2; - - for (aux_info_p = aux_info_second_line; *aux_info_p; ) - { - if (referenced_file_is_newer (aux_info_p, aux_info_mtime)) - { - free (aux_info_base); - free (aux_info_relocated_name); - if (keep_it && unlink (aux_info_filename) == -1) - { - int errno_val = errno; - notice ("%s: can't delete file '%s': %s\n", - pname, shortpath (NULL, aux_info_filename), - xstrerror (errno_val)); - return; - } - must_create = 1; - goto start_over; - } - - /* Skip over the rest of this line to start of next line. */ - - while (*aux_info_p != '\n') - aux_info_p++; - aux_info_p++; - current_aux_info_lineno++; - } - } - - /* Now do the real pass on the aux_info lines. Save their information in - the in-core data base. */ - - current_aux_info_lineno = 2; - - for (aux_info_p = aux_info_second_line; *aux_info_p;) - { - char *unexpanded_line = unexpand_if_needed (aux_info_p); - - if (unexpanded_line) - { - save_def_or_dec (unexpanded_line, is_syscalls); - free (unexpanded_line); - } - else - save_def_or_dec (aux_info_p, is_syscalls); - - /* Skip over the rest of this line and get to start of next line. */ - - while (*aux_info_p != '\n') - aux_info_p++; - aux_info_p++; - current_aux_info_lineno++; - } - } - - free (aux_info_base); - free (aux_info_relocated_name); -} - -#ifndef UNPROTOIZE - -/* Check an individual filename for a .c suffix. If the filename has this - suffix, rename the file such that its suffix is changed to .C. This - function implements the -C option. */ - -static void -rename_c_file (const hash_table_entry *hp) -{ - const char *filename = hp->symbol; - int last_char_index = strlen (filename) - 1; - char *const new_filename = alloca (strlen (filename) - + strlen (cplus_suffix) + 1); - - /* Note that we don't care here if the given file was converted or not. It - is possible that the given file was *not* converted, simply because there - was nothing in it which actually required conversion. Even in this case, - we want to do the renaming. Note that we only rename files with the .c - suffix (except for the syscalls file, which is left alone). */ - - if (filename[last_char_index] != 'c' || filename[last_char_index-1] != '.' - || IS_SAME_PATH (syscalls_absolute_filename, filename)) - return; - - strcpy (new_filename, filename); - strcpy (&new_filename[last_char_index], cplus_suffix); - - if (rename (filename, new_filename) == -1) - { - int errno_val = errno; - notice ("%s: warning: can't rename file '%s' to '%s': %s\n", - pname, shortpath (NULL, filename), - shortpath (NULL, new_filename), xstrerror (errno_val)); - errors++; - return; - } -} - -#endif /* !defined (UNPROTOIZE) */ - -/* Take the list of definitions and declarations attached to a particular - file_info node and reverse the order of the list. This should get the - list into an order such that the item with the lowest associated line - number is nearest the head of the list. When these lists are originally - built, they are in the opposite order. We want to traverse them in - normal line number order later (i.e. lowest to highest) so reverse the - order here. */ - -static void -reverse_def_dec_list (const hash_table_entry *hp) -{ - file_info *file_p = hp->fip; - def_dec_info *prev = NULL; - def_dec_info *current = (def_dec_info *) file_p->defs_decs; - - if (!current) - return; /* no list to reverse */ - - prev = current; - if (! (current = (def_dec_info *) current->next_in_file)) - return; /* can't reverse a single list element */ - - prev->next_in_file = NULL; - - while (current) - { - def_dec_info *next = (def_dec_info *) current->next_in_file; - - current->next_in_file = prev; - prev = current; - current = next; - } - - file_p->defs_decs = prev; -} - -#ifndef UNPROTOIZE - -/* Find the (only?) extern definition for a particular function name, starting - from the head of the linked list of entries for the given name. If we - cannot find an extern definition for the given function name, issue a - warning and scrounge around for the next best thing, i.e. an extern - function declaration with a prototype attached to it. Note that we only - allow such substitutions for extern declarations and never for static - declarations. That's because the only reason we allow them at all is - to let un-prototyped function declarations for system-supplied library - functions get their prototypes from our own extra SYSCALLS.c.X file which - contains all of the correct prototypes for system functions. */ - -static const def_dec_info * -find_extern_def (const def_dec_info *head, const def_dec_info *user) -{ - const def_dec_info *dd_p; - const def_dec_info *extern_def_p = NULL; - int conflict_noted = 0; - - /* Don't act too stupid here. Somebody may try to convert an entire system - in one swell fwoop (rather than one program at a time, as should be done) - and in that case, we may find that there are multiple extern definitions - of a given function name in the entire set of source files that we are - converting. If however one of these definitions resides in exactly the - same source file as the reference we are trying to satisfy then in that - case it would be stupid for us to fail to realize that this one definition - *must* be the precise one we are looking for. - - To make sure that we don't miss an opportunity to make this "same file" - leap of faith, we do a prescan of the list of records relating to the - given function name, and we look (on this first scan) *only* for a - definition of the function which is in the same file as the reference - we are currently trying to satisfy. */ - - for (dd_p = head; dd_p; dd_p = dd_p->next_for_func) - if (dd_p->is_func_def && !dd_p->is_static && dd_p->file == user->file) - return dd_p; - - /* Now, since we have not found a definition in the same file as the - reference, we scan the list again and consider all possibilities from - all files. Here we may get conflicts with the things listed in the - SYSCALLS.c.X file, but if that happens it only means that the source - code being converted contains its own definition of a function which - could have been supplied by libc.a. In such cases, we should avoid - issuing the normal warning, and defer to the definition given in the - user's own code. */ - - for (dd_p = head; dd_p; dd_p = dd_p->next_for_func) - if (dd_p->is_func_def && !dd_p->is_static) - { - if (!extern_def_p) /* Previous definition? */ - extern_def_p = dd_p; /* Remember the first definition found. */ - else - { - /* Ignore definition just found if it came from SYSCALLS.c.X. */ - - if (is_syscalls_file (dd_p->file)) - continue; - - /* Quietly replace the definition previously found with the one - just found if the previous one was from SYSCALLS.c.X. */ - - if (is_syscalls_file (extern_def_p->file)) - { - extern_def_p = dd_p; - continue; - } - - /* If we get here, then there is a conflict between two function - declarations for the same function, both of which came from the - user's own code. */ - - if (!conflict_noted) /* first time we noticed? */ - { - conflict_noted = 1; - notice ("%s: conflicting extern definitions of '%s'\n", - pname, head->hash_entry->symbol); - if (!quiet_flag) - { - notice ("%s: declarations of '%s' will not be converted\n", - pname, head->hash_entry->symbol); - notice ("%s: conflict list for '%s' follows:\n", - pname, head->hash_entry->symbol); - fprintf (stderr, "%s: %s(%d): %s\n", - pname, - shortpath (NULL, extern_def_p->file->hash_entry->symbol), - extern_def_p->line, extern_def_p->ansi_decl); - } - } - if (!quiet_flag) - fprintf (stderr, "%s: %s(%d): %s\n", - pname, - shortpath (NULL, dd_p->file->hash_entry->symbol), - dd_p->line, dd_p->ansi_decl); - } - } - - /* We want to err on the side of caution, so if we found multiple conflicting - definitions for the same function, treat this as being that same as if we - had found no definitions (i.e. return NULL). */ - - if (conflict_noted) - return NULL; - - if (!extern_def_p) - { - /* We have no definitions for this function so do the next best thing. - Search for an extern declaration already in prototype form. */ - - for (dd_p = head; dd_p; dd_p = dd_p->next_for_func) - if (!dd_p->is_func_def && !dd_p->is_static && dd_p->prototyped) - { - extern_def_p = dd_p; /* save a pointer to the definition */ - if (!quiet_flag) - notice ("%s: warning: using formals list from %s(%d) for function '%s'\n", - pname, - shortpath (NULL, dd_p->file->hash_entry->symbol), - dd_p->line, dd_p->hash_entry->symbol); - break; - } - - /* Gripe about unprototyped function declarations that we found no - corresponding definition (or other source of prototype information) - for. - - Gripe even if the unprototyped declaration we are worried about - exists in a file in one of the "system" include directories. We - can gripe about these because we should have at least found a - corresponding (pseudo) definition in the SYSCALLS.c.X file. If we - didn't, then that means that the SYSCALLS.c.X file is missing some - needed prototypes for this particular system. That is worth telling - the user about! */ - - if (!extern_def_p) - { - const char *file = user->file->hash_entry->symbol; - - if (!quiet_flag) - if (in_system_include_dir (file)) - { - /* Why copy this string into `needed' at all? - Why not just use user->ansi_decl without copying? */ - char *needed = alloca (strlen (user->ansi_decl) + 1); - char *p; - - strcpy (needed, user->ansi_decl); - p = strstr (needed, user->hash_entry->symbol) - + strlen (user->hash_entry->symbol) + 2; - /* Avoid having ??? in the string. */ - *p++ = '?'; - *p++ = '?'; - *p++ = '?'; - strcpy (p, ");"); - - notice ("%s: %d: '%s' used but missing from SYSCALLS\n", - shortpath (NULL, file), user->line, - needed+7); /* Don't print "extern " */ - } -#if 0 - else - notice ("%s: %d: warning: no extern definition for '%s'\n", - shortpath (NULL, file), user->line, - user->hash_entry->symbol); -#endif - } - } - return extern_def_p; -} - -/* Find the (only?) static definition for a particular function name in a - given file. Here we get the function-name and the file info indirectly - from the def_dec_info record pointer which is passed in. */ - -static const def_dec_info * -find_static_definition (const def_dec_info *user) -{ - const def_dec_info *head = user->hash_entry->ddip; - const def_dec_info *dd_p; - int num_static_defs = 0; - const def_dec_info *static_def_p = NULL; - - for (dd_p = head; dd_p; dd_p = dd_p->next_for_func) - if (dd_p->is_func_def && dd_p->is_static && (dd_p->file == user->file)) - { - static_def_p = dd_p; /* save a pointer to the definition */ - num_static_defs++; - } - if (num_static_defs == 0) - { - if (!quiet_flag) - notice ("%s: warning: no static definition for '%s' in file '%s'\n", - pname, head->hash_entry->symbol, - shortpath (NULL, user->file->hash_entry->symbol)); - } - else if (num_static_defs > 1) - { - notice ("%s: multiple static defs of '%s' in file '%s'\n", - pname, head->hash_entry->symbol, - shortpath (NULL, user->file->hash_entry->symbol)); - return NULL; - } - return static_def_p; -} - -/* Find good prototype style formal argument lists for all of the function - declarations which didn't have them before now. - - To do this we consider each function name one at a time. For each function - name, we look at the items on the linked list of def_dec_info records for - that particular name. - - Somewhere on this list we should find one (and only one) def_dec_info - record which represents the actual function definition, and this record - should have a nice formal argument list already associated with it. - - Thus, all we have to do is to connect up all of the other def_dec_info - records for this particular function name to the special one which has - the full-blown formals list. - - Of course it is a little more complicated than just that. See below for - more details. */ - -static void -connect_defs_and_decs (const hash_table_entry *hp) -{ - const def_dec_info *dd_p; - const def_dec_info *extern_def_p = NULL; - int first_extern_reference = 1; - - /* Traverse the list of definitions and declarations for this particular - function name. For each item on the list, if it is a function - definition (either old style or new style) then GCC has already been - kind enough to produce a prototype for us, and it is associated with - the item already, so declare the item as its own associated "definition". - - Also, for each item which is only a function declaration, but which - nonetheless has its own prototype already (obviously supplied by the user) - declare the item as its own definition. - - Note that when/if there are multiple user-supplied prototypes already - present for multiple declarations of any given function, these multiple - prototypes *should* all match exactly with one another and with the - prototype for the actual function definition. We don't check for this - here however, since we assume that the compiler must have already done - this consistency checking when it was creating the .X files. */ - - for (dd_p = hp->ddip; dd_p; dd_p = dd_p->next_for_func) - if (dd_p->prototyped) - ((NONCONST def_dec_info *) dd_p)->definition = dd_p; - - /* Traverse the list of definitions and declarations for this particular - function name. For each item on the list, if it is an extern function - declaration and if it has no associated definition yet, go try to find - the matching extern definition for the declaration. - - When looking for the matching function definition, warn the user if we - fail to find one. - - If we find more that one function definition also issue a warning. - - Do the search for the matching definition only once per unique function - name (and only when absolutely needed) so that we can avoid putting out - redundant warning messages, and so that we will only put out warning - messages when there is actually a reference (i.e. a declaration) for - which we need to find a matching definition. */ - - for (dd_p = hp->ddip; dd_p; dd_p = dd_p->next_for_func) - if (!dd_p->is_func_def && !dd_p->is_static && !dd_p->definition) - { - if (first_extern_reference) - { - extern_def_p = find_extern_def (hp->ddip, dd_p); - first_extern_reference = 0; - } - ((NONCONST def_dec_info *) dd_p)->definition = extern_def_p; - } - - /* Traverse the list of definitions and declarations for this particular - function name. For each item on the list, if it is a static function - declaration and if it has no associated definition yet, go try to find - the matching static definition for the declaration within the same file. - - When looking for the matching function definition, warn the user if we - fail to find one in the same file with the declaration, and refuse to - convert this kind of cross-file static function declaration. After all, - this is stupid practice and should be discouraged. - - We don't have to worry about the possibility that there is more than one - matching function definition in the given file because that would have - been flagged as an error by the compiler. - - Do the search for the matching definition only once per unique - function-name/source-file pair (and only when absolutely needed) so that - we can avoid putting out redundant warning messages, and so that we will - only put out warning messages when there is actually a reference (i.e. a - declaration) for which we actually need to find a matching definition. */ - - for (dd_p = hp->ddip; dd_p; dd_p = dd_p->next_for_func) - if (!dd_p->is_func_def && dd_p->is_static && !dd_p->definition) - { - const def_dec_info *dd_p2; - const def_dec_info *static_def; - - /* We have now found a single static declaration for which we need to - find a matching definition. We want to minimize the work (and the - number of warnings), so we will find an appropriate (matching) - static definition for this declaration, and then distribute it - (as the definition for) any and all other static declarations - for this function name which occur within the same file, and which - do not already have definitions. - - Note that a trick is used here to prevent subsequent attempts to - call find_static_definition for a given function-name & file - if the first such call returns NULL. Essentially, we convert - these NULL return values to -1, and put the -1 into the definition - field for each other static declaration from the same file which - does not already have an associated definition. - This makes these other static declarations look like they are - actually defined already when the outer loop here revisits them - later on. Thus, the outer loop will skip over them. Later, we - turn the -1's back to NULL's. */ - - ((NONCONST def_dec_info *) dd_p)->definition = - (static_def = find_static_definition (dd_p)) - ? static_def - : (const def_dec_info *) -1; - - for (dd_p2 = dd_p->next_for_func; dd_p2; dd_p2 = dd_p2->next_for_func) - if (!dd_p2->is_func_def && dd_p2->is_static - && !dd_p2->definition && (dd_p2->file == dd_p->file)) - ((NONCONST def_dec_info *) dd_p2)->definition = dd_p->definition; - } - - /* Convert any dummy (-1) definitions we created in the step above back to - NULL's (as they should be). */ - - for (dd_p = hp->ddip; dd_p; dd_p = dd_p->next_for_func) - if (dd_p->definition == (def_dec_info *) -1) - ((NONCONST def_dec_info *) dd_p)->definition = NULL; -} - -#endif /* !defined (UNPROTOIZE) */ - -/* Give a pointer into the clean text buffer, return a number which is the - original source line number that the given pointer points into. */ - -static int -identify_lineno (const char *clean_p) -{ - int line_num = 1; - const char *scan_p; - - for (scan_p = clean_text_base; scan_p <= clean_p; scan_p++) - if (*scan_p == '\n') - line_num++; - return line_num; -} - -/* Issue an error message and give up on doing this particular edit. */ - -static void -declare_source_confusing (const char *clean_p) -{ - if (!quiet_flag) - { - if (clean_p == 0) - notice ("%s: %d: warning: source too confusing\n", - shortpath (NULL, convert_filename), last_known_line_number); - else - notice ("%s: %d: warning: source too confusing\n", - shortpath (NULL, convert_filename), - identify_lineno (clean_p)); - } - longjmp (source_confusion_recovery, 1); -} - -/* Check that a condition which is expected to be true in the original source - code is in fact true. If not, issue an error message and give up on - converting this particular source file. */ - -static void -check_source (int cond, const char *clean_p) -{ - if (!cond) - declare_source_confusing (clean_p); -} - -/* If we think of the in-core cleaned text buffer as a memory mapped - file (with the variable last_known_line_start acting as sort of a - file pointer) then we can imagine doing "seeks" on the buffer. The - following routine implements a kind of "seek" operation for the in-core - (cleaned) copy of the source file. When finished, it returns a pointer to - the start of a given (numbered) line in the cleaned text buffer. - - Note that protoize only has to "seek" in the forward direction on the - in-core cleaned text file buffers, and it never needs to back up. - - This routine is made a little bit faster by remembering the line number - (and pointer value) supplied (and returned) from the previous "seek". - This prevents us from always having to start all over back at the top - of the in-core cleaned buffer again. */ - -static const char * -seek_to_line (int n) -{ - gcc_assert (n >= last_known_line_number); - - while (n > last_known_line_number) - { - while (*last_known_line_start != '\n') - check_source (++last_known_line_start < clean_text_limit, 0); - last_known_line_start++; - last_known_line_number++; - } - return last_known_line_start; -} - -/* Given a pointer to a character in the cleaned text buffer, return a pointer - to the next non-whitespace character which follows it. */ - -static const char * -forward_to_next_token_char (const char *ptr) -{ - for (++ptr; ISSPACE ((const unsigned char)*ptr); - check_source (++ptr < clean_text_limit, 0)) - continue; - return ptr; -} - -/* Copy a chunk of text of length `len' and starting at `str' to the current - output buffer. Note that all attempts to add stuff to the current output - buffer ultimately go through here. */ - -static void -output_bytes (const char *str, size_t len) -{ - if ((repl_write_ptr + 1) + len >= repl_text_limit) - { - size_t new_size = (repl_text_limit - repl_text_base) << 1; - char *new_buf = xrealloc (repl_text_base, new_size); - - repl_write_ptr = new_buf + (repl_write_ptr - repl_text_base); - repl_text_base = new_buf; - repl_text_limit = new_buf + new_size; - } - memcpy (repl_write_ptr + 1, str, len); - repl_write_ptr += len; -} - -/* Copy all bytes (except the trailing null) of a null terminated string to - the current output buffer. */ - -static void -output_string (const char *str) -{ - output_bytes (str, strlen (str)); -} - -/* Copy some characters from the original text buffer to the current output - buffer. - - This routine takes a pointer argument `p' which is assumed to be a pointer - into the cleaned text buffer. The bytes which are copied are the `original' - equivalents for the set of bytes between the last value of `clean_read_ptr' - and the argument value `p'. - - The set of bytes copied however, comes *not* from the cleaned text buffer, - but rather from the direct counterparts of these bytes within the original - text buffer. - - Thus, when this function is called, some bytes from the original text - buffer (which may include original comments and preprocessing directives) - will be copied into the output buffer. - - Note that the request implied when this routine is called includes the - byte pointed to by the argument pointer `p'. */ - -static void -output_up_to (const char *p) -{ - size_t copy_length = (size_t) (p - clean_read_ptr); - const char *copy_start = orig_text_base+(clean_read_ptr-clean_text_base)+1; - - if (copy_length == 0) - return; - - output_bytes (copy_start, copy_length); - clean_read_ptr = p; -} - -/* Given a pointer to a def_dec_info record which represents some form of - definition of a function (perhaps a real definition, or in lieu of that - perhaps just a declaration with a full prototype) return true if this - function is one which we should avoid converting. Return false - otherwise. */ - -static int -other_variable_style_function (const char *ansi_header) -{ -#ifdef UNPROTOIZE - - /* See if we have a stdarg function, or a function which has stdarg style - parameters or a stdarg style return type. */ - - return strstr (ansi_header, "...") != 0; - -#else /* !defined (UNPROTOIZE) */ - - /* See if we have a varargs function, or a function which has varargs style - parameters or a varargs style return type. */ - - const char *p; - int len = strlen (varargs_style_indicator); - - for (p = ansi_header; p; ) - { - const char *candidate; - - if ((candidate = strstr (p, varargs_style_indicator)) == 0) - return 0; - else - if (!is_id_char (candidate[-1]) && !is_id_char (candidate[len])) - return 1; - else - p = candidate + 1; - } - return 0; -#endif /* !defined (UNPROTOIZE) */ -} - -/* Do the editing operation specifically for a function "declaration". Note - that editing for function "definitions" are handled in a separate routine - below. */ - -static void -edit_fn_declaration (const def_dec_info *def_dec_p, - const char *volatile clean_text_p) -{ - const char *start_formals; - const char *end_formals; - const char *function_to_edit = def_dec_p->hash_entry->symbol; - size_t func_name_len = strlen (function_to_edit); - const char *end_of_fn_name; - -#ifndef UNPROTOIZE - - const f_list_chain_item *this_f_list_chain_item; - const def_dec_info *definition = def_dec_p->definition; - - /* If we are protoizing, and if we found no corresponding definition for - this particular function declaration, then just leave this declaration - exactly as it is. */ - - if (!definition) - return; - - /* If we are protoizing, and if the corresponding definition that we found - for this particular function declaration defined an old style varargs - function, then we want to issue a warning and just leave this function - declaration unconverted. */ - - if (other_variable_style_function (definition->ansi_decl)) - { - if (!quiet_flag) - notice ("%s: %d: warning: varargs function declaration not converted\n", - shortpath (NULL, def_dec_p->file->hash_entry->symbol), - def_dec_p->line); - return; - } - -#endif /* !defined (UNPROTOIZE) */ - - /* Setup here to recover from confusing source code detected during this - particular "edit". */ - - save_pointers (); - if (setjmp (source_confusion_recovery)) - { - restore_pointers (); - notice ("%s: declaration of function '%s' not converted\n", - pname, function_to_edit); - return; - } - - /* We are editing a function declaration. The line number we did a seek to - contains the comma or semicolon which follows the declaration. Our job - now is to scan backwards looking for the function name. This name *must* - be followed by open paren (ignoring whitespace, of course). We need to - replace everything between that open paren and the corresponding closing - paren. If we are protoizing, we need to insert the prototype-style - formals lists. If we are unprotoizing, we need to just delete everything - between the pairs of opening and closing parens. */ - - /* First move up to the end of the line. */ - - while (*clean_text_p != '\n') - check_source (++clean_text_p < clean_text_limit, 0); - clean_text_p--; /* Point to just before the newline character. */ - - /* Now we can scan backwards for the function name. */ - - do - { - for (;;) - { - /* Scan leftwards until we find some character which can be - part of an identifier. */ - - while (!is_id_char (*clean_text_p)) - check_source (--clean_text_p > clean_read_ptr, 0); - - /* Scan backwards until we find a char that cannot be part of an - identifier. */ - - while (is_id_char (*clean_text_p)) - check_source (--clean_text_p > clean_read_ptr, 0); - - /* Having found an "id break", see if the following id is the one - that we are looking for. If so, then exit from this loop. */ - - if (!strncmp (clean_text_p+1, function_to_edit, func_name_len)) - { - char ch = *(clean_text_p + 1 + func_name_len); - - /* Must also check to see that the name in the source text - ends where it should (in order to prevent bogus matches - on similar but longer identifiers. */ - - if (! is_id_char (ch)) - break; /* exit from loop */ - } - } - - /* We have now found the first perfect match for the function name in - our backward search. This may or may not be the actual function - name at the start of the actual function declaration (i.e. we could - have easily been mislead). We will try to avoid getting fooled too - often by looking forward for the open paren which should follow the - identifier we just found. We ignore whitespace while hunting. If - the next non-whitespace byte we see is *not* an open left paren, - then we must assume that we have been fooled and we start over - again accordingly. Note that there is no guarantee, that even if - we do see the open paren, that we are in the right place. - Programmers do the strangest things sometimes! */ - - end_of_fn_name = clean_text_p + strlen (def_dec_p->hash_entry->symbol); - start_formals = forward_to_next_token_char (end_of_fn_name); - } - while (*start_formals != '('); - - /* start_of_formals now points to the opening left paren which immediately - follows the name of the function. */ - - /* Note that there may be several formals lists which need to be modified - due to the possibility that the return type of this function is a - pointer-to-function type. If there are several formals lists, we - convert them in left-to-right order here. */ - -#ifndef UNPROTOIZE - this_f_list_chain_item = definition->f_list_chain; -#endif /* !defined (UNPROTOIZE) */ - - for (;;) - { - { - int depth; - - end_formals = start_formals + 1; - depth = 1; - for (; depth; check_source (++end_formals < clean_text_limit, 0)) - { - switch (*end_formals) - { - case '(': - depth++; - break; - case ')': - depth--; - break; - } - } - end_formals--; - } - - /* end_formals now points to the closing right paren of the formals - list whose left paren is pointed to by start_formals. */ - - /* Now, if we are protoizing, we insert the new ANSI-style formals list - attached to the associated definition of this function. If however - we are unprotoizing, then we simply delete any formals list which - may be present. */ - - output_up_to (start_formals); -#ifndef UNPROTOIZE - if (this_f_list_chain_item) - { - output_string (this_f_list_chain_item->formals_list); - this_f_list_chain_item = this_f_list_chain_item->chain_next; - } - else - { - if (!quiet_flag) - notice ("%s: warning: too many parameter lists in declaration of '%s'\n", - pname, def_dec_p->hash_entry->symbol); - check_source (0, end_formals); /* leave the declaration intact */ - } -#endif /* !defined (UNPROTOIZE) */ - clean_read_ptr = end_formals - 1; - - /* Now see if it looks like there may be another formals list associated - with the function declaration that we are converting (following the - formals list that we just converted. */ - - { - const char *another_r_paren = forward_to_next_token_char (end_formals); - - if ((*another_r_paren != ')') - || (*(start_formals = forward_to_next_token_char (another_r_paren)) != '(')) - { -#ifndef UNPROTOIZE - if (this_f_list_chain_item) - { - if (!quiet_flag) - notice ("\n%s: warning: too few parameter lists in declaration of '%s'\n", - pname, def_dec_p->hash_entry->symbol); - check_source (0, start_formals); /* leave the decl intact */ - } -#endif /* !defined (UNPROTOIZE) */ - break; - - } - } - - /* There does appear to be yet another formals list, so loop around - again, and convert it also. */ - } -} - -/* Edit a whole group of formals lists, starting with the rightmost one - from some set of formals lists. This routine is called once (from the - outside) for each function declaration which is converted. It is - recursive however, and it calls itself once for each remaining formal - list that lies to the left of the one it was originally called to work - on. Thus, a whole set gets done in right-to-left order. - - This routine returns nonzero if it thinks that it should not be trying - to convert this particular function definition (because the name of the - function doesn't match the one expected). */ - -static int -edit_formals_lists (const char *end_formals, unsigned int f_list_count, - const def_dec_info *def_dec_p) -{ - const char *start_formals; - int depth; - - start_formals = end_formals - 1; - depth = 1; - for (; depth; check_source (--start_formals > clean_read_ptr, 0)) - { - switch (*start_formals) - { - case '(': - depth--; - break; - case ')': - depth++; - break; - } - } - start_formals++; - - /* start_formals now points to the opening left paren of the formals list. */ - - f_list_count--; - - if (f_list_count) - { - const char *next_end; - - /* There should be more formal lists to the left of here. */ - - next_end = start_formals - 1; - check_source (next_end > clean_read_ptr, 0); - while (ISSPACE ((const unsigned char)*next_end)) - check_source (--next_end > clean_read_ptr, 0); - check_source (*next_end == ')', next_end); - check_source (--next_end > clean_read_ptr, 0); - check_source (*next_end == ')', next_end); - if (edit_formals_lists (next_end, f_list_count, def_dec_p)) - return 1; - } - - /* Check that the function name in the header we are working on is the same - as the one we would expect to find. If not, issue a warning and return - nonzero. */ - - if (f_list_count == 0) - { - const char *expected = def_dec_p->hash_entry->symbol; - const char *func_name_start; - const char *func_name_limit; - size_t func_name_len; - - for (func_name_limit = start_formals-1; - ISSPACE ((const unsigned char)*func_name_limit); ) - check_source (--func_name_limit > clean_read_ptr, 0); - - for (func_name_start = func_name_limit++; - is_id_char (*func_name_start); - func_name_start--) - check_source (func_name_start > clean_read_ptr, 0); - func_name_start++; - func_name_len = func_name_limit - func_name_start; - if (func_name_len == 0) - check_source (0, func_name_start); - if (func_name_len != strlen (expected) - || strncmp (func_name_start, expected, func_name_len)) - { - notice ("%s: %d: warning: found '%s' but expected '%s'\n", - shortpath (NULL, def_dec_p->file->hash_entry->symbol), - identify_lineno (func_name_start), - dupnstr (func_name_start, func_name_len), - expected); - return 1; - } - } - - output_up_to (start_formals); - -#ifdef UNPROTOIZE - if (f_list_count == 0) - output_string (def_dec_p->formal_names); -#else /* !defined (UNPROTOIZE) */ - { - unsigned f_list_depth; - const f_list_chain_item *flci_p = def_dec_p->f_list_chain; - - /* At this point, the current value of f_list count says how many - links we have to follow through the f_list_chain to get to the - particular formals list that we need to output next. */ - - for (f_list_depth = 0; f_list_depth < f_list_count; f_list_depth++) - flci_p = flci_p->chain_next; - output_string (flci_p->formals_list); - } -#endif /* !defined (UNPROTOIZE) */ - - clean_read_ptr = end_formals - 1; - return 0; -} - -/* Given a pointer to a byte in the clean text buffer which points to - the beginning of a line that contains a "follower" token for a - function definition header, do whatever is necessary to find the - right closing paren for the rightmost formals list of the function - definition header. */ - -static const char * -find_rightmost_formals_list (const char *clean_text_p) -{ - const char *end_formals; - - /* We are editing a function definition. The line number we did a seek - to contains the first token which immediately follows the entire set of - formals lists which are part of this particular function definition - header. - - Our job now is to scan leftwards in the clean text looking for the - right-paren which is at the end of the function header's rightmost - formals list. - - If we ignore whitespace, this right paren should be the first one we - see which is (ignoring whitespace) immediately followed either by the - open curly-brace beginning the function body or by an alphabetic - character (in the case where the function definition is in old (K&R) - style and there are some declarations of formal parameters). */ - - /* It is possible that the right paren we are looking for is on the - current line (together with its following token). Just in case that - might be true, we start out here by skipping down to the right end of - the current line before starting our scan. */ - - for (end_formals = clean_text_p; *end_formals != '\n'; end_formals++) - continue; - end_formals--; - -#ifdef UNPROTOIZE - - /* Now scan backwards while looking for the right end of the rightmost - formals list associated with this function definition. */ - - { - char ch; - const char *l_brace_p; - - /* Look leftward and try to find a right-paren. */ - - while (*end_formals != ')') - { - if (ISSPACE ((unsigned char)*end_formals)) - while (ISSPACE ((unsigned char)*end_formals)) - check_source (--end_formals > clean_read_ptr, 0); - else - check_source (--end_formals > clean_read_ptr, 0); - } - - ch = *(l_brace_p = forward_to_next_token_char (end_formals)); - /* Since we are unprotoizing an ANSI-style (prototyped) function - definition, there had better not be anything (except whitespace) - between the end of the ANSI formals list and the beginning of the - function body (i.e. the '{'). */ - - check_source (ch == '{', l_brace_p); - } - -#else /* !defined (UNPROTOIZE) */ - - /* Now scan backwards while looking for the right end of the rightmost - formals list associated with this function definition. */ - - while (1) - { - char ch; - const char *l_brace_p; - - /* Look leftward and try to find a right-paren. */ - - while (*end_formals != ')') - { - if (ISSPACE ((const unsigned char)*end_formals)) - while (ISSPACE ((const unsigned char)*end_formals)) - check_source (--end_formals > clean_read_ptr, 0); - else - check_source (--end_formals > clean_read_ptr, 0); - } - - ch = *(l_brace_p = forward_to_next_token_char (end_formals)); - - /* Since it is possible that we found a right paren before the starting - '{' of the body which IS NOT the one at the end of the real K&R - formals list (say for instance, we found one embedded inside one of - the old K&R formal parameter declarations) we have to check to be - sure that this is in fact the right paren that we were looking for. - - The one we were looking for *must* be followed by either a '{' or - by an alphabetic character, while others *cannot* validly be followed - by such characters. */ - - if ((ch == '{') || ISALPHA ((unsigned char) ch)) - break; - - /* At this point, we have found a right paren, but we know that it is - not the one we were looking for, so backup one character and keep - looking. */ - - check_source (--end_formals > clean_read_ptr, 0); - } - -#endif /* !defined (UNPROTOIZE) */ - - return end_formals; -} - -#ifndef UNPROTOIZE - -/* Insert into the output file a totally new declaration for a function - which (up until now) was being called from within the current block - without having been declared at any point such that the declaration - was visible (i.e. in scope) at the point of the call. - - We need to add in explicit declarations for all such function calls - in order to get the full benefit of prototype-based function call - parameter type checking. */ - -static void -add_local_decl (const def_dec_info *def_dec_p, const char *clean_text_p) -{ - const char *start_of_block; - const char *function_to_edit = def_dec_p->hash_entry->symbol; - - /* Don't insert new local explicit declarations unless explicitly requested - to do so. */ - - if (!local_flag) - return; - - /* Setup here to recover from confusing source code detected during this - particular "edit". */ - - save_pointers (); - if (setjmp (source_confusion_recovery)) - { - restore_pointers (); - notice ("%s: local declaration for function '%s' not inserted\n", - pname, function_to_edit); - return; - } - - /* We have already done a seek to the start of the line which should - contain *the* open curly brace which begins the block in which we need - to insert an explicit function declaration (to replace the implicit one). - - Now we scan that line, starting from the left, until we find the - open curly brace we are looking for. Note that there may actually be - multiple open curly braces on the given line, but we will be happy - with the leftmost one no matter what. */ - - start_of_block = clean_text_p; - while (*start_of_block != '{' && *start_of_block != '\n') - check_source (++start_of_block < clean_text_limit, 0); - - /* Note that the line from the original source could possibly - contain *no* open curly braces! This happens if the line contains - a macro call which expands into a chunk of text which includes a - block (and that block's associated open and close curly braces). - In cases like this, we give up, issue a warning, and do nothing. */ - - if (*start_of_block != '{') - { - if (!quiet_flag) - notice ("\n%s: %d: warning: can't add declaration of '%s' into macro call\n", - def_dec_p->file->hash_entry->symbol, def_dec_p->line, - def_dec_p->hash_entry->symbol); - return; - } - - /* Figure out what a nice (pretty) indentation would be for the new - declaration we are adding. In order to do this, we must scan forward - from the '{' until we find the first line which starts with some - non-whitespace characters (i.e. real "token" material). */ - - { - const char *ep = forward_to_next_token_char (start_of_block) - 1; - const char *sp; - - /* Now we have ep pointing at the rightmost byte of some existing indent - stuff. At least that is the hope. - - We can now just scan backwards and find the left end of the existing - indentation string, and then copy it to the output buffer. */ - - for (sp = ep; ISSPACE ((const unsigned char)*sp) && *sp != '\n'; sp--) - continue; - - /* Now write out the open { which began this block, and any following - trash up to and including the last byte of the existing indent that - we just found. */ - - output_up_to (ep); - - /* Now we go ahead and insert the new declaration at this point. - - If the definition of the given function is in the same file that we - are currently editing, and if its full ANSI declaration normally - would start with the keyword `extern', suppress the `extern'. */ - - { - const char *decl = def_dec_p->definition->ansi_decl; - - if ((*decl == 'e') && (def_dec_p->file == def_dec_p->definition->file)) - decl += 7; - output_string (decl); - } - - /* Finally, write out a new indent string, just like the preceding one - that we found. This will typically include a newline as the first - character of the indent string. */ - - output_bytes (sp, (size_t) (ep - sp) + 1); - } -} - -/* Given a pointer to a file_info record, and a pointer to the beginning - of a line (in the clean text buffer) which is assumed to contain the - first "follower" token for the first function definition header in the - given file, find a good place to insert some new global function - declarations (which will replace scattered and imprecise implicit ones) - and then insert the new explicit declaration at that point in the file. */ - -static void -add_global_decls (const file_info *file_p, const char *clean_text_p) -{ - const def_dec_info *dd_p; - const char *scan_p; - - /* Setup here to recover from confusing source code detected during this - particular "edit". */ - - save_pointers (); - if (setjmp (source_confusion_recovery)) - { - restore_pointers (); - notice ("%s: global declarations for file '%s' not inserted\n", - pname, shortpath (NULL, file_p->hash_entry->symbol)); - return; - } - - /* Start by finding a good location for adding the new explicit function - declarations. To do this, we scan backwards, ignoring whitespace - and comments and other junk until we find either a semicolon, or until - we hit the beginning of the file. */ - - scan_p = find_rightmost_formals_list (clean_text_p); - for (;; --scan_p) - { - if (scan_p < clean_text_base) - break; - check_source (scan_p > clean_read_ptr, 0); - if (*scan_p == ';') - break; - } - - /* scan_p now points either to a semicolon, or to just before the start - of the whole file. */ - - /* Now scan forward for the first non-whitespace character. In theory, - this should be the first character of the following function definition - header. We will put in the added declarations just prior to that. */ - - scan_p++; - while (ISSPACE ((const unsigned char)*scan_p)) - scan_p++; - scan_p--; - - output_up_to (scan_p); - - /* Now write out full prototypes for all of the things that had been - implicitly declared in this file (but only those for which we were - actually able to find unique matching definitions). Avoid duplicates - by marking things that we write out as we go. */ - - { - int some_decls_added = 0; - - for (dd_p = file_p->defs_decs; dd_p; dd_p = dd_p->next_in_file) - if (dd_p->is_implicit && dd_p->definition && !dd_p->definition->written) - { - const char *decl = dd_p->definition->ansi_decl; - - /* If the function for which we are inserting a declaration is - actually defined later in the same file, then suppress the - leading `extern' keyword (if there is one). */ - - if (*decl == 'e' && (dd_p->file == dd_p->definition->file)) - decl += 7; - - output_string ("\n"); - output_string (decl); - some_decls_added = 1; - ((NONCONST def_dec_info *) dd_p->definition)->written = 1; - } - if (some_decls_added) - output_string ("\n\n"); - } - - /* Unmark all of the definitions that we just marked. */ - - for (dd_p = file_p->defs_decs; dd_p; dd_p = dd_p->next_in_file) - if (dd_p->definition) - ((NONCONST def_dec_info *) dd_p->definition)->written = 0; -} - -#endif /* !defined (UNPROTOIZE) */ - -/* Do the editing operation specifically for a function "definition". Note - that editing operations for function "declarations" are handled by a - separate routine above. */ - -static void -edit_fn_definition (const def_dec_info *def_dec_p, - const char *volatile clean_text_p) -{ - const char *end_formals; - const char *function_to_edit = def_dec_p->hash_entry->symbol; - - /* Setup here to recover from confusing source code detected during this - particular "edit". */ - - save_pointers (); - if (setjmp (source_confusion_recovery)) - { - restore_pointers (); - notice ("%s: definition of function '%s' not converted\n", - pname, function_to_edit); - return; - } - - end_formals = find_rightmost_formals_list (clean_text_p); - - /* end_of_formals now points to the closing right paren of the rightmost - formals list which is actually part of the `header' of the function - definition that we are converting. */ - - /* If the header of this function definition looks like it declares a - function with a variable number of arguments, and if the way it does - that is different from that way we would like it (i.e. varargs vs. - stdarg) then issue a warning and leave the header unconverted. */ - - if (other_variable_style_function (def_dec_p->ansi_decl)) - { - if (!quiet_flag) - notice ("%s: %d: warning: definition of %s not converted\n", - shortpath (NULL, def_dec_p->file->hash_entry->symbol), - identify_lineno (end_formals), - other_var_style); - output_up_to (end_formals); - return; - } - - if (edit_formals_lists (end_formals, def_dec_p->f_list_count, def_dec_p)) - { - restore_pointers (); - notice ("%s: definition of function '%s' not converted\n", - pname, function_to_edit); - return; - } - - /* Have to output the last right paren because this never gets flushed by - edit_formals_list. */ - - output_up_to (end_formals); - -#ifdef UNPROTOIZE - { - const char *decl_p; - const char *semicolon_p; - const char *limit_p; - const char *scan_p; - int had_newlines = 0; - - /* Now write out the K&R style formal declarations, one per line. */ - - decl_p = def_dec_p->formal_decls; - limit_p = decl_p + strlen (decl_p); - for (;decl_p < limit_p; decl_p = semicolon_p + 2) - { - for (semicolon_p = decl_p; *semicolon_p != ';'; semicolon_p++) - continue; - output_string ("\n"); - output_string (indent_string); - output_bytes (decl_p, (size_t) ((semicolon_p + 1) - decl_p)); - } - - /* If there are no newlines between the end of the formals list and the - start of the body, we should insert one now. */ - - for (scan_p = end_formals+1; *scan_p != '{'; ) - { - if (*scan_p == '\n') - { - had_newlines = 1; - break; - } - check_source (++scan_p < clean_text_limit, 0); - } - if (!had_newlines) - output_string ("\n"); - } -#else /* !defined (UNPROTOIZE) */ - /* If we are protoizing, there may be some flotsam & jetsam (like comments - and preprocessing directives) after the old formals list but before - the following { and we would like to preserve that stuff while effectively - deleting the existing K&R formal parameter declarations. We do so here - in a rather tricky way. Basically, we white out any stuff *except* - the comments/pp-directives in the original text buffer, then, if there - is anything in this area *other* than whitespace, we output it. */ - { - const char *end_formals_orig; - const char *start_body; - const char *start_body_orig; - const char *scan; - const char *scan_orig; - int have_flotsam = 0; - int have_newlines = 0; - - for (start_body = end_formals + 1; *start_body != '{';) - check_source (++start_body < clean_text_limit, 0); - - end_formals_orig = orig_text_base + (end_formals - clean_text_base); - start_body_orig = orig_text_base + (start_body - clean_text_base); - scan = end_formals + 1; - scan_orig = end_formals_orig + 1; - for (; scan < start_body; scan++, scan_orig++) - { - if (*scan == *scan_orig) - { - have_newlines |= (*scan_orig == '\n'); - /* Leave identical whitespace alone. */ - if (!ISSPACE ((const unsigned char)*scan_orig)) - *((NONCONST char *) scan_orig) = ' '; /* identical - so whiteout */ - } - else - have_flotsam = 1; - } - if (have_flotsam) - output_bytes (end_formals_orig + 1, - (size_t) (start_body_orig - end_formals_orig) - 1); - else - if (have_newlines) - output_string ("\n"); - else - output_string (" "); - clean_read_ptr = start_body - 1; - } -#endif /* !defined (UNPROTOIZE) */ -} - -/* Clean up the clean text buffer. Do this by converting comments and - preprocessing directives into spaces. Also convert line continuations - into whitespace. Also, whiteout string and character literals. */ - -static void -do_cleaning (char *new_clean_text_base, const char *new_clean_text_limit) -{ - char *scan_p; - int non_whitespace_since_newline = 0; - - for (scan_p = new_clean_text_base; scan_p < new_clean_text_limit; scan_p++) - { - switch (*scan_p) - { - case '/': /* Handle comments. */ - if (scan_p[1] != '*') - goto regular; - non_whitespace_since_newline = 1; - scan_p[0] = ' '; - scan_p[1] = ' '; - scan_p += 2; - while (scan_p[1] != '/' || scan_p[0] != '*') - { - if (!ISSPACE ((const unsigned char)*scan_p)) - *scan_p = ' '; - ++scan_p; - gcc_assert (scan_p < new_clean_text_limit); - } - *scan_p++ = ' '; - *scan_p = ' '; - break; - - case '#': /* Handle pp directives. */ - if (non_whitespace_since_newline) - goto regular; - *scan_p = ' '; - while (scan_p[1] != '\n' || scan_p[0] == '\\') - { - if (!ISSPACE ((const unsigned char)*scan_p)) - *scan_p = ' '; - ++scan_p; - gcc_assert (scan_p < new_clean_text_limit); - } - *scan_p++ = ' '; - break; - - case '\'': /* Handle character literals. */ - non_whitespace_since_newline = 1; - while (scan_p[1] != '\'' || scan_p[0] == '\\') - { - if (scan_p[0] == '\\' - && !ISSPACE ((const unsigned char) scan_p[1])) - scan_p[1] = ' '; - if (!ISSPACE ((const unsigned char)*scan_p)) - *scan_p = ' '; - ++scan_p; - gcc_assert (scan_p < new_clean_text_limit); - } - *scan_p++ = ' '; - break; - - case '"': /* Handle string literals. */ - non_whitespace_since_newline = 1; - while (scan_p[1] != '"' || scan_p[0] == '\\') - { - if (scan_p[0] == '\\' - && !ISSPACE ((const unsigned char) scan_p[1])) - scan_p[1] = ' '; - if (!ISSPACE ((const unsigned char)*scan_p)) - *scan_p = ' '; - ++scan_p; - gcc_assert (scan_p < new_clean_text_limit); - } - if (!ISSPACE ((const unsigned char)*scan_p)) - *scan_p = ' '; - scan_p++; - break; - - case '\\': /* Handle line continuations. */ - if (scan_p[1] != '\n') - goto regular; - *scan_p = ' '; - break; - - case '\n': - non_whitespace_since_newline = 0; /* Reset. */ - break; - - case ' ': - case '\v': - case '\t': - case '\r': - case '\f': - case '\b': - break; /* Whitespace characters. */ - - default: -regular: - non_whitespace_since_newline = 1; - break; - } - } -} - -/* Given a pointer to the closing right parenthesis for a particular formals - list (in the clean text buffer) find the corresponding left parenthesis - and return a pointer to it. */ - -static const char * -careful_find_l_paren (const char *p) -{ - const char *q; - int paren_depth; - - for (paren_depth = 1, q = p-1; paren_depth; check_source (--q >= clean_text_base, 0)) - { - switch (*q) - { - case ')': - paren_depth++; - break; - case '(': - paren_depth--; - break; - } - } - return ++q; -} - -/* Scan the clean text buffer for cases of function definitions that we - don't really know about because they were preprocessed out when the - aux info files were created. - - In this version of protoize/unprotoize we just give a warning for each - one found. A later version may be able to at least unprotoize such - missed items. - - Note that we may easily find all function definitions simply by - looking for places where there is a left paren which is (ignoring - whitespace) immediately followed by either a left-brace or by an - upper or lower case letter. Whenever we find this combination, we - have also found a function definition header. - - Finding function *declarations* using syntactic clues is much harder. - I will probably try to do this in a later version though. */ - -static void -scan_for_missed_items (const file_info *file_p) -{ - static const char *scan_p; - const char *limit = clean_text_limit - 3; - static const char *backup_limit; - - backup_limit = clean_text_base - 1; - - for (scan_p = clean_text_base; scan_p < limit; scan_p++) - { - if (*scan_p == ')') - { - static const char *last_r_paren; - const char *ahead_p; - - last_r_paren = scan_p; - - for (ahead_p = scan_p + 1; ISSPACE ((const unsigned char)*ahead_p); ) - check_source (++ahead_p < limit, limit); - - scan_p = ahead_p - 1; - - if (ISALPHA ((const unsigned char)*ahead_p) || *ahead_p == '{') - { - const char *last_l_paren; - const int lineno = identify_lineno (ahead_p); - - if (setjmp (source_confusion_recovery)) - continue; - - /* We know we have a function definition header. Now skip - leftwards over all of its associated formals lists. */ - - do - { - last_l_paren = careful_find_l_paren (last_r_paren); - for (last_r_paren = last_l_paren-1; - ISSPACE ((const unsigned char)*last_r_paren); ) - check_source (--last_r_paren >= backup_limit, backup_limit); - } - while (*last_r_paren == ')'); - - if (is_id_char (*last_r_paren)) - { - const char *id_limit = last_r_paren + 1; - const char *id_start; - size_t id_length; - const def_dec_info *dd_p; - - for (id_start = id_limit-1; is_id_char (*id_start); ) - check_source (--id_start >= backup_limit, backup_limit); - id_start++; - backup_limit = id_start; - if ((id_length = (size_t) (id_limit - id_start)) == 0) - goto not_missed; - - { - char *func_name = alloca (id_length + 1); - static const char * const stmt_keywords[] - = { "if", "else", "do", "while", "for", "switch", "case", "return", 0 }; - const char * const *stmt_keyword; - - strncpy (func_name, id_start, id_length); - func_name[id_length] = '\0'; - - /* We must check here to see if we are actually looking at - a statement rather than an actual function call. */ - - for (stmt_keyword = stmt_keywords; *stmt_keyword; stmt_keyword++) - if (!strcmp (func_name, *stmt_keyword)) - goto not_missed; - -#if 0 - notice ("%s: found definition of '%s' at %s(%d)\n", - pname, - func_name, - shortpath (NULL, file_p->hash_entry->symbol), - identify_lineno (id_start)); -#endif /* 0 */ - /* We really should check for a match of the function name - here also, but why bother. */ - - for (dd_p = file_p->defs_decs; dd_p; dd_p = dd_p->next_in_file) - if (dd_p->is_func_def && dd_p->line == lineno) - goto not_missed; - - /* If we make it here, then we did not know about this - function definition. */ - - notice ("%s: %d: warning: '%s' excluded by preprocessing\n", - shortpath (NULL, file_p->hash_entry->symbol), - identify_lineno (id_start), func_name); - notice ("%s: function definition not converted\n", - pname); - } - not_missed: ; - } - } - } - } -} - -/* Do all editing operations for a single source file (either a "base" file - or an "include" file). To do this we read the file into memory, keep a - virgin copy there, make another cleaned in-core copy of the original file - (i.e. one in which all of the comments and preprocessing directives have - been replaced with whitespace), then use these two in-core copies of the - file to make a new edited in-core copy of the file. Finally, rename the - original file (as a way of saving it), and then write the edited version - of the file from core to a disk file of the same name as the original. - - Note that the trick of making a copy of the original sans comments & - preprocessing directives make the editing a whole lot easier. */ - -static void -edit_file (const hash_table_entry *hp) -{ - struct stat stat_buf; - const file_info *file_p = hp->fip; - char *new_orig_text_base; - char *new_orig_text_limit; - char *new_clean_text_base; - char *new_clean_text_limit; - size_t orig_size; - size_t repl_size; - int first_definition_in_file; - - /* If we are not supposed to be converting this file, or if there is - nothing in there which needs converting, just skip this file. */ - - if (!needs_to_be_converted (file_p)) - return; - - convert_filename = file_p->hash_entry->symbol; - - /* Convert a file if it is in a directory where we want conversion - and the file is not excluded. */ - - if (!directory_specified_p (convert_filename) - || file_excluded_p (convert_filename)) - { - if (!quiet_flag -#ifdef UNPROTOIZE - /* Don't even mention "system" include files unless we are - protoizing. If we are protoizing, we mention these as a - gentle way of prodding the user to convert his "system" - include files to prototype format. */ - && !in_system_include_dir (convert_filename) -#endif /* defined (UNPROTOIZE) */ - ) - notice ("%s: '%s' not converted\n", - pname, shortpath (NULL, convert_filename)); - return; - } - - /* Let the user know what we are up to. */ - - if (nochange_flag) - notice ("%s: would convert file '%s'\n", - pname, shortpath (NULL, convert_filename)); - else - notice ("%s: converting file '%s'\n", - pname, shortpath (NULL, convert_filename)); - fflush (stderr); - - /* Find out the size (in bytes) of the original file. */ - - /* The cast avoids an erroneous warning on AIX. */ - if (stat (convert_filename, &stat_buf) == -1) - { - int errno_val = errno; - notice ("%s: can't get status for file '%s': %s\n", - pname, shortpath (NULL, convert_filename), - xstrerror (errno_val)); - return; - } - orig_size = stat_buf.st_size; - - /* Allocate a buffer to hold the original text. */ - - orig_text_base = new_orig_text_base = xmalloc (orig_size + 2); - orig_text_limit = new_orig_text_limit = new_orig_text_base + orig_size; - - /* Allocate a buffer to hold the cleaned-up version of the original text. */ - - clean_text_base = new_clean_text_base = xmalloc (orig_size + 2); - clean_text_limit = new_clean_text_limit = new_clean_text_base + orig_size; - clean_read_ptr = clean_text_base - 1; - - /* Allocate a buffer that will hopefully be large enough to hold the entire - converted output text. As an initial guess for the maximum size of the - output buffer, use 125% of the size of the original + some extra. This - buffer can be expanded later as needed. */ - - repl_size = orig_size + (orig_size >> 2) + 4096; - repl_text_base = xmalloc (repl_size + 2); - repl_text_limit = repl_text_base + repl_size - 1; - repl_write_ptr = repl_text_base - 1; - - { - int input_file; - int fd_flags; - - /* Open the file to be converted in READ ONLY mode. */ - - fd_flags = O_RDONLY; -#ifdef O_BINARY - /* Use binary mode to avoid having to deal with different EOL characters. */ - fd_flags |= O_BINARY; -#endif - if ((input_file = open (convert_filename, fd_flags, 0444)) == -1) - { - int errno_val = errno; - notice ("%s: can't open file '%s' for reading: %s\n", - pname, shortpath (NULL, convert_filename), - xstrerror (errno_val)); - return; - } - - /* Read the entire original source text file into the original text buffer - in one swell fwoop. Then figure out where the end of the text is and - make sure that it ends with a newline followed by a null. */ - - if (safe_read (input_file, new_orig_text_base, orig_size) != - (int) orig_size) - { - int errno_val = errno; - close (input_file); - notice ("\n%s: error reading input file '%s': %s\n", - pname, shortpath (NULL, convert_filename), - xstrerror (errno_val)); - return; - } - - close (input_file); - } - - if (orig_size == 0 || orig_text_limit[-1] != '\n') - { - *new_orig_text_limit++ = '\n'; - orig_text_limit++; - } - - /* Create the cleaned up copy of the original text. */ - - memcpy (new_clean_text_base, orig_text_base, - (size_t) (orig_text_limit - orig_text_base)); - do_cleaning (new_clean_text_base, new_clean_text_limit); - -#if 0 - { - int clean_file; - size_t clean_size = orig_text_limit - orig_text_base; - char *const clean_filename = alloca (strlen (convert_filename) + 6 + 1); - - /* Open (and create) the clean file. */ - - strcpy (clean_filename, convert_filename); - strcat (clean_filename, ".clean"); - if ((clean_file = creat (clean_filename, 0666)) == -1) - { - int errno_val = errno; - notice ("%s: can't create/open clean file '%s': %s\n", - pname, shortpath (NULL, clean_filename), - xstrerror (errno_val)); - return; - } - - /* Write the clean file. */ - - safe_write (clean_file, new_clean_text_base, clean_size, clean_filename); - - close (clean_file); - } -#endif /* 0 */ - - /* Do a simplified scan of the input looking for things that were not - mentioned in the aux info files because of the fact that they were - in a region of the source which was preprocessed-out (via #if or - via #ifdef). */ - - scan_for_missed_items (file_p); - - /* Setup to do line-oriented forward seeking in the clean text buffer. */ - - last_known_line_number = 1; - last_known_line_start = clean_text_base; - - /* Now get down to business and make all of the necessary edits. */ - - { - const def_dec_info *def_dec_p; - - first_definition_in_file = 1; - def_dec_p = file_p->defs_decs; - for (; def_dec_p; def_dec_p = def_dec_p->next_in_file) - { - const char *clean_text_p = seek_to_line (def_dec_p->line); - - /* clean_text_p now points to the first character of the line which - contains the `terminator' for the declaration or definition that - we are about to process. */ - -#ifndef UNPROTOIZE - - if (global_flag && def_dec_p->is_func_def && first_definition_in_file) - { - add_global_decls (def_dec_p->file, clean_text_p); - first_definition_in_file = 0; - } - - /* Don't edit this item if it is already in prototype format or if it - is a function declaration and we have found no corresponding - definition. */ - - if (def_dec_p->prototyped - || (!def_dec_p->is_func_def && !def_dec_p->definition)) - continue; - -#endif /* !defined (UNPROTOIZE) */ - - if (def_dec_p->is_func_def) - edit_fn_definition (def_dec_p, clean_text_p); - else -#ifndef UNPROTOIZE - if (def_dec_p->is_implicit) - add_local_decl (def_dec_p, clean_text_p); - else -#endif /* !defined (UNPROTOIZE) */ - edit_fn_declaration (def_dec_p, clean_text_p); - } - } - - /* Finalize things. Output the last trailing part of the original text. */ - - output_up_to (clean_text_limit - 1); - - /* If this is just a test run, stop now and just deallocate the buffers. */ - - if (nochange_flag) - { - free (new_orig_text_base); - free (new_clean_text_base); - free (repl_text_base); - return; - } - - /* Change the name of the original input file. This is just a quick way of - saving the original file. */ - - if (!nosave_flag) - { - char *new_filename - = xmalloc (strlen (convert_filename) + strlen (save_suffix) + 2); - - strcpy (new_filename, convert_filename); -#ifdef __MSDOS__ - /* MSDOS filenames are restricted to 8.3 format, so we save `foo.c' - as `foo.<save_suffix>'. */ - new_filename[(strlen (convert_filename) - 1] = '\0'; -#endif - strcat (new_filename, save_suffix); - - /* Don't overwrite existing file. */ - if (access (new_filename, F_OK) == 0) - { - if (!quiet_flag) - notice ("%s: warning: file '%s' already saved in '%s'\n", - pname, - shortpath (NULL, convert_filename), - shortpath (NULL, new_filename)); - } - else if (rename (convert_filename, new_filename) == -1) - { - int errno_val = errno; - notice ("%s: can't link file '%s' to '%s': %s\n", - pname, - shortpath (NULL, convert_filename), - shortpath (NULL, new_filename), - xstrerror (errno_val)); - return; - } - } - - if (unlink (convert_filename) == -1) - { - int errno_val = errno; - /* The file may have already been renamed. */ - if (errno_val != ENOENT) - { - notice ("%s: can't delete file '%s': %s\n", - pname, shortpath (NULL, convert_filename), - xstrerror (errno_val)); - return; - } - } - - { - int output_file; - - /* Open (and create) the output file. */ - - if ((output_file = creat (convert_filename, 0666)) == -1) - { - int errno_val = errno; - notice ("%s: can't create/open output file '%s': %s\n", - pname, shortpath (NULL, convert_filename), - xstrerror (errno_val)); - return; - } -#ifdef O_BINARY - /* Use binary mode to avoid changing the existing EOL character. */ - setmode (output_file, O_BINARY); -#endif - - /* Write the output file. */ - - { - unsigned int out_size = (repl_write_ptr + 1) - repl_text_base; - - safe_write (output_file, repl_text_base, out_size, convert_filename); - } - - close (output_file); - } - - /* Deallocate the conversion buffers. */ - - free (new_orig_text_base); - free (new_clean_text_base); - free (repl_text_base); - - /* Change the mode of the output file to match the original file. */ - - /* The cast avoids an erroneous warning on AIX. */ - if (chmod (convert_filename, stat_buf.st_mode) == -1) - { - int errno_val = errno; - notice ("%s: can't change mode of file '%s': %s\n", - pname, shortpath (NULL, convert_filename), - xstrerror (errno_val)); - } - - /* Note: We would try to change the owner and group of the output file - to match those of the input file here, except that may not be a good - thing to do because it might be misleading. Also, it might not even - be possible to do that (on BSD systems with quotas for instance). */ -} - -/* Do all of the individual steps needed to do the protoization (or - unprotoization) of the files referenced in the aux_info files given - in the command line. */ - -static void -do_processing (void) -{ - const char * const *base_pp; - const char * const * const end_pps - = &base_source_filenames[n_base_source_files]; - -#ifndef UNPROTOIZE - int syscalls_len; -#endif /* !defined (UNPROTOIZE) */ - - /* One-by-one, check (and create if necessary), open, and read all of the - stuff in each aux_info file. After reading each aux_info file, the - aux_info_file just read will be automatically deleted unless the - keep_flag is set. */ - - for (base_pp = base_source_filenames; base_pp < end_pps; base_pp++) - process_aux_info_file (*base_pp, keep_flag, 0); - -#ifndef UNPROTOIZE - - /* Also open and read the special SYSCALLS.c aux_info file which gives us - the prototypes for all of the standard system-supplied functions. */ - - if (nondefault_syscalls_dir) - { - syscalls_absolute_filename - = xmalloc (strlen (nondefault_syscalls_dir) + 1 - + sizeof (syscalls_filename)); - strcpy (syscalls_absolute_filename, nondefault_syscalls_dir); - } - else - { - GET_ENVIRONMENT (default_syscalls_dir, "GCC_EXEC_PREFIX"); - if (!default_syscalls_dir) - { - default_syscalls_dir = standard_exec_prefix; - } - syscalls_absolute_filename - = xmalloc (strlen (default_syscalls_dir) + 0 - + strlen (target_machine) + 1 - + strlen (target_version) + 1 - + sizeof (syscalls_filename)); - strcpy (syscalls_absolute_filename, default_syscalls_dir); - strcat (syscalls_absolute_filename, target_machine); - strcat (syscalls_absolute_filename, "/"); - strcat (syscalls_absolute_filename, target_version); - strcat (syscalls_absolute_filename, "/"); - } - - syscalls_len = strlen (syscalls_absolute_filename); - if (! IS_DIR_SEPARATOR (*(syscalls_absolute_filename + syscalls_len - 1))) - { - *(syscalls_absolute_filename + syscalls_len++) = DIR_SEPARATOR; - *(syscalls_absolute_filename + syscalls_len) = '\0'; - } - strcat (syscalls_absolute_filename, syscalls_filename); - - /* Call process_aux_info_file in such a way that it does not try to - delete the SYSCALLS aux_info file. */ - - process_aux_info_file (syscalls_absolute_filename, 1, 1); - -#endif /* !defined (UNPROTOIZE) */ - - /* When we first read in all of the information from the aux_info files - we saved in it descending line number order, because that was likely to - be faster. Now however, we want the chains of def & dec records to - appear in ascending line number order as we get further away from the - file_info record that they hang from. The following line causes all of - these lists to be rearranged into ascending line number order. */ - - visit_each_hash_node (filename_primary, reverse_def_dec_list); - -#ifndef UNPROTOIZE - - /* Now do the "real" work. The following line causes each declaration record - to be "visited". For each of these nodes, an attempt is made to match - up the function declaration with a corresponding function definition, - which should have a full prototype-format formals list with it. Once - these match-ups are made, the conversion of the function declarations - to prototype format can be made. */ - - visit_each_hash_node (function_name_primary, connect_defs_and_decs); - -#endif /* !defined (UNPROTOIZE) */ - - /* Now convert each file that can be converted (and needs to be). */ - - visit_each_hash_node (filename_primary, edit_file); - -#ifndef UNPROTOIZE - - /* If we are working in cplusplus mode, try to rename all .c files to .C - files. Don't panic if some of the renames don't work. */ - - if (cplusplus_flag && !nochange_flag) - visit_each_hash_node (filename_primary, rename_c_file); - -#endif /* !defined (UNPROTOIZE) */ -} - -static const struct option longopts[] = -{ - {"version", 0, 0, 'V'}, - {"file_name", 0, 0, 'p'}, - {"quiet", 0, 0, 'q'}, - {"silent", 0, 0, 'q'}, - {"force", 0, 0, 'f'}, - {"keep", 0, 0, 'k'}, - {"nosave", 0, 0, 'N'}, - {"nochange", 0, 0, 'n'}, - {"compiler-options", 1, 0, 'c'}, - {"exclude", 1, 0, 'x'}, - {"directory", 1, 0, 'd'}, -#ifdef UNPROTOIZE - {"indent", 1, 0, 'i'}, -#else - {"local", 0, 0, 'l'}, - {"global", 0, 0, 'g'}, - {"c++", 0, 0, 'C'}, - {"syscalls-dir", 1, 0, 'B'}, -#endif - {0, 0, 0, 0} -}; - -extern int main (int, char **const); - -int -main (int argc, char **const argv) -{ - int longind; - int c; - const char *params = ""; - - pname = strrchr (argv[0], DIR_SEPARATOR); -#ifdef DIR_SEPARATOR_2 - { - char *slash; - - slash = strrchr (pname ? pname : argv[0], DIR_SEPARATOR_2); - if (slash) - pname = slash; - } -#endif - pname = pname ? pname+1 : argv[0]; - -#ifdef SIGCHLD - /* We *MUST* set SIGCHLD to SIG_DFL so that the wait4() call will - receive the signal. A different setting is inheritable */ - signal (SIGCHLD, SIG_DFL); -#endif - - /* Unlock the stdio streams. */ - unlock_std_streams (); - - gcc_init_libintl (); - - cwd_buffer = getpwd (); - if (!cwd_buffer) - { - notice ("%s: cannot get working directory: %s\n", - pname, xstrerror(errno)); - return (FATAL_EXIT_CODE); - } - - /* By default, convert the files in the current directory. */ - directory_list = string_list_cons (cwd_buffer, NULL); - - while ((c = getopt_long (argc, argv, -#ifdef UNPROTOIZE - "c:d:i:knNp:qvVx:", -#else - "B:c:Cd:gklnNp:qvVx:", -#endif - longopts, &longind)) != EOF) - { - if (c == 0) /* Long option. */ - c = longopts[longind].val; - switch (c) - { - case 'p': - compiler_file_name = optarg; - break; - case 'd': - directory_list - = string_list_cons (abspath (NULL, optarg), directory_list); - break; - case 'x': - exclude_list = string_list_cons (optarg, exclude_list); - break; - - case 'v': - case 'V': - version_flag = 1; - break; - case 'q': - quiet_flag = 1; - break; -#if 0 - case 'f': - force_flag = 1; - break; -#endif - case 'n': - nochange_flag = 1; - keep_flag = 1; - break; - case 'N': - nosave_flag = 1; - break; - case 'k': - keep_flag = 1; - break; - case 'c': - params = optarg; - break; -#ifdef UNPROTOIZE - case 'i': - indent_string = optarg; - break; -#else /* !defined (UNPROTOIZE) */ - case 'l': - local_flag = 1; - break; - case 'g': - global_flag = 1; - break; - case 'C': - cplusplus_flag = 1; - break; - case 'B': - nondefault_syscalls_dir = optarg; - break; -#endif /* !defined (UNPROTOIZE) */ - default: - usage (); - } - } - - /* Set up compile_params based on -p and -c options. */ - munge_compile_params (params); - - n_base_source_files = argc - optind; - - /* Now actually make a list of the base source filenames. */ - - base_source_filenames - = xmalloc ((n_base_source_files + 1) * sizeof (char *)); - n_base_source_files = 0; - for (; optind < argc; optind++) - { - const char *path = abspath (NULL, argv[optind]); - int len = strlen (path); - - if (path[len-1] == 'c' && path[len-2] == '.') - base_source_filenames[n_base_source_files++] = path; - else - { - notice ("%s: input file names must have .c suffixes: %s\n", - pname, shortpath (NULL, path)); - errors++; - } - } - -#ifndef UNPROTOIZE - /* We are only interested in the very first identifier token in the - definition of `va_list', so if there is more junk after that first - identifier token, delete it from the `varargs_style_indicator'. */ - { - const char *cp; - - for (cp = varargs_style_indicator; ISIDNUM (*cp); cp++) - continue; - if (*cp != 0) - varargs_style_indicator = savestring (varargs_style_indicator, - cp - varargs_style_indicator); - } -#endif /* !defined (UNPROTOIZE) */ - - if (errors) - usage (); - else - { - if (version_flag) - fprintf (stderr, "%s %s%s\n", pname, pkgversion_string, - version_string); - do_processing (); - } - - return (errors ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE); -} diff --git a/gcc/scan-decls.c b/gcc/scan-decls.c deleted file mode 100644 index c0e2009150f..00000000000 --- a/gcc/scan-decls.c +++ /dev/null @@ -1,250 +0,0 @@ -/* scan-decls.c - Extracts declarations from cpp output. - Copyright (C) 1993, 1995, 1997, 1998, - 1999, 2000, 2003, 2004, 2007 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 3, or (at your option) any - later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING3. If not see - <http://www.gnu.org/licenses/>. - - Written by Per Bothner <bothner@cygnus.com>, July 1993. */ - -#include "bconfig.h" -#include "system.h" -#include "coretypes.h" -#include "tm.h" -#include "cpplib.h" -#include "scan.h" - -static void skip_to_closing_brace (cpp_reader *); -static const cpp_token *get_a_token (cpp_reader *); - -int brace_nesting = 0; - -/* The first extern_C_braces_length elements of extern_C_braces - indicate the (brace nesting levels of) left braces that were - prefixed by extern "C". */ -int extern_C_braces_length = 0; -/* 20 is not enough anymore on Solaris 9. */ -#define MAX_EXTERN_C_BRACES 200 -char extern_C_braces[MAX_EXTERN_C_BRACES]; -#define in_extern_C_brace (extern_C_braces_length>0) - -/* True if the function declaration currently being scanned is - prefixed by extern "C". */ -int current_extern_C = 0; - -/* Get a token but skip padding. */ -static const cpp_token * -get_a_token (cpp_reader *pfile) -{ - for (;;) - { - const cpp_token *result = cpp_get_token (pfile); - if (result->type != CPP_PADDING) - return result; - } -} - -static void -skip_to_closing_brace (cpp_reader *pfile) -{ - int nesting = 1; - for (;;) - { - enum cpp_ttype token = get_a_token (pfile)->type; - - if (token == CPP_EOF) - break; - if (token == CPP_OPEN_BRACE) - nesting++; - if (token == CPP_CLOSE_BRACE && --nesting == 0) - break; - } -} - -/* This function scans a C source file (actually, the output of cpp), - reading from FP. It looks for function declarations, and - external variable declarations. - - The following grammar (as well as some extra stuff) is recognized: - - declaration: - (decl-specifier)* declarator ("," declarator)* ";" - decl-specifier: - identifier - keyword - extern "C" - declarator: - (ptr-operator)* dname [ "(" argument-declaration-list ")" ] - ptr-operator: - ("*" | "&") ("const" | "volatile")* - dname: - identifier - -Here dname is the actual name being declared. -*/ - -int -scan_decls (cpp_reader *pfile, int argc ATTRIBUTE_UNUSED, - char **argv ATTRIBUTE_UNUSED) -{ - int saw_extern, saw_inline; - cpp_token prev_id; - const cpp_token *token; - - new_statement: - token = get_a_token (pfile); - - handle_statement: - current_extern_C = 0; - saw_extern = 0; - saw_inline = 0; - if (token->type == CPP_OPEN_BRACE) - { - /* Pop an 'extern "C"' nesting level, if appropriate. */ - if (extern_C_braces_length - && extern_C_braces[extern_C_braces_length - 1] == brace_nesting) - extern_C_braces_length--; - brace_nesting--; - goto new_statement; - } - if (token->type == CPP_OPEN_BRACE) - { - brace_nesting++; - goto new_statement; - } - - if (token->type == CPP_EOF) - return 0; - - if (token->type == CPP_SEMICOLON) - goto new_statement; - if (token->type != CPP_NAME) - goto new_statement; - - prev_id.type = CPP_EOF; - for (;;) - { - switch (token->type) - { - default: - goto handle_statement; - case CPP_MULT: - case CPP_AND: - /* skip */ - break; - - case CPP_COMMA: - case CPP_SEMICOLON: - if (prev_id.type != CPP_EOF && saw_extern) - { - recognized_extern (&prev_id); - } - if (token->type == CPP_COMMA) - break; - /* ... fall through ... */ - case CPP_OPEN_BRACE: case CPP_CLOSE_BRACE: - goto new_statement; - - case CPP_EOF: - return 0; - - case CPP_OPEN_PAREN: - /* Looks like this is the start of a formal parameter list. */ - if (prev_id.type != CPP_EOF) - { - int nesting = 1; - int have_arg_list = 0; - const struct line_map *map; - unsigned int line; - for (;;) - { - token = get_a_token (pfile); - if (token->type == CPP_OPEN_PAREN) - nesting++; - else if (token->type == CPP_CLOSE_PAREN) - { - nesting--; - if (nesting == 0) - break; - } - else if (token->type == CPP_EOF) - break; - else if (token->type == CPP_NAME - || token->type == CPP_ELLIPSIS) - have_arg_list = 1; - } - map = linemap_lookup (&line_table, token->src_loc); - line = SOURCE_LINE (map, token->src_loc); - recognized_function (&prev_id, line, - (saw_inline ? 'I' - : in_extern_C_brace || current_extern_C - ? 'F' : 'f'), have_arg_list); - token = get_a_token (pfile); - if (token->type == CPP_OPEN_BRACE) - { - /* skip body of (normally) inline function */ - skip_to_closing_brace (pfile); - goto new_statement; - } - - /* skip a possible __attribute__ or throw expression after the - parameter list */ - while (token->type != CPP_SEMICOLON && token->type != CPP_EOF) - token = get_a_token (pfile); - if (token->type == CPP_EOF) - return 0; - goto new_statement; - } - break; - case CPP_NAME: - /* "inline" and "extern" are recognized but skipped */ - if (cpp_ideq (token, "inline")) - { - saw_inline = 1; - } - else if (cpp_ideq (token, "extern")) - { - saw_extern = 1; - token = get_a_token (pfile); - if (token->type == CPP_STRING - && token->val.str.len == 1 - && token->val.str.text[0] == 'C') - { - current_extern_C = 1; - token = get_a_token (pfile); - if (token->type == CPP_OPEN_BRACE) - { - brace_nesting++; - extern_C_braces[extern_C_braces_length++] - = brace_nesting; - if (extern_C_braces_length >= MAX_EXTERN_C_BRACES) - { - fprintf (stderr, - "Internal error: out-of-bounds index\n"); - exit (FATAL_EXIT_CODE); - } - goto new_statement; - } - } - else - continue; - break; - } - /* This may be the name of a variable or function. */ - prev_id = *token; - break; - } - token = get_a_token (pfile); - } -} diff --git a/gcc/scan-types.sh b/gcc/scan-types.sh deleted file mode 100755 index 59d786a9fd0..00000000000 --- a/gcc/scan-types.sh +++ /dev/null @@ -1,142 +0,0 @@ -#! /bin/sh -# Deduce values of standard ANSI and POSIX types (e.g. size_t, pid_t). -# Emits macros definitions for these, and some other types. -# Intended to be used to massage the sys-protos.h file. -# Expects one arg, which is the GCC source directory. - -CC=${CC-"./xgcc -B$1/"} -CPP=${CPP-`echo ${CC} -E -I"$1/"`} -SED=sed - -# Generate definitions for the standard types (such as mode_t) -# compatible with those in the standard C header files. -# It works by a dummy program through the C pre-processor, and then -# using sed to search for typedefs in the output. - -cat >st-dummy.c <<!EOF! -#include <sys/types.h> -#include <stddef.h> -#include <stdarg.h> -#include <stdio.h> -#include <time.h> -#include <signal.h> -#ifdef size_t -typedef size_t Xsize_t; -#elif defined(__SIZE_TYPE__) -typedef __SIZE_TYPE__ Xsize_t; -#endif -#ifdef va_list -typedef va_list XXXva_list; -#endif -!EOF! - -if ${CPP} st-dummy.c >TMP ; then true -else - echo "scan-types: could not invoke ${CPP} on st-dummy.c" 1>&2 ; exit 1 -fi -tr ' ' ' ' <TMP >st-dummy.out - -for TYPE in dev_t clock_t fpos_t gid_t ino_t mode_t nlink_t off_t pid_t size_t ssize_t time_t uid_t va_list int32_t uint_32_t ; do - IMPORTED=`eval 'echo $'"$TYPE"` - if [ -n "${IMPORTED}" ] ; then - eval "$TYPE='$IMPORTED" - else - # Search st-dummy.out for a typedef for $TYPE, and write it out - # to TMP in #define syntax. - rm -f TMP - ${SED} -n -e "s|.*typedef *\(.*\) X*$TYPE *;.*|\1|w TMP" <st-dummy.out>/dev/null - # Now select the first definition. - if [ -s TMP ]; then - # VALUE is now the typedef'd definition of $TYPE. - eval "VALUE='`${SED} -e 's| *$||' -e '2,$d' <TMP`'" - # Unless VALUE contains a blank, look for a typedef for it - # in turn (this could be a loop, but that would be over-kill). - # Ensure $VALUE is double quoted to protect cases where it - # contains an asterisk and would cause filename expansion. - # E.g. when va_list is "char *". - if echo "$VALUE" | grep " " >/dev/null ; then true - else - rm -f TMP - ${SED} -n -e "s|.*typedef[ ][ ]*\(.*[^a-zA-Z0-9_]\)${VALUE}[ ]*;.*|\1|w TMP" <st-dummy.out>/dev/null - if [ -s TMP ]; then - eval "VALUE='`${SED} -e '2,$d' -e 's|[ ]*$||' <TMP`'" - fi - fi - eval "$TYPE='$VALUE'" - fi - fi -done - -cat <<!EOF! -#define ${macro_prefix}clock_t ${clock_t-int /* default */} -#define ${macro_prefix}dev_t ${dev_t-int /* default */} -#define ${macro_prefix}fpos_t ${fpos_t-long /* default */} -#define ${macro_prefix}gid_t ${gid_t-int /* default */} -#define ${macro_prefix}ino_t ${ino_t-int /* default */} -#define ${macro_prefix}mode_t ${mode_t-int /* default */} -#define ${macro_prefix}nlink_t ${nlink_t-int /* default */} -#define ${macro_prefix}off_t ${off_t-long /* default */} -#define ${macro_prefix}pid_t ${pid_t-int /* default */} -#define ${macro_prefix}ptrdiff_t __PTRDIFF_TYPE__ -#define ${macro_prefix}size_t __SIZE_TYPE__ -#define ${macro_prefix}time_t ${time_t-int /* default */} -#define ${macro_prefix}uid_t ${uid_t-int /* default */} -#define ${macro_prefix}wchar_t __WCHAR_TYPE__ -#define ${macro_prefix}int32_t ${int32_t-int /* default */} -#define ${macro_prefix}uint32_t ${uint32_t-unsigned int /* default */} -!EOF! - -# (wait_arg_t*) should be (int*), according to Posix, but -# BSD traditionally used (union wait*). Use (void*) to allow either usage. -echo "#define ${macro_prefix}wait_arg_t void" - -# ssize_t is the signed version of size_t -if [ -n "${ssize_t}" ] ; then - echo "#define ${macro_prefix}ssize_t ${ssize_t}" -elif [ -z "${size_t}" ] ; then - echo "#define ${macro_prefix}ssize_t long" -else - # Remove "unsigned" from ${size_t} to get ${ssize_t}. - tmp="`echo ${size_t} | ${SED} -e 's|unsigned||g' -e 's| | |g'`" - if [ -z "$tmp" ] ; then - tmp=int - else - # check $tmp doesn't conflict with <unistd.h> - echo "#include <unistd.h> - extern $tmp read();" >st-dummy.c - ${CC} -c st-dummy.c >/dev/null 2>&1 || tmp=int - fi - echo "#define ${macro_prefix}ssize_t $tmp /* default */" -fi - -# va_list can cause problems (e.g. some systems have va_list as a struct). -# Check to see if ${va_list-char*} really is compatible with stdarg.h. -cat >st-dummy.c <<!EOF! -#define X_va_list ${va_list-char* /* default */} -extern long foo(X_va_list ap); /* Check that X_va_list compiles on its own */ -#include <stdarg.h> -long foo(X_va_list ap) { return va_arg(ap, long); } -long bar(int i, ...) -{ va_list ap; long j; va_start(ap, i); j = foo(ap); va_end(ap); return j; } -!EOF! -if ${CC} -c st-dummy.c >/dev/null 2>&1 ; then - # Ok: We have something that works. - echo "#define ${macro_prefix}va_list ${va_list-char* /* default */}" -else - # No, it breaks. Indicate that <stdarg.h> must be included. - echo "#define ${macro_prefix}NEED_STDARG_H -#define ${macro_prefix}va_list va_list" -fi - -# stuff needed for curses.h - -# This isn't correct for SVR4 (for example). However, we only -# use this when adding a missing prototype, so it shouldn't matter. -echo "#define chtype int" -# sys-protos.h uses non-standard names (due to the CHTYPE argument problem). -echo "#define box32 box" -echo "#define initscr32 initscr" -echo "#define w32addch waddch" -echo "#define w32insch winsch" - -rm -f st-dummy.c st-dummy.o TMP st-dummy.out diff --git a/gcc/scan.c b/gcc/scan.c deleted file mode 100644 index a66107933a4..00000000000 --- a/gcc/scan.c +++ /dev/null @@ -1,241 +0,0 @@ -/* Utility functions for scan-decls and fix-header programs. - Copyright (C) 1993, 1994, 1998, 2002, 2003, 2007, 2008 - Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 3, or (at your option) any - later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING3. If not see - <http://www.gnu.org/licenses/>. */ - -#include "bconfig.h" -#include "system.h" -#include "coretypes.h" -#include "tm.h" -#include "scan.h" - -int lineno = 1; -int source_lineno = 1; -sstring source_filename; - -void -make_sstring_space (sstring *str, int count) -{ - int cur_pos = str->ptr - str->base; - int cur_size = str->limit - str->base; - int new_size = cur_pos + count + 100; - - if (new_size <= cur_size) - return; - - str->base = (char *) xrealloc (str->base, new_size); - str->ptr = str->base + cur_size; - str->limit = str->base + new_size; -} - -void -sstring_append (sstring *dst, sstring *src) -{ - char *d, *s; - int count = SSTRING_LENGTH (src); - - MAKE_SSTRING_SPACE (dst, count + 1); - d = dst->ptr; - s = src->base; - while (--count >= 0) *d++ = *s++; - dst->ptr = d; - *d = 0; -} - -int -scan_ident (FILE *fp, sstring *s, int c) -{ - s->ptr = s->base; - if (ISIDST (c)) - { - for (;;) - { - SSTRING_PUT (s, c); - c = getc (fp); - if (c == EOF || ! ISIDNUM (c)) - break; - } - } - MAKE_SSTRING_SPACE (s, 1); - *s->ptr = 0; - return c; -} - -int -scan_string (FILE *fp, sstring *s, int init) -{ - int c; - - for (;;) - { - c = getc (fp); - if (c == EOF || c == '\n') - break; - if (c == init) - { - c = getc (fp); - break; - } - if (c == '\\') - { - c = getc (fp); - if (c == EOF) - break; - if (c == '\n') - continue; - } - SSTRING_PUT (s, c); - } - MAKE_SSTRING_SPACE (s, 1); - *s->ptr = 0; - return c; -} - -/* Skip horizontal white spaces (spaces, tabs, and C-style comments). */ - -int -skip_spaces (FILE *fp, int c) -{ - for (;;) - { - if (c == ' ' || c == '\t') - c = getc (fp); - else if (c == '/') - { - c = getc (fp); - if (c != '*') - { - ungetc (c, fp); - return '/'; - } - c = getc (fp); - for (;;) - { - if (c == EOF) - return EOF; - else if (c != '*') - { - if (c == '\n') - source_lineno++, lineno++; - c = getc (fp); - } - else if ((c = getc (fp)) == '/') - return getc (fp); - } - } - else - break; - } - return c; -} - -int -read_upto (FILE *fp, sstring *str, int delim) -{ - int ch; - - for (;;) - { - ch = getc (fp); - if (ch == EOF || ch == delim) - break; - SSTRING_PUT (str, ch); - } - MAKE_SSTRING_SPACE (str, 1); - *str->ptr = 0; - return ch; -} - -int -get_token (FILE *fp, sstring *s) -{ - int c; - - s->ptr = s->base; - retry: - c = ' '; - c = skip_spaces (fp, c); - if (c == '\n') - { - source_lineno++; - lineno++; - goto retry; - } - if (c == '#') - { - c = get_token (fp, s); - if (c == INT_TOKEN) - { - source_lineno = atoi (s->base) - 1; /* '\n' will add 1 */ - get_token (fp, &source_filename); - } - for (;;) - { - c = getc (fp); - if (c == EOF) - return EOF; - if (c == '\n') - { - source_lineno++; - lineno++; - goto retry; - } - } - } - if (c == EOF) - return EOF; - if (ISDIGIT (c)) - { - do - { - SSTRING_PUT (s, c); - c = getc (fp); - } while (c != EOF && ISDIGIT (c)); - ungetc (c, fp); - c = INT_TOKEN; - goto done; - } - if (ISIDST (c)) - { - c = scan_ident (fp, s, c); - ungetc (c, fp); - return IDENTIFIER_TOKEN; - } - if (c == '\'' || c == '"') - { - c = scan_string (fp, s, c); - ungetc (c, fp); - return c == '\'' ? CHAR_TOKEN : STRING_TOKEN; - } - SSTRING_PUT (s, c); - done: - MAKE_SSTRING_SPACE (s, 1); - *s->ptr = 0; - return c; -} - -unsigned int -hashstr (const char *str, unsigned int len) -{ - unsigned int n = len; - unsigned int r = 0; - const unsigned char *s = (const unsigned char *) str; - - do - r = r * 67 + (*s++ - 113); - while (--n); - return r + len; -} diff --git a/gcc/scan.h b/gcc/scan.h deleted file mode 100644 index 0a1b1af9647..00000000000 --- a/gcc/scan.h +++ /dev/null @@ -1,75 +0,0 @@ -/* scan.h - Utility declarations for scan-decls and fix-header programs. - Copyright (C) 1993, 1998, 1999, 2003, 2004, 2007, 2008 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 3, or (at your option) any - later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING3. If not see - <http://www.gnu.org/licenses/>. */ - -#include <stdio.h> - -typedef struct sstring -{ - char *base; - char *ptr; - char *limit; -} sstring; - -#define INIT_SSTRING(STR) ((STR)->base = 0, (STR)->ptr = 0, (STR)->limit = 0) -#define FREE_SSTRING(STR) do { if ((STR)->base) free (STR)->base; } while(0) -#define SSTRING_PUT(STR, C) do {\ - if ((STR)->limit <= (STR)->ptr) make_sstring_space (STR, 1); \ - *(STR)->ptr++ = (C); } while (0) -#define SSTRING_LENGTH(STR) ((STR)->ptr - (STR)->base) -#define MAKE_SSTRING_SPACE(STR, COUNT) \ - if ((STR)->limit - (STR)->ptr < (COUNT)) make_sstring_space (STR, COUNT); - -struct partial_proto; -struct fn_decl -{ - const char *fname; - const char *rtype; - const char *params; - struct partial_proto *partial; -}; - -struct cpp_token; - -extern void sstring_append (sstring *, sstring *); -extern void make_sstring_space (sstring *, int); -extern int skip_spaces (FILE *, int); -extern int scan_ident (FILE *, sstring *, int); -extern int scan_string (FILE *, sstring *, int); -extern int read_upto (FILE *, sstring *, int); -extern unsigned long hash (const char *); -extern void recognized_function (const struct cpp_token *, - unsigned int, int, int); -extern void recognized_extern (const struct cpp_token *); -extern unsigned int hashstr (const char *, unsigned int); - -extern int scan_decls (struct cpp_reader *, int, char **); - -/* get_token is a simple C lexer. */ -#define IDENTIFIER_TOKEN 300 -#define CHAR_TOKEN 301 -#define STRING_TOKEN 302 -#define INT_TOKEN 303 -extern int get_token (FILE *, sstring *); - -/* Current file and line number, taking #-directives into account */ -extern int source_lineno; -extern sstring source_filename; -/* Current physical line number */ -extern int lineno; - -extern struct line_maps line_table; diff --git a/gcc/sort-protos b/gcc/sort-protos deleted file mode 100755 index 493e9f08a8f..00000000000 --- a/gcc/sort-protos +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# Sort the sys-protos.h file in its usual order. -# Invoke as `sort-protos sys-protos.h'. - -input=$1 - -sed 's/\(.*[ \*]\)\([a-zA-Z0-9_][a-zA-Z0-9_]*\)[ ]*\(([^\*].*\)$/\2%\1%\3/' $input | sort -u | awk -F% '{printf "%-30.30s%s%s\n", $2, $1, $3}' > tmp.$input - -mv -f tmp.$input $input diff --git a/gcc/sys-protos.h b/gcc/sys-protos.h deleted file mode 100644 index 3f06f274e15..00000000000 --- a/gcc/sys-protos.h +++ /dev/null @@ -1,1353 +0,0 @@ -extern int TLappend(/* ??? */); -extern int TLassign(/* ??? */); -extern int TLclose(/* ??? */); -extern int TLdelete(/* ??? */); -extern int TLfreeentry(/* ??? */); -extern ENTRY TLgetentry(/* ??? */); -extern unsigned char * TLgetfield(/* ??? */); -extern int TLopen(/* ??? */); -extern int TLread(/* ??? */); -extern int TLsearch1(/* ??? */); -extern int TLsubst(/* ??? */); -extern int TLsync(/* ??? */); -extern int TLwrite(/* ??? */); -extern int __acancel(int, const long int *, int); -extern int __aread(int, int, char *, uint, ecb_t *); -extern void __assert(const char *, const char *, int); -extern int __asyncio(int, aioop_t *, int); -extern int __awrite(int, int, char *, uint, ecb_t *); -extern int __evcntl(evver_t, evcntlcmds_t, long int, long int); -extern int __evexit(evver_t, idtype_t, id_t, const ecb_t *); -extern int __evexitset(evver_t, const procset_t *, hostid_t, const ecb_t *); -extern int __evpoll(evver_t, evpollcmds_t, event_t *, int, const hrtime_t *); -extern int __evpollmore(evver_t, event_t *, int); -extern int __evpost(evver_t, event_t *, int, int); -extern int __evqcntl(evver_t, int, evqcntlcmds_t, long int); -extern int __evsig(evver_t, const sigset_t *, const ecb_t *, evsiginfo_t *, int); -extern int __evtrap(evver_t, evpollcmds_t, event_t *, int, long int, void (*) (event_t *, int, long int, evcontext_t *), const evta_t *); -extern int __evtrapcancel(evver_t, long int *, int); -extern int __filbuf(FILE *); -extern int __flsbuf(int, FILE *); -extern major_t __major(int, dev_t); -extern dev_t __makedev(int, major_t, minor_t); -extern minor_t __minor(int, dev_t); -extern long int __priocntl(/* ??? */); -extern long int __priocntlset(/* ??? */); -extern void _exit(int); -extern int _filbuf(FILE *); -extern int _flsbuf(unsigned int, FILE *); -extern int _fxstat(int, int, struct stat *); -extern u_long _getlong(/* ??? */); -extern u_short _getshort(/* ??? */); -extern int _getsyx(int *, int *); -extern int _longjmp(jmp_buf, int); -extern int _lxstat(int, const char *, struct stat *); -extern int _meta(int); -extern struct nd_hostservlist _netdir_getbyaddr(struct netconfig *, struct netbuf *); -extern struct nd_addrlist * _netdir_getbyname(struct netconfig *, struct nd_hostserv *); -extern int _overlay(WINDOW *, WINDOW *, int); -extern int _ring(int); -extern int _rpc_dtbsize(/* ??? */); -extern int _rpc_endconf(/* ??? */); -extern u_int _rpc_get_a_size(/* ??? */); -extern u_int _rpc_get_t_size(/* ??? */); -extern struct netconfig * _rpc_getconf(/* ??? */); -extern struct netconfig * _rpc_getconfip(/* ??? */); -extern char * _rpc_gethostname(/* ??? */); -extern int _rpc_setconf(/* ??? */); -extern void _s_aligned_copy(/* ??? */); -extern struct _si_user * _s_checkfd(/* ??? */); -extern void _s_close(/* ??? */); -extern int _s_do_ioctl(/* ??? */); -extern int _s_getfamily(/* ??? */); -extern int _s_getudata(/* ??? */); -extern int _s_is_ok(/* ??? */); -extern struct netconfig * _s_match(/* ??? */); -extern int _s_max(/* ??? */); -extern int _s_min(/* ??? */); -extern struct _si_user * _s_open(/* ??? */); -extern int _s_soreceive(/* ??? */); -extern int _s_sosend(/* ??? */); -extern int _s_uxpathlen(/* ??? */); -extern int _setecho(int); -extern int _setjmp(jmp_buf); -extern int _setnonl(int); -extern void _setqiflush(int); -extern char * _taddr2uaddr(struct netconfig *, struct netbuf *); -extern int _tolower(int); -extern int _toupper(int); -extern struct netbuf * _uaddr2taddr(struct netconfig *, char *); -extern bool _xdr_yprequest(/* ??? */); -extern bool _xdr_ypresponse(/* ??? */); -extern int _xftw(int, const char *, int (*) (const char *, const struct stat *, int), int); -extern int _xmknod(int, const char *, mode_t, dev_t); -extern int _xstat(int, const char *, struct stat *); -extern int _yp_dobind(/* ??? */); -extern long int a64l(const char *); -extern char * aatos(char *, struct address *, int); -extern void abort(void); -extern int abs(int); -extern int access(const char *, int); -extern int acct(const char *); -extern double acos(double); -extern float acosf(float); -extern double acosh(double); -extern int addexportent(FILE *, char *, char *); -extern int addseverity(int, const char *); -extern int adjtime(struct timeval *, struct timeval *); -extern int advance(const char *, const char *); -extern unsigned int alarm(unsigned int); -extern void * alloca(size_t); -extern int and(void); -extern int ascftime(char *, const char *, const struct tm *); -extern char * asctime(const struct tm *); -extern double asin(double); -extern float asinf(float); -extern double asinh(double); -extern struct address * astoa(char *, struct address *); -extern double atan(double); -extern double atan2(double, double); -extern float atan2f(float, float); -extern float atanf(float); -extern double atanh(double); -extern int atexit(void (*) (void)); -extern double atof(const char *); -extern int atoi(const char *); -extern long int atol(const char *); -extern char * atos(char *, struct netbuf *, int); -extern void auth_destroy(AUTH *); -extern AUTH * authdes_create(/* ??? */); -extern void authdes_getcred(struct authdes_cred *, short *, short *, short *, int *); -extern AUTH * authdes_seccreate(/* ??? */); -extern AUTH * authnone_create(void); -extern AUTH * authsys_create(char *, int, int, int, int *); -extern AUTH * authsys_create_default(void); -extern AUTH * authunix_create(char *, int, int, int, int *); -extern AUTH * authunix_create_default(void); -extern char * basename(char *); -extern int baudrate(void); -extern int bcmp(const void *, const void *, size_t); -extern void bcopy(const void *, void *, size_t); -extern int beep(void); -extern void (* berk_signal(int, void (*) (int, ...))) (int, ...); -extern char * bgets(char *, size_t, FILE *, char *); -extern int bottom_panel(PANEL *); -extern int box32(WINDOW *, chtype, chtype); -extern int brk(void *); -extern void * bsearch(const void *, const void *, size_t, size_t, int (*) (const void *, const void *)); -extern size_t bufsplit(char *, size_t, char *); -extern void bzero(void *, size_t); -extern long int calchash(/* ??? */); -extern void * calloc(size_t, size_t); -extern void callrpc(char *, unsigned long, unsigned long, unsigned long, xdrproc_t, char *, xdrproc_t, char *); -extern bool can_change_color(void); -extern int catclose(nl_catd); -extern char * catgets(nl_catd, int, int, char *); -extern nl_catd catopen(const char *, int); -extern int cbreak(void); -extern double cbrt(double); -extern double ceil(double); -extern float ceilf(float); -extern speed_t cfgetispeed(const struct termios *); -extern speed_t cfgetospeed(const struct termios *); -extern void cfree(void *); -extern int cfsetispeed(struct termios *, speed_t); -extern int cfsetospeed(struct termios *, speed_t); -extern int cftime(char *, char *, const time_t *); -extern int chdir(const char *); -extern int chmod(const char *, mode_t); -extern int chown(const char *, uid_t, gid_t); -extern int chroot(const char *); -extern void clean_GEN_rd(/* ??? */); -extern void cleanup(/* ??? */); -extern void clearerr(FILE *); -extern int clearok(WINDOW *, int); -extern enum clnt_stat clnt_broadcast(unsigned long, unsigned long, unsigned long, xdrproc_t, char *, xdrproc_t, char *, resultproc_t); -extern enum clnt_stat clnt_call(CLIENT *, unsigned long, xdrproc_t, char *, xdrproc_t, char *, struct timeval); -extern bool_t clnt_control(CLIENT *, int, char *); -extern CLIENT * clnt_create(char *, unsigned long, unsigned long, char *); -extern void clnt_destroy(CLIENT *); -extern int clnt_freeres(CLIENT *, xdrproc_t, char *); -extern void clnt_geterr(CLIENT *, struct rpc_err *); -extern void clnt_pcreateerror(char *); -extern void clnt_perrno(enum clnt_stat); -extern void clnt_perror(CLIENT *, char *); -extern char * clnt_spcreateerror(char *); -extern char * clnt_sperrno(enum clnt_stat); -extern char * clnt_sperror(CLIENT *, char *); -extern CLIENT * clnt_tli_create(/* ??? */); -extern CLIENT * clnt_tp_create(/* ??? */); -extern CLIENT * clnt_vc_create(/* ??? */); -extern CLIENT * clntraw_create(unsigned long, unsigned long); -extern CLIENT * clnttcp_create(struct sockaddr_in *, unsigned long, unsigned long, int *, unsigned int, unsigned int *); -extern CLIENT * clntudp_bufcreate(struct sockaddr_in *, unsigned long, unsigned long, struct timeval, int *, unsigned int, unsigned int); -extern CLIENT * clntudp_create(struct sockaddr_in *, unsigned long, unsigned long, struct timeval, int *); -extern clock_t clock(void); -extern int close(int); -extern int closedir(DIR *); -extern int color_content(int, short int *, short int *, short int *); -extern char * compile(const char *, char *, char *); -extern char * copylist(const char *, off_t *); -extern double copysign(double, double); -extern int copywin(WINDOW *, WINDOW *, int, int, int, int, int, int, int); -extern double cos(double); -extern float cosf(float); -extern double cosh(double); -extern float coshf(float); -extern struct rd_user * cr_rduser(/* ??? */); -extern int creat(const char *, mode_t); -extern int crmode(void); -extern char * crypt(const char *, const char *); -extern int crypt_close(int *); -extern char * ctermid(char *); -extern char * ctime(const time_t *); -extern FIELD * current_field(FORM *); -extern ITEM * current_item(MENU *); -extern int curs_set(int); -extern void curserr(void); -extern char * cuserid(char *); -extern int data_ahead(FORM *); -extern int data_behind(FORM *); -extern void dbmclose(void); -extern void dbminit(const char *); -extern int def_prog_mode(void); -extern int def_shell_mode(void); -extern char * defread(/* ??? */); -extern int del_panel(PANEL *); -extern void del_rduser(/* ??? */); -extern void delay(long int); -extern int delay_output(int); -extern void delete(datum); -extern void delscreen(SCREEN *); -extern int delterm(TERMINAL *); -extern int delwin(WINDOW *); -extern WINDOW * derwin(WINDOW *, int, int, int, int); -extern char * des_crypt(const char *, const char *); -extern void des_encrypt(char *, int); -extern void des_setkey(const char *); -extern char * devattr(/* ??? */); -extern int devfree(/* ??? */); -extern char ** devreserv(/* ??? */); -extern int dial(CALL); -extern double difftime(time_t, time_t); -extern char * dirname(char *); -extern div_t div(int, int); -extern int dlclose(void *); -extern char * dlerror(void); -extern void * dlopen(char *, int); -extern void * dlsym(void *, char *); -extern void dma_access(u_char, u_int, u_int, u_char, u_char); -extern int doupdate(void); -extern int drainio(int); -extern double drand48(void); -extern double drem(double, double); -extern int drv_getevtoken(/* ??? */); -extern void drv_relevtoken(/* ??? */); -extern int dup(int); -extern int dup2(int, int); -extern FIELD * dup_field(FIELD *, int, int); -extern WINDOW * dupwin(WINDOW *); -extern int dynamic_field_info(FIELD *, int *, int *, int *); -extern int dysize(int); -extern int eaccess(const char *, int); -extern int echo(void); -extern char * ecvt(double, int, int *, int *); -extern size_t elf32_fsize(Elf_Type, size_t, unsigned int); -extern Elf32_Ehdr * elf32_getehdr(Elf *); -extern Elf32_Phdr * elf32_getphdr(Elf *); -extern Elf32_Shdr * elf32_getshdr(Elf_Scn *); -extern Elf32_Ehdr * elf32_newehdr(Elf *); -extern Elf32_Phdr * elf32_newphdr(Elf *, size_t); -extern Elf_Data * elf32_xlatetof(Elf_Data *, const Elf_Data *, unsigned int); -extern Elf_Data * elf32_xlatetom(Elf_Data *, const Elf_Data *, unsigned int); -extern Elf * elf_begin(int, Elf_Cmd, Elf *); -extern int elf_cntl(Elf *, Elf_Cmd); -extern int elf_end(Elf *); -extern const char * elf_errmsg(int); -extern int elf_errno(void); -extern void elf_fill(int); -extern unsigned int elf_flagdata(Elf_Data *, Elf_Cmd, unsigned int); -extern unsigned int elf_flagehdr(Elf *, Elf_Cmd, unsigned int); -extern unsigned int elf_flagelf(Elf *, Elf_Cmd, unsigned int); -extern unsigned int elf_flagphdr(Elf *, Elf_Cmd, unsigned int); -extern unsigned int elf_flagscn(Elf_Scn *, Elf_Cmd, unsigned int); -extern unsigned int elf_flagshdr(Elf_Scn *, Elf_Cmd, unsigned int); -extern Elf_Arhdr * elf_getarhdr(Elf *); -extern Elf_Arsym * elf_getarsym(Elf *, size_t *); -extern off_t elf_getbase(Elf *); -extern Elf_Data * elf_getdata(Elf_Scn *, Elf_Data *); -extern char * elf_getident(Elf *, size_t *); -extern Elf_Scn * elf_getscn(Elf *, size_t); -extern long unsigned int elf_hash(const char *); -extern Elf_Kind elf_kind(Elf *); -extern size_t elf_ndxscn(Elf_Scn *); -extern Elf_Data * elf_newdata(Elf_Scn *); -extern Elf_Scn * elf_newscn(Elf *); -extern Elf_Cmd elf_next(Elf *); -extern Elf_Scn * elf_nextscn(Elf *, Elf_Scn *); -extern size_t elf_rand(Elf *, size_t); -extern Elf_Data * elf_rawdata(Elf_Scn *, Elf_Data *); -extern char * elf_rawfile(Elf *, size_t *); -extern char * elf_strptr(Elf *, size_t, size_t); -extern off_t elf_update(Elf *, Elf_Cmd); -extern unsigned int elf_version(unsigned int); -extern void encrypt(char *, int); -extern void endgrent(void); -extern int endnetconfig(void *); -extern int endnetpath(void *); -extern void endpwent(void); -extern void endrpcent(void); -extern void endspent(void); -extern void endutent(void); -extern void endutxent(void); -extern int endwin(void); -extern double erand(short *); -extern double erand48(short unsigned int *); -extern char erasechar(void); -extern double erf(double); -extern double erfc(double); -extern int execl(const char *, const char *, ...); -extern int execle(const char *, const char *, ...); -extern int execlp(const char *, const char *, ...); -extern int exect(const char *, const char **, char **); -extern int execv(const char *, char *const *); -extern int execve(const char *, char *const *, char *const *); -extern int execvp(const char *, char *const *); -extern void exit(int); -extern double exp(double); -extern float expf(float); -extern double fabs(double); -extern float fabsf(float); -extern int fattach(int, const char *); -extern int fchdir(int); -extern int fchmod(int, mode_t); -extern int fchown(int, uid_t, gid_t); -extern int fclose(FILE *); -extern int fcntl(int, int, ...); -extern char * fcvt(double, int, int *, int *); -extern int fdetach(const char *); -extern FILE * fdopen(int, const char *); -extern int feof(FILE *); -extern int ferror(FILE *); -extern datum fetch(datum); -extern int fflush(FILE *); -extern int ffs(int); -extern int fgetc(FILE *); -extern struct group * fgetgrent(FILE *); -extern int fgetpos(FILE *, fpos_t *); -extern struct passwd * fgetpwent(FILE *); -extern char * fgets(char *, int, FILE *); -extern struct spwd * fgetspent(FILE *); -extern char * field_arg(FIELD *); -extern chtype field_back(FIELD *); -extern char * field_buffer(FIELD *, int); -extern int field_count(FORM *); -extern chtype field_fore(FIELD *); -extern int field_index(FIELD *); -extern int field_info(FIELD *, int *, int *, int *, int *, int *, int *); -extern PTF_void field_init(FORM *); -extern int field_just(FIELD *); -extern OPTIONS field_opts(FIELD *); -extern int field_opts_off(FIELD *, OPTIONS); -extern int field_opts_on(FIELD *, OPTIONS); -extern int field_pad(FIELD *); -extern int field_status(FIELD *); -extern PTF_void field_term(FORM *); -extern FIELDTYPE * field_type(FIELD *); -extern char * field_userptr(FIELD *); -extern int fileno(FILE *); -extern int filter(void); -extern int finite(double); -extern datum firsthash(/* ??? */); -extern datum firstkey(void); -extern int flash(void); -extern int flock(int, int); -extern double floor(double); -extern float floorf(float); -extern int flushinp(void); -extern double fmod(double, double); -extern float fmodf(float, float); -extern int fmtmsg(long int, const char *, int, const char *, const char *, const char *); -extern FILE * fopen(const char *, const char *); -extern pid_t fork(void); -extern int form_driver(FORM *, int); -extern FIELD ** form_fields(FORM *); -extern PTF_void form_init(FORM *); -extern OPTIONS form_opts(FORM *); -extern int form_opts_off(FORM *, OPTIONS); -extern int form_opts_on(FORM *, OPTIONS); -extern int form_page(FORM *); -extern WINDOW * form_sub(FORM *); -extern PTF_void form_term(FORM *); -extern char * form_userptr(FORM *); -extern WINDOW * form_win(FORM *); -extern long int fpathconf(int, int); -extern fpclass_t fpclass(double); -extern int fpgetmask(void); -extern fp_rnd fpgetround(void); -extern int fpgetsticky(void); -extern int fprintf(FILE *, const char *, ...); -extern int fpsetmask(int); -extern fp_rnd fpsetround(fp_rnd); -extern int fpsetsticky(int); -extern int fputc(int, FILE *); -extern int fputs(const char *, FILE *); -extern size_t fread(void *, size_t, size_t, FILE *); -extern void free(void *); -extern int free_field(FIELD *); -extern int free_fieldtype(FIELDTYPE *); -extern int free_form(FORM *); -extern int free_item(ITEM *); -extern int free_menu(MENU *); -extern void freenetconfigent(struct netconfig *); -extern FILE * freopen(const char *, const char *, FILE *); -extern double frexp(double, int *); -extern int fscanf(FILE *, const char *, ...); -extern int fseek(FILE *, long int, int); -extern int fsetpos(FILE *, const fpos_t *); -extern int fstat(int, struct stat *); -extern int fstatfs(int, struct statfs *, int, int); -extern int fstatvfs(int, struct statvfs *); -extern int fsync(int); -extern long int ftell(FILE *); -extern key_t ftok(const char *, int); -extern int ftruncate(int, off_t); -extern int ftw(const char *, int (*) (const char *, const struct stat *, int), int); -extern size_t fwrite(const void *, size_t, size_t, FILE *); -extern double gamma(double); -extern char * gcvt(double, int, char *); -extern int get_error(/* ??? */); -extern chtype getattrs(WINDOW *); -extern int getbegx(WINDOW *); -extern int getbegy(WINDOW *); -extern chtype getbkgd(WINDOW *); -extern long unsigned int getbmap(void); -extern int getc(FILE *); -extern char * getcap(/* ??? */); -extern int getchar(void); -extern int getcontext(ucontext_t *); -extern int getcurx(WINDOW *); -extern int getcury(WINDOW *); -extern char * getcwd(char *, size_t); -extern struct tm * getdate(const char *); -extern int getdents(int, struct dirent *, unsigned int); -extern char ** getdev(/* ??? */); -extern char ** getdgrp(/* ??? */); -extern int getdomainname(char *, int); -extern int getdtablesize(void); -extern gid_t getegid(void); -extern char * getenv(const char *); -extern struct errhdr * geterec(/* ??? */); -extern struct errhdr * geteslot(/* ??? */); -extern uid_t geteuid(void); -extern gid_t getgid(void); -extern struct group * getgrent(void); -extern struct group * getgrgid(gid_t); -extern struct group * getgrnam(const char *); -extern int getgroups(int, TARGET_GETGROUPS_T []); -extern struct hostent * gethostbyaddr(/* ??? */); -extern struct hostent * gethostbyname(/* ??? */); -extern struct hostent * gethostent(/* ??? */); -#ifdef __alpha__ -extern int gethostid(void); -#else -extern long gethostid(void); -#endif -extern int gethostname(char *, size_t); -extern int getitimer(int, struct itimerval *); -extern char * getlogin(void); -extern int getmaxx(WINDOW *); -extern int getmaxy(WINDOW *); -extern int getmntany(FILE *, struct mnttab *, struct mnttab *); -extern int getmntent(/* ??? */); -extern long unsigned int getmouse(void); -extern int getmsg(int, struct strbuf *, struct strbuf *, int *); -extern struct netent * getnetbyaddr(/* ??? */); -extern struct netent * getnetbyname(/* ??? */); -extern struct netconfig * getnetconfig(void *); -extern struct netconfig * getnetconfigent(char *); -extern struct netent * getnetent(/* ??? */); -extern struct netconfig * getnetpath(void *); -extern int getopt(int, char *const *, const char *); -extern int getpagesize(void); -extern int getparx(WINDOW *); -extern int getpary(WINDOW *); -extern char * getpass(const char *); -extern pid_t getpgid(pid_t); -extern pid_t getpgrp(void); -extern pid_t getpgrp2(pid_t); -extern pid_t getpid(void); -extern int getpmsg(int, struct strbuf *, struct strbuf *, int *, int *); -extern pid_t getppid(void); -extern int getpriority(int, int); -extern struct protoent * getprotobyname(/* ??? */); -extern struct protoent * getprotobynumber(/* ??? */); -extern struct protoent * getprotoent(/* ??? */); -extern int getpw(int, char *); -extern struct passwd * getpwent(void); -extern struct passwd * getpwnam(const char *); -extern struct passwd * getpwuid(uid_t); -extern int getrlimit(int, struct rlimit *); -extern int getrnge(char *); -extern struct rpcent * getrpcbyname(const char *); -extern struct rpcent * getrpcbynumber(int); -extern struct rpcent * getrpcent(void); -extern int getrusage(int, struct rusage *); -extern char * gets(char *); -extern struct servent * getservbyname(/* ??? */); -extern struct servent * getservbyport(/* ??? */); -extern struct servent * getservent(/* ??? */); -extern pid_t getsid(pid_t); -extern struct spwd * getspent(void); -extern struct spwd * getspnam(const char *); -extern int getsubopt(char **, char *const *, char **); -extern int gettmode(void); -extern char * gettxt(const char *, const char *); -extern uid_t getuid(void); -extern struct utmp * getutent(void); -extern struct utmp * getutid(const struct utmp *); -extern struct utmp * getutline(const struct utmp *); -extern void getutmp(const struct utmpx *, struct utmp *); -extern void getutmpx(const struct utmp *, struct utmpx *); -extern struct utmpx * getutxent(void); -extern struct utmpx * getutxid(const struct utmpx *); -extern struct utmpx * getutxline(const struct utmpx *); -extern int getvfsany(FILE *, struct vfstab *, struct vfstab *); -extern int getvfsent(FILE *, struct vfstab *); -extern int getvfsfile(FILE *, struct vfstab *, char *); -extern int getvfsspec(FILE *, struct vfstab *, char *); -extern int getvol(/* ??? */); -extern int getw(FILE *); -extern char * getwd(char *); -extern void getwidth(eucwidth_t *); -extern WINDOW * getwin(FILE *); -extern int gmatch(const char *, const char *); -extern struct tm * gmtime(const time_t *); -extern int gsignal(int); -extern int halfdelay(int); -extern bool has_colors(void); -extern int has_ic(void); -extern int has_il(void); -extern long int hashinc(/* ??? */); -extern char * hasmntopt(/* ??? */); -extern int hcreate(size_t); -extern void hdestroy(void); -extern int hide_panel(PANEL *); -extern int host2netname(char *, char *, char *); -extern int hrtalarm(hrtcmd_t *, int); -extern int hrtcancel(const long int *, int); -extern int hrtcntl(int, int, interval_t *, hrtime_t *); -extern int hrtsleep(hrtcmd_t *); -extern ENTRY * hsearch(ENTRY, ACTION); -extern long unsigned int htonl(long unsigned int); -extern short unsigned int htons(unsigned int); -extern double hypot(double, double); -extern void idcok(WINDOW *, int); -extern int idlok(WINDOW *, int); -extern void immedok(WINDOW *, int); -extern char * index(const char *, int); -extern long unsigned int inet_addr(/* ??? */); -extern struct in_addr inet_makeaddr(/* ??? */); -extern long unsigned int inet_network(/* ??? */); -extern char * inet_ntoa(/* ??? */); -extern int init_color(int, int, int, int); -extern int init_pair(int, int, int); -extern int initgroups(const char *, gid_t); -extern WINDOW * initscr(/* ??? */); -extern WINDOW * initscr32(void); -extern char * initstate(unsigned, char *, int); -extern void insque(struct qelem *, struct qelem *); -extern int intrflush(WINDOW *, int); -extern int ioctl(int, int, ...); -extern int is_linetouched(WINDOW *, int); -extern int is_wintouched(WINDOW *); -extern int isalnum(int); -extern int isalpha(int); -extern int isascii(int); -extern int isatty(int); -extern int iscntrl(int); -extern int isdigit(int); -extern int isencrypt(const char *, size_t); -extern int isendwin(void); -extern int isgraph(int); -extern int isinf(double); -extern int islower(int); -extern int isnan(double); -extern int isnand(double); -extern int isnanf(float); -extern int isprint(int); -extern int ispunct(int); -extern int isspace(int); -extern int isupper(int); -extern int isxdigit(int); -extern int item_count(MENU *); -extern char * item_description(ITEM *); -extern int item_index(ITEM *); -extern PTF_void item_init(MENU *); -extern char * item_name(ITEM *); -extern OPTIONS item_opts(ITEM *); -extern int item_opts_off(ITEM *, OPTIONS); -extern int item_opts_on(ITEM *, OPTIONS); -extern PTF_void item_term(MENU *); -extern char * item_userptr(ITEM *); -extern int item_value(ITEM *); -extern int item_visible(ITEM *); -extern long int itol(/* ??? */); -extern double j0(double); -extern double j1(double); -extern double jn(int, double); -extern long int jrand48(short unsigned int *); -extern char * keyname(int); -extern int keypad(WINDOW *, int); -extern int kill(pid_t, int); -extern char killchar(void); -extern int killpg(int, int); -extern void l3tol(long int *, const char *, int); -extern char * l64a(long int); -extern long int labs(long int); -extern dl_t ladd(/* ??? */); -extern int lchown(const char *, uid_t, gid_t); -extern int lckpwdf(void); -extern void lcong48(short unsigned int *); -extern int ldaclose(struct ldfile *); -extern int ldahread(struct ldfile *, archdr *); -extern struct ldfile * ldaopen(const char *, struct ldfile *); -extern int ldclose(struct ldfile *); -extern double ldexp(double, int); -extern int ldfhread(struct ldfile *, struct filehdr *); -extern char * ldgetname(struct ldfile *, const struct syment *); -extern ldiv_t ldiv(long int, long int); -extern dl_t ldivide(/* ??? */); -extern int ldlinit(struct ldfile *, long int); -extern int ldlitem(struct ldfile *, unsigned int, struct lineno *); -extern int ldlread(struct ldfile *, long int, unsigned int, struct lineno *); -extern int ldlseek(struct ldfile *, unsigned int); -extern int ldnlseek(struct ldfile *, const char *); -extern int ldnrseek(struct ldfile *, const char *); -extern int ldnshread(struct ldfile *, const char *, struct scnhdr *); -extern int ldnsseek(struct ldfile *, const char *); -extern int ldohseek(struct ldfile *); -extern struct ldfile * ldopen(const char *, struct ldfile *); -extern int ldrseek(struct ldfile *, unsigned int); -extern int ldshread(struct ldfile *, unsigned int, struct scnhdr *); -extern int ldsseek(struct ldfile *, unsigned int); -extern long int ldtbindex(struct ldfile *); -extern int ldtbread(struct ldfile *, long int, struct syment *); -extern int ldtbseek(struct ldfile *); -extern int leaveok(WINDOW *, int); -extern dl_t lexp10(/* ??? */); -extern void * lfind(const void *, const void *, size_t *, size_t, int (*) (const void *, const void *)); -extern double lgamma(double); -extern int link(const char *, const char *); -extern FIELD * link_field(FIELD *, int, int); -extern FIELDTYPE * link_fieldtype(FIELDTYPE *, FIELDTYPE *); -extern char ** listdev(/* ??? */); -extern char ** listdgrp(/* ??? */); -extern dl_t llog10(/* ??? */); -extern dl_t lmul(/* ??? */); -extern struct lconv * localeconv(void); -extern struct tm * localtime(const time_t *); -extern int lock(int, int, long); -extern int lockf(int, int, off_t); -extern double log(double); -extern double log10(double); -extern float log10f(float); -extern double logb(double); -extern float logf(float); -extern char * logname(void); -extern void longjmp(jmp_buf, int); -extern char * longname(void); -extern long int lrand48(void); -extern void * lsearch(const void *, void *, size_t *, size_t, int (*) (const void *, const void *)); -extern off_t lseek(int, off_t, int); -extern dl_t lshiftl(/* ??? */); -extern int lstat(const char *, struct stat *); -extern dl_t lsub(/* ??? */); -extern void ltol3(char *, const long int *, int); -extern int m_addch(int); -extern int m_addstr(char *); -extern int m_clear(void); -extern int m_erase(void); -extern WINDOW * m_initscr(void); -extern int m_move(int, int); -extern SCREEN * m_newterm(char *, FILE *, FILE *); -extern int m_refresh(void); -extern int maillock(char *, int); -extern int mailunlock(void); -extern major_t major(dev_t); -extern datum makdatum(/* ??? */); -extern void makecontext(ucontext_t *, void (*) (/* ??? */), int, ...); -extern dev_t makedev(major_t, minor_t); -extern struct utmpx * makeutx(const struct utmpx *); -extern struct mallinfo mallinfo(void); -extern void * malloc(size_t); -extern int mallopt(int, int); -extern int map_button(long unsigned int); -extern int matherr(struct exception *); -extern int mbftowc(char *, wchar_t *, int (*) (/* ??? */), int *); -extern int mblen(const char *, size_t); -extern size_t mbstowcs(wchar_t *, const char *, size_t); -extern int mbtowc(wchar_t *, const char *, size_t); -extern void * memalign(size_t, size_t); -extern void * memccpy(void *, const void *, int, size_t); -extern void * memchr(const void *, int, size_t); -extern int memcmp(const void *, const void *, size_t); -extern void * memcpy(void *, const void *, size_t); -extern int memlock(/* ??? */); -extern int memlocked(/* ??? */); -extern void * memmove(void *, const void *, size_t); -extern void * memset(void *, int, size_t); -extern int memunlock(/* ??? */); -extern chtype menu_back(MENU *); -extern int menu_driver(MENU *, int); -extern chtype menu_fore(MENU *); -extern void menu_format(MENU *, int *, int *); -extern chtype menu_grey(MENU *); -extern PTF_void menu_init(MENU *); -extern ITEM ** menu_items(MENU *); -extern char * menu_mark(MENU *); -extern OPTIONS menu_opts(MENU *); -extern int menu_opts_off(MENU *, OPTIONS); -extern int menu_opts_on(MENU *, OPTIONS); -extern int menu_pad(MENU *); -extern char * menu_pattern(MENU *); -extern WINDOW * menu_sub(MENU *); -extern PTF_void menu_term(MENU *); -extern char * menu_userptr(MENU *); -extern WINDOW * menu_win(MENU *); -extern int meta(WINDOW *, int); -extern void mfree(struct map *, size_t, u_long); -extern int mincore(caddr_t, size_t, char *); -extern minor_t minor(dev_t); -extern int mkdir(const char *, mode_t); -extern int mkdirp(const char *, mode_t); -extern int mkfifo(const char *, mode_t); -extern int mknod(const char *, mode_t, dev_t); -extern int mkstemp(char *); -extern char * mktemp(char *); -extern time_t mktime(struct tm *); -extern caddr_t mmap(/* ??? */); -extern double modf(double, double *); -extern float modff(float, float *); -extern struct utmpx * modutx(const struct utmpx *); -extern void monitor(int (*) (/* ??? */), int (*) (/* ??? */), WORD *, int, int); -extern int mount(const char *, const char *, int, ...); -extern int mouse_off(long int); -extern int mouse_on(long int); -extern int mouse_set(long int); -extern int move_field(FIELD *, int, int); -extern int move_panel(PANEL *, int, int); -extern int mprotect(/* ??? */); -extern long int mrand48(void); -extern int msgctl(int, int, ...); -extern int msgget(key_t, int); -extern int msgrcv(int, void *, size_t, long int, int); -extern int msgsnd(int, const void *, size_t, int); -extern int munmap(/* ??? */); -extern int mvcur(int, int, int, int); -extern int mvderwin(WINDOW *, int, int); -extern int mvprintw(int, int, ...); -extern int mvscanw(int, int, ...); -extern int mvwin(WINDOW *, int, int); -extern int mvwprintw(WINDOW *, int, int, ...); -extern int mvwscanw(WINDOW *, int, int, ...); -extern int napms(int); -extern void netdir_free(char *, int); -extern int netdir_getbyaddr(struct netconfig *, struct nd_hostservlist **, struct netbuf *); -extern int netdir_getbyname(struct netconfig *, struct nd_hostserv *, struct nd_addrlist **); -extern int netdir_options(struct netconfig *, int, int, char *); -extern void netdir_perror(char *); -extern char * netdir_sperror(/* ??? */); -extern FIELD * new_field(int, int, int, int, int, int); -extern FIELDTYPE * new_fieldtype(PTF_int, PTF_int); -extern FORM * new_form(FIELD **); -extern ITEM * new_item(char *, char *); -extern MENU * new_menu(ITEM **); -extern int new_page(FIELD *); -extern PANEL * new_panel(WINDOW *); -extern int newkey(char *, int, int); -extern WINDOW * newpad(int, int); -extern SCREEN * newscreen(char *, int, int, int, FILE *, FILE *); -extern SCREEN * newterm32(char *, FILE *, FILE *); -extern WINDOW * newwin(int, int, int, int); -extern double nextafter(double, double); -extern datum nextkey(datum); -extern int nftw(const char *, int (*) (const char *, const struct stat *, int, struct FTW *), int, int); -extern int nice(int); -extern int nl(void); -extern char * nl_langinfo(nl_item); -extern int nlist(const char *, struct nlist *); -extern int nocbreak(void); -extern int nocrmode(void); -extern int nodelay(WINDOW *, int); -extern int noecho(void); -extern int nonl(void); -extern int noraw(void); -extern int notimeout(WINDOW *, int); -extern long int nrand48(short unsigned int *); -extern int ns_close(/* ??? */); -extern struct nssend * ns_rcv(/* ??? */); -extern int ns_send(/* ??? */); -extern int ns_setup(/* ??? */); -extern long unsigned int ntohl(long unsigned int); -extern short unsigned int ntohs(unsigned int); -extern int nuname(struct utsname *); -extern int open(const char *, int, ...); -extern DIR * opendir(const char *); -extern int openprivwait(/* ??? */); -extern int openwait(/* ??? */); -extern int overlay(WINDOW *, WINDOW *); -extern int overwrite(WINDOW *, WINDOW *); -extern int p2close(FILE **); -extern int p2open(const char *, FILE **); -extern int p32echochar(WINDOW *, chtype); -extern char * p_cdname(/* ??? */); -extern char * p_class(/* ??? */); -extern char * p_rr(/* ??? */); -extern char * p_type(/* ??? */); -extern int pair_content(int, short int *, short int *); -extern PANEL * panel_above(PANEL *); -extern PANEL * panel_below(PANEL *); -extern char * panel_userptr(PANEL *); -extern WINDOW * panel_window(PANEL *); -extern long int pathconf(const char *, int); -extern char * pathfind(const char *, const char *, const char *); -extern int pause(void); -extern int pclose(FILE *); -extern void perror(const char *); -extern struct pfdat * pfind(/* ??? */); -extern int pglstlk(/* ??? */); -extern int pglstunlk(/* ??? */); -extern int pid_slot(proc_t *); -extern int pipe(int *); -extern int plock(int); -extern struct pmaplist * pmap_getmaps(/* ??? */); -extern u_short pmap_getport(/* ??? */); -extern enum clnt_stat pmap_rmtcall(/* ??? */); -extern int pmap_set(/* ??? */); -extern int pmap_unset(/* ??? */); -extern int pnoutrefresh(WINDOW *, int, int, int, int, int, int); -extern int poll(struct pollfd *, long unsigned int, int); -extern FILE * popen(const char *, const char *); -extern int pos_form_cursor(FORM *); -extern int pos_menu_cursor(MENU *); -extern int post_form(FORM *); -extern int post_menu(MENU *); -extern double pow(double, double); -extern float powf(float, float); -extern int prefresh(WINDOW *, int, int, int, int, int, int); -extern int printf(const char *, ...); -extern int printw(char *, ...); -extern void privsig(/* ??? */); -extern void profil(short unsigned int *, size_t, int, unsigned int); -extern void psiginfo(siginfo_t *, char *); -extern void psignal(int, const char *); -extern int ptrace(int, pid_t, int, int); -extern int putc(int, FILE *); -extern int putchar(int); -extern int putenv(char *); -extern int putmsg(int, const struct strbuf *, const struct strbuf *, int); -extern int putp(char *); -extern int putpmsg(int, const struct strbuf *, const struct strbuf *, int, int); -extern int putpwent(const struct passwd *, FILE *); -extern int puts(const char *); -extern int putspent(const struct spwd *, FILE *); -extern struct utmp * pututline(const struct utmp *); -extern struct utmpx * pututxline(const struct utmpx *); -extern int putw(int, FILE *); -extern int putwin(WINDOW *, FILE *); -extern void qsort(void *, size_t, size_t, int (*) (const void *, const void *)); -extern int raise(int); -extern int rand(void); -extern long random(void); -extern int raw(void); -extern ssize_t read(int, void *, size_t); -extern struct dirent * readdir(DIR *); -extern ssize_t readlink(const char *, char *, size_t); -extern void * realloc(void *, size_t); -extern char * realpath(char *, char *); -extern int redrawwin(WINDOW *); -extern char * regcmp(const char *, ...); -extern char * regex(const char *, const char *, ...); -extern double remainder(double, double); -extern int remio(/* ??? */); -extern int remove(const char *); -extern void remque(struct qelem *); -extern int rename(const char *, const char *); -extern int replace_panel(PANEL *, WINDOW *); -extern int request_mouse_pos(void); -extern struct reservdev ** reservdev(/* ??? */); -extern int reset_prog_mode(void); -extern int reset_shell_mode(void); -extern int resetty(void); -extern int restartterm(char *, int, int *); -extern void rewind(FILE *); -extern void rewinddir(DIR *); -extern int rf_falloc(/* ??? */); -extern char * rindex(const char *, int); -extern double rint(double); -extern int ripoffline(int, int (*) (WINDOW *, int)); -extern int rmdir(const char *); -extern int rmdirp(char *, char *); -extern enum clnt_stat rpc_broadcast(/* ??? */); -extern enum clnt_stat rpc_call(/* ??? */); -extern int rpcb_getaddr(/* ??? */); -extern RPCBLIST * rpcb_getmaps(/* ??? */); -extern int rpcb_gettime(/* ??? */); -extern enum clnt_stat rpcb_rmtcall(/* ??? */); -extern int rpcb_set(/* ??? */); -extern char * rpcb_taddr2uaddr(/* ??? */); -extern struct netbuf * rpcb_uaddr2taddr(/* ??? */); -extern int rpcb_unset(/* ??? */); -extern void rpctest_service(/* ??? */); -extern int run_crypt(long int, char *, unsigned int, int *); -extern int run_setkey(int *, const char *); -extern int savetty(void); -extern void * sbrk(int); -extern double scalb(double, double); -extern int scale_form(FORM *, int *, int *); -extern int scale_menu(MENU *, int *, int *); -extern int scanf(const char *, ...); -extern int scanw(char *, ...); -extern int scr_dump(char *); -extern int scr_init(char *); -extern int scr_restore(char *); -extern int scroll(WINDOW *); -extern int scrollok(WINDOW *, int); -extern int scrwidth(wchar_t); -extern int sdfree(char *); -extern char * sdget(char *, int, ...); -extern short unsigned int * seed48(short unsigned int *); -extern void seekdir(DIR *, long int); -extern int semctl(int, int, int, ...); -extern int semget(key_t, int, int); -extern int semop(int, struct sembuf *, unsigned int); -extern int send(int, char *, int, int); -extern int set_current_field(FORM *, FIELD *); -extern int set_current_item(MENU *, ITEM *); -extern int set_field_back(FIELD *, chtype); -extern int set_field_buffer(FIELD *, int, char *); -extern int set_field_fore(FIELD *, chtype); -extern int set_field_init(FORM *, PTF_void); -extern int set_field_just(FIELD *, int); -extern int set_field_opts(FIELD *, OPTIONS); -extern int set_field_pad(FIELD *, int); -extern int set_field_status(FIELD *, int); -extern int set_field_term(FORM *, PTF_void); -extern int set_field_type(FIELD *, FIELDTYPE *, ...); -extern int set_field_userptr(FIELD *, char *); -extern int set_fieldtype_arg(FIELDTYPE *, PTF_charP, PTF_charP, PTF_void); -extern int set_fieldtype_choice(FIELDTYPE *, PTF_int, PTF_int); -extern int set_form_fields(FORM *, FIELD **); -extern int set_form_init(FORM *, PTF_void); -extern int set_form_opts(FORM *, OPTIONS); -extern int set_form_page(FORM *, int); -extern int set_form_sub(FORM *, WINDOW *); -extern int set_form_term(FORM *, PTF_void); -extern int set_form_userptr(FORM *, char *); -extern int set_form_win(FORM *, WINDOW *); -extern int set_item_init(MENU *, PTF_void); -extern int set_item_opts(ITEM *, OPTIONS); -extern int set_item_term(MENU *, PTF_void); -extern int set_item_userptr(ITEM *, char *); -extern int set_item_value(ITEM *, int); -extern int set_max_field(FIELD *, int); -extern int set_menu_back(MENU *, chtype); -extern int set_menu_fore(MENU *, chtype); -extern int set_menu_format(MENU *, int, int); -extern int set_menu_grey(MENU *, chtype); -extern int set_menu_init(MENU *, PTF_void); -extern int set_menu_items(MENU *, ITEM **); -extern int set_menu_mark(MENU *, char *); -extern int set_menu_opts(MENU *, OPTIONS); -extern int set_menu_pad(MENU *, int); -extern int set_menu_pattern(MENU *, char *); -extern int set_menu_sub(MENU *, WINDOW *); -extern int set_menu_term(MENU *, PTF_void); -extern int set_menu_userptr(MENU *, char *); -extern int set_menu_win(MENU *, WINDOW *); -extern int set_new_page(FIELD *, int); -extern int set_panel_userptr(PANEL *, char *); -extern int set_top_row(MENU *, int); -extern void setbuf(FILE *, char *); -extern int setcontext(ucontext_t *); -extern SCREEN * setcurscreen(SCREEN *); -extern TERMINAL * setcurterm(TERMINAL *); -extern FILE * setexportent(void); -extern int setgid(gid_t); -extern void setgrent(void); -extern int setgroups(int, const gid_t *); -extern int sethostname(char *, int); -extern int setitimer(int, struct itimerval *, struct itimerval *); -extern int setjmp(jmp_buf); -extern void setkey(const char *); -extern char * setlocale(int, const char *); -extern FILE * setmntent(char *, char *); -extern void * setnetconfig(void); -extern void * setnetpath(void); -extern int setpgid(pid_t, pid_t); -extern pid_t setpgrp(void); -extern int setpgrp2(pid_t, pid_t); -extern int setpriority(int, int, int); -extern int setprivwait(/* ??? */); -extern void setpwent(void); -extern int setregid(gid_t, gid_t); -extern int setreuid(uid_t, uid_t); -extern int setrlimit(int, struct rlimit *); -extern int setrpcent(int); -extern pid_t setsid(void); -extern void setspent(void); -extern char * setstate(char *); -extern int setsyx(int, int); -extern int setterm(char *); -extern int setuid(uid_t); -extern int setupterm(char *, int, int *); -extern void setutent(void); -extern void setutxent(void); -extern int setvbuf(FILE *, char *, int, size_t); -extern long int sgetl(const char *); -extern void * shmat(int, void *, int); -extern int shmctl(int, int, ...); -extern int shmdt(void *); -extern int shmget(key_t, int, int); -extern int show_panel(PANEL *); -extern int sigaction(int, const struct sigaction *, struct sigaction *); -extern int sigaddset(sigset_t *, int); -extern int sigaltstack(const stack_t *, stack_t *); -extern int sigblock(int); -extern int sigdelset(sigset_t *, int); -extern int sigemptyset(sigset_t *); -extern int sigfillset(sigset_t *); -extern int sighold(int); -extern int sigignore(int); -extern int siginterrupt(int, int); -extern int sigismember(const sigset_t *, int); -extern void siglongjmp(sigjmp_buf, int); -extern signal_ret_t (* signal(int, signal_ret_t (*) (int))) (int); -extern int sigpause(int); -extern int sigpending(sigset_t *); -extern int sigprocmask(int, const sigset_t *, sigset_t *); -extern int sigrelse(int); -extern int sigsend(idtype_t, id_t, int); -extern int sigsendset(const procset_t *, int); -extern void (* sigset(int, void (*) (int))) (int); -extern int sigsetjmp(sigjmp_buf, int); -extern int sigsetmask(int); -extern int sigsuspend(sigset_t *); -extern double sin(double); -extern float sinf(float); -extern double sinh(double); -extern float sinhf(float); -extern unsigned int sleep(unsigned int); -extern int slk_attroff(chtype); -extern int slk_attron(chtype); -extern int slk_attrset(chtype); -extern int slk_clear(void); -extern int slk_init(int); -extern char * slk_label(int); -extern int slk_noutrefresh(void); -extern int slk_refresh(void); -extern int slk_restore(void); -extern int slk_set(int, char *, int); -extern int slk_start(int, int *); -extern int slk_touch(void); -extern int socket (int, int, int); -extern void * sprayproc_clear_1(/* ??? */); -extern spraycumul * sprayproc_get_1(/* ??? */); -extern void * sprayproc_spray_1(/* ??? */); -extern int sprintf(char *, const char *, ...); -extern void sputl(long int, char *); -extern double sqrt(double); -extern float sqrtf(float); -extern void srand(unsigned int); -extern void srand48(long int); -extern void srandom(int); -extern int sscanf(const char *, const char *, ...); -extern int (* ssignal(int, int (*) (int))) (int); -extern int start_color(void); -extern int stat(const char *, struct stat *); -extern int statfs(const char *, struct statfs *, int, int); -extern int statvfs(const char *, struct statvfs *); -extern int step(const char *, const char *); -extern int stime(const time_t *); -extern struct netbuf * stoa(char *, struct netbuf *); -extern void store(datum, datum); -extern char * strcadd(char *, const char *); -extern int strcasecmp(const char *, const char *); -extern char * strcat(char *, const char *); -extern char * strccpy(char *, const char *); -extern char * strchr(const char *, int); -extern void strclearctty(/* ??? */); -extern void strclearpg(/* ??? */); -extern void strclearsid(/* ??? */); -extern int strcmp(const char *, const char *); -extern int strcoll(const char *, const char *); -extern char * strcpy(char *, const char *); -extern size_t strcspn(const char *, const char *); -extern char * strdup(const char *); -extern char * streadd(char *, const char *, const char *); -extern char * strecpy(char *, const char *, const char *); -extern char * strerror(int); -extern int strfind(const char *, const char *); -extern size_t strftime(char *, size_t, const char *, const struct tm *); -extern size_t strlen(const char *); -extern int strncasecmp(const char *, const char *, size_t); -extern char * strncat(char *, const char *, size_t); -extern int strncmp(const char *, const char *, size_t); -extern char * strncpy(char *, const char *, size_t); -extern char * strpbrk(const char *, const char *); -extern char * strrchr(const char *, int); -extern char * strrspn(const char *, const char *); -extern size_t strspn(const char *, const char *); -extern char * strstr(const char *, const char *); -extern double strtod(const char *, char **); -extern char * strtok(char *, const char *); -extern long int strtol(const char *, char **, int); -extern long unsigned int strtoul(const char *, char **, int); -extern char * strtrns(const char *, const char *, const char *, char *); -extern size_t strxfrm(char *, const char *, size_t); -extern WINDOW * subpad(WINDOW *, int, int, int, int); -extern WINDOW * subwin(WINDOW *, int, int, int, int); -extern int svc_create(/* ??? */); -extern SVCXPRT * svc_fd_create(/* ??? */); -extern void svc_getreqset(/* ??? */); -extern SVCXPRT * svc_raw_create(/* ??? */); -extern int svc_reg(/* ??? */); -extern SVCXPRT * svc_tli_create(/* ??? */); -extern SVCXPRT * svc_tp_create(/* ??? */); -extern void svc_unreg(/* ??? */); -extern SVCXPRT * svc_vc_create(/* ??? */); -extern void svcerr_systemerr(/* ??? */); -extern SVCXPRT * svcfd_create(/* ??? */); -extern SVCXPRT * svcraw_create(/* ??? */); -extern SVCXPRT * svctcp_create(/* ??? */); -extern SVCXPRT * svcudp_bufcreate(/* ??? */); -extern SVCXPRT * svcudp_create(/* ??? */); -extern void swab(const char *, char *, int); -extern int swapcontext(ucontext_t *, ucontext_t *); -extern int symlink(const char *, const char *); -extern void sync(void); -extern int syncok(WINDOW *, int); -extern int syscall(int, ...); -extern long int sysconf(int); -extern int sysfs(int, ...); -extern int sysinfo(int, char *, long int); -extern int system(const char *); -extern char * taddr2uaddr(struct netconfig *, struct netbuf *); -extern double tan(double); -extern float tanf(float); -extern double tanh(double); -extern float tanhf(float); -extern int tcdrain(int); -extern int tcflow(int, int); -extern int tcflush(int, int); -extern int tcgetattr(int, struct termios *); -extern pid_t tcgetpgrp(int); -extern pid_t tcgetsid(int); -extern int tcsendbreak(int, int); -extern int tcsetattr(int, int, const struct termios *); -extern int tcsetpgrp(int, pid_t); -extern void * tdelete(const void *, void **, int (*) (const void *, const void *)); -extern long int telldir(DIR *); -extern char * tempnam(const char *, const char *); -extern chtype termattrs(void); -extern void termerr(void); -extern char * termname(void); -extern void * tfind(const void *, void *const *, int (*) (const void *, const void *)); -extern int tgetent(char *, char *); -extern int tgetflag(char *); -extern int tgetnum(char *); -extern char * tgetstr(char *, char **); -extern char * tgoto(char *, int, int); -extern char * tigetstr(char *); -extern time_t time(time_t *); -extern clock_t times(struct tms *); -extern char * timezone(int, int); -extern void tinputfd(int); -extern FILE * tmpfile(void); -extern char * tmpnam(char *); -extern int toascii(int); -extern int tolower(int); -extern int top_panel(PANEL *); -extern int top_row(MENU *); -extern int touchline(WINDOW *, int, int); -extern int touchwin(WINDOW *); -extern int toupper(int); -extern char * tparm(/* ??? */); -extern int tputs(char *, int, int (*) (char)); -extern int traceoff(void); -extern int traceon(void); -extern int truncate(const char *, off_t); -extern void * tsearch(const void *, void **, int (*) (const void *, const void *)); -extern char * ttyname(int); -extern int ttyslot(void); -extern void twalk(void *, void (*) (void *, VISIT, int)); -extern int typeahead(int); -extern void tzset(void); -extern struct netbuf * uaddr2taddr(struct netconfig *, char *); -extern int uadmin(int, int, int); -extern unsigned ualarm(unsigned, unsigned); -extern int ulckpwdf(void); -extern long int ulimit(int, ...); -extern mode_t umask(mode_t); -extern int umount(const char *); -extern int uname(struct utsname *); -extern char * unctrl(int); -extern void undial(int); -extern int ungetc(int, FILE *); -extern int ungetch(int); -extern int unlink(const char *); -extern int unordered(double, double); -extern int unpost_form(FORM *); -extern int unpost_menu(MENU *); -extern int unremio(/* ??? */); -extern int untouchwin(WINDOW *); -extern void update_panels(void); -extern void updwtmp(const char *, struct utmp *); -extern void updwtmpx(const char *, struct utmpx *); -extern void use_env(int); -extern unsigned usleep(unsigned); -extern int ustat(dev_t, struct ustat *); -extern int utime(const char *, const struct utimbuf *); -extern int utmpname(const char *); -extern int utmpxname(const char *); -extern void va_end(__gnuc_va_list); -extern int vadvise(int); -extern void * valloc(size_t); -extern pid_t vfork(void); -extern int vfprintf(FILE *, const char *, __gnuc_va_list); -extern int vhangup(void); -extern int vid32attr(chtype); -extern int vid32puts(chtype, int (*) (char)); -extern void vidupdate(chtype, chtype, int (*) (char)); -extern int vn_close(/* ??? */); -extern int vprintf(const char *, __gnuc_va_list); -extern int vsprintf(char *, const char *, __gnuc_va_list); -extern int vwprintw(WINDOW *, char *, void *); -extern int vwscanw(WINDOW *, char *, void *); -extern int w32addch(WINDOW *, chtype); -extern int w32attroff(WINDOW *, chtype); -extern int w32attron(WINDOW *, chtype); -extern int w32attrset(WINDOW *, chtype); -extern int w32echochar(WINDOW *, chtype); -extern int w32insch(WINDOW *, chtype); -extern int waddchnstr(WINDOW *, chtype *, int); -extern int waddnstr(WINDOW *, char *, int); -extern int waddstr(WINDOW *, char *); -extern pid_t wait(wait_arg_t *); -extern pid_t wait3(union wait *, int, struct rusage *); -extern int waitid(idtype_t, id_t, siginfo_t *, int); -extern pid_t waitpid(pid_t, int *, int); -extern void * wallproc_wall_1(/* ??? */); -extern int wbkgd(WINDOW *, chtype); -extern void wbkgdset(WINDOW *, chtype); -extern int wborder(WINDOW *, chtype, chtype, chtype, chtype, chtype, chtype, chtype, chtype); -extern int wclear(WINDOW *); -extern int wclrtobot(WINDOW *); -extern int wclrtoeol(WINDOW *); -extern size_t wcstombs(char *, const wchar_t *, size_t); -extern int wctomb(char *, wchar_t); -extern void wcursyncup(WINDOW *); -extern int wdelch(WINDOW *); -extern int wdeleteln(WINDOW *); -extern int werase(WINDOW *); -extern int wgetch(WINDOW *); -extern int wgetnstr(WINDOW *, char *, int); -extern int wgetstr(WINDOW *, char *); -extern int whline(WINDOW *, chtype, int); -extern chtype winch(WINDOW *); -extern int winchnstr(WINDOW *, chtype *, int); -extern int winchstr(WINDOW *, chtype *); -extern int winnstr(WINDOW *, char *, int); -extern int winsdelln(WINDOW *, int); -extern int winsertln(WINDOW *); -extern int winsnstr(WINDOW *, char *, int); -extern int winstr(WINDOW *, char *); -extern int wisprint(wchar_t); -extern void wmouse_position(WINDOW *, int *, int *); -extern int wmove(WINDOW *, int, int); -extern int wnoutrefresh(WINDOW *); -extern int wprintw(WINDOW *, ...); -extern int wredrawln(WINDOW *, int, int); -extern int wrefresh(WINDOW *); -extern ssize_t write(int, const void *, size_t); -extern int wscanw(WINDOW *, ...); -extern int wscrl(WINDOW *, int); -extern int wsetscrreg(WINDOW *, int, int); -extern int wstandend(WINDOW *); -extern int wstandout(WINDOW *); -extern void wsyncdown(WINDOW *); -extern void wsyncup(WINDOW *); -extern void wtimeout(WINDOW *, int); -extern int wtouchln(WINDOW *, int, int, int); -extern int wvline(WINDOW *, chtype, int); -extern bool xdr_datum(/* ??? */); -extern int xdr_double(/* ??? */); -extern int xdr_exports(/* ??? */); -extern int xdr_fhstatus(/* ??? */); -extern int xdr_float(/* ??? */); -extern int xdr_keybuf(/* ??? */); -extern int xdr_mountlist(/* ??? */); -extern int xdr_netbuf(/* ??? */); -extern int xdr_path(/* ??? */); -extern int xdr_pmap(/* ??? */); -extern int xdr_pmaplist(/* ??? */); -extern int xdr_pointer(/* ??? */); -extern int xdr_reference(/* ??? */); -extern int xdr_rmtcall_args(/* ??? */); -extern int xdr_rmtcallres(/* ??? */); -extern int xdr_rpcb(/* ??? */); -extern int xdr_rpcb_rmtcallargs(/* ??? */); -extern int xdr_rpcb_rmtcallres(/* ??? */); -extern int xdr_rpcblist(/* ??? */); -extern int xdr_sprayarr(/* ??? */); -extern int xdr_spraycumul(/* ??? */); -extern int xdr_spraytimeval(/* ??? */); -extern int xdr_u_char(/* ??? */); -extern int xdr_utmparr(/* ??? */); -extern int xdr_utmpidlearr(/* ??? */); -extern int xdr_vector(/* ??? */); -extern int xdr_yp_buf(/* ??? */); -extern bool xdr_yp_inaddr(/* ??? */); -extern bool xdr_ypall(/* ??? */); -extern int xdr_ypdelete_args(/* ??? */); -extern bool xdr_ypdomain_wrap_string(/* ??? */); -extern bool xdr_ypmap_parms(/* ??? */); -extern bool xdr_ypmap_wrap_string(/* ??? */); -extern bool xdr_ypowner_wrap_string(/* ??? */); -extern bool xdr_yppushresp_xfr(/* ??? */); -extern bool xdr_ypreq_key(/* ??? */); -extern bool xdr_ypreq_newxfr(/* ??? */); -extern bool xdr_ypreq_nokey(/* ??? */); -extern bool xdr_ypreq_xfr(/* ??? */); -extern bool xdr_ypresp_key_val(/* ??? */); -extern bool xdr_ypresp_maplist(/* ??? */); -extern bool xdr_ypresp_master(/* ??? */); -extern bool xdr_ypresp_order(/* ??? */); -extern bool xdr_ypresp_val(/* ??? */); -extern int xdr_ypupdate_args(/* ??? */); -extern void xdrrec_create(/* ??? */); -extern int xdrrec_endofrecord(/* ??? */); -extern int xdrrec_eof(/* ??? */); -extern int xdrrec_skiprecord(/* ??? */); -extern void xdrstdio_create(/* ??? */); -extern void xprt_register(/* ??? */); -extern void xprt_unregister(/* ??? */); -extern double y0(double); -extern double y1(double); -extern double yn(int, double); -extern int yp_all(char *, char *, struct ypall_callback *); -extern int yp_bind(const char *); -extern int yp_first(char *, char *, char **, int *, char **, int *); -extern int yp_get_default_domain(char **); -extern int yp_master(char *, char *, char **); -extern int yp_match(char *, char *, char *, int, char **, int *); -extern int yp_next(char *, char *, char *, int, char **, int *, char **, int *); -extern int yp_order(char *, char *, int *); -extern void yp_unbind(const char *); -extern char * yperr_string(int); -extern int ypprot_err(unsigned int); -extern u_int * ypu_change_1(/* ??? */); -extern u_int * ypu_delete_1(/* ??? */); -extern u_int * ypu_insert_1(/* ??? */); -extern u_int * ypu_store_1(/* ??? */); diff --git a/gcc/sys-types.h b/gcc/sys-types.h deleted file mode 100644 index 7db46f112c5..00000000000 --- a/gcc/sys-types.h +++ /dev/null @@ -1,240 +0,0 @@ -enum clnt_stat { ___fake1 }; -enum auth_stat { ___fake2 }; - -struct netconfig; -struct netbuf; -struct address; -struct tm; -struct ldfile; -struct syment; -struct stat; -struct timeval; -struct termios; -struct tms; -struct dma_cb; -struct cred; -struct vnode; -struct vattr; -struct uarg; -struct statfs; -struct statvfs; -struct dirent; -struct itimerval; -struct mnttab; -struct strbuf; -struct vfstab; -struct ldfile; -struct syment; -struct scnhdr; -struct exception; -struct nd_hostservlist; -struct nd_hostserv; -struct utsname; -struct uio; -struct pid; -struct pollfd; -struct nlist; -struct passwd; -struct spwd; -struct flock; -struct seg; -struct sembuf; -struct sigaction; -struct utimbuf; -struct map; -struct filehdr; -struct lineno; -struct nd_addrlist; -struct FTW; -struct buf; -struct ustat; -struct qelem; -struct prpsinfo; -struct user; -struct qelem; -struct execenv; -struct utmpx; - -struct direct; -struct tm; -struct stat; -struct rlimit; -struct rusage; -struct sockaddr; -struct sockaddr_in; -struct timeval { int i; }; -struct exportent; -struct fstab; -struct hostent; -struct in_addr { int i; }; -struct ldfile; -struct mallinfo { int i; }; -struct mint; -struct nmtent; -struct netent; -struct pmaplist; -struct protoent; -struct rpcent; -struct servent; -struct authdes_cred; -struct rpc_err; -struct ypall_callback; - -union wait; - -/* Get size_t and wchar_t. */ -#include <stddef.h> - -/* #include "sys/types.h" */ -#define ssize_t int - -/* The actual types used here are mostly wrong, - but it is not supposed to matter what types we use here. */ - -typedef int dev_t; -typedef int pid_t; -typedef int gid_t; -typedef int off_t; -typedef int mode_t; -typedef int uid_t; - -typedef int proc_t; -typedef int time_t; -typedef int addr_t; -typedef int caddr_t; -typedef int clock_t; -typedef int div_t; -typedef int ldiv_t; -typedef int dl_t; -typedef int major_t; -typedef int minor_t; -typedef int emcp_t; -typedef int fpclass_t; -typedef int index_t; -typedef int ecb_t; -typedef int aioop_t; -typedef int evver_t; -typedef int evcntlcmds_t; -typedef int idtype_t; -typedef int id_t; -typedef int procset_t; -typedef int hostid_t; -typedef int evpollcmds_t; -typedef int event_t; -typedef int hrtime_t; -typedef int evqcntlcmds_t; -typedef int sigset_t; -typedef int evsiginfo_t; -typedef int evcontext_t; -typedef int evta_t; -typedef int speed_t; -typedef int rlim_t; -typedef int cred_t; -typedef int file_t; -typedef int vnode_t; -typedef int vfs_t; -typedef int fpos_t; -typedef int exhda_t; -typedef int ucontext_t; -typedef int sess_t; -typedef int hrtcmd_t; -typedef int interval_t; -typedef int key_t; -typedef int daddr_t; -typedef int stack_t; -typedef int sigaction_t; -typedef int siginfo_t; -typedef int mblk_t; -typedef int paddr_t; -typedef int qband_t; -typedef int queue_t; -typedef int rf_resource_t; -typedef int sr_mount_t; -typedef int timer_t; -typedef int fpregset_t; -typedef int prstatus_t; -typedef int vfssw_t; -typedef int eucwidth_t; -typedef int page_t; - -typedef int u_int; -typedef int u_short; -typedef int u_long; -typedef int u_char; - -typedef int ushort; -typedef int ulong; -typedef int uint; - -typedef int __gnuc_va_list; - -typedef int archdr; -typedef int AUTH; -typedef int CLIENT; -typedef int DIR; -typedef int ENTRY; -typedef int Elf; -typedef int Elf32_Ehdr; -typedef int Elf32_Phdr; -typedef int Elf32_Shdr; -typedef int Elf_Arhdr; -typedef int Elf_Arsym; -typedef int Elf_Cmd; -typedef int Elf_Data; -typedef int Elf_Scn; -typedef int Elf_Type; -typedef int Elf_Kind; -typedef int FIELD; -typedef int FIELDTYPE; -typedef int PTF_int; -typedef int PTF_void; -typedef int PTF_charP; -typedef int FILE; -typedef int FORM; -typedef int ITEM; -typedef int MENU; -typedef int OPTIONS; -typedef int PANEL; -typedef int FTP_void; -typedef int RPCBLIST; -typedef int SCREEN; -typedef int SVCXPRT; -typedef int TERMINAL; -typedef int WINDOW; -typedef int bool; -typedef int nl_catd; -typedef int nl_item; -typedef int chtype; -typedef int datum; -typedef int fp_rnd; -typedef int spraycumul; -typedef int WORD; -typedef int VISIT; -typedef int ACTION; - -typedef int *jmp_buf; -typedef int *sigjmp_buf; -typedef int xdrproc_t; -typedef int CALL; -typedef int bool_t; -typedef int DBM; -typedef int des_block; -typedef int resultproc_t; - - -#ifdef BSD - -#define mode_t int -#define uid_t int -#define gid_t int -#define time_t long -#define pid_t int -#define signal_ret_t int -#define wait_arg_t union wait - -#else - -#define signal_ret_t void -#define wait_arg_t int - -#endif diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ff739aca938..2f607261565 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,127 @@ +2009-03-29 Richard Guenther <rguenther@suse.de> + + * gcc.c-torture/execute/20090113-1.c: New testcase. + * gcc.c-torture/execute/20090113-2.c: Likewise. + * gcc.c-torture/execute/20090113-3.c: Likewise. + * gcc.c-torture/execute/20090207-1.c: Likewise. + * gcc.c-torture/compile/20090114-1.c: Likewise. + * gcc.c-torture/compile/20090328-1.c: Likewise. + * gcc.dg/noncompile/920507-1.c: Fix out-of-bounds array access. + +2009-03-29 David Ayers <ayers@fsfe.org> + + PR objc/27377 + * objc.dg/conditional-1.m: New tests. + +2009-03-28 Adam Nemet <anemet@caviumnetworks.com> + + * gcc.dg/winline-10.c: New test. + +2009-03-28 Tobias Burnus <burnus@net-b.de> + + PR fortran/34656 + * gfortran.dg/do_check_1.f90: Add test. + * gfortran.dg/do_check_2.f90: Add test. + * gfortran.dg/do_check_3.f90: Add test. + * gfortran.dg/do_check_4.f90: Add test. + +2009-03-28 Jan Hubicka <jh@suse.cz> + + * gcc.dg/attr-noinline.c: Avoid pure-const optimization. + * gcc.dg/pr33826.c: Update dump files. + * gcc.dg/ipa/ipa-3.c: Avoid pure-const optimization. + * gcc.dg/ipa/ipa-5.c: Avoid pure-const optimization. + +2009-03-28 Martin Jambor <mjambor@suse.cz> + + * g++.dg/tree-ssa/fwprop-align.C: New test. + +2009-03-28 Jakub Jelinek <jakub@redhat.com> + + * gcc.target/powerpc/altivec-28.c: New test. + + PR c++/39554 + * gcc.dg/wdisallowed-functions-1.c: Removed. + * gcc.dg/wdisallowed-functions-2.c: Removed. + * gcc.dg/wdisallowed-functions-3.c: Removed. + * g++.dg/warn/Wdisallowed-functions-1.C: Removed. + * g++.dg/warn/Wdisallowed-functions-2.C: Removed. + * g++.dg/warn/Wdisallowed-functions-3.C: Removed. + +2009-03-28 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/38723 + * gcc.dg/tree-ssa/ssa-fre-22.c: New testcase. + +2009-03-28 Paul Thomas <pault@gcc.gnu.org + + PR fortran/38538 + * gfortran.dg/char_result_13.f90: New test. + +2009-03-28 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/38765 + * gfortran.dg/alloc_comp_assign_9.f90: New test. + +2009-03-28 Daniel Kraft <d@domob.eu> + + * gfortran.dg/trim_1.f90: New test. + +2009-03-28 Richard Guenther <rguenther@suse.de> + + * gcc.dg/Warray-bounds.c: Do not use redundant stores. + * g++.dg/warn/Warray-bounds.C: Likewise. + +2009-03-28 Tobias Burnus <burnus@net-b.de> + + PR fortran/32626 + * gfortran.dg/recursive_check_7.f90: New test. + +2009-03-28 Tobias Burnus <burnus@net-b.de> + + PR fortran/38432 + * gfortran.dg/do_check_5.f90: New test. + * gfortran.dg/array_constructor_11.f90: Add dg-warning. + * gfortran.dg/array_constructor_18.f90: Ditto. + * gfortran.dg/array_constructor_22.f90: Ditto. + * gfortran.dg/do_3.F90: Ditto. + * gfortran.dg/do_1.f90: Ditto. + +2009-03-28 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/38180 + * gcc.dg/tree-ssa/ssa-ccp-24.c: New testcase. + +2009-03-28 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/38513 + * gcc.dg/tree-ssa/ssa-fre-21.c: New testcase. + * gcc.dg/tree-ssa/ssa-dse-11.c: Adjust. + * gcc.dg/vect/vect-reduc-dot-u8a.c: Likewise. + * gcc.dg/vect/vect-reduc-dot-u8b.c: Likewise. + * gcc.dg/vect/slp-widen-mult-u8.c: Likewise. + * gcc.dg/vect/vect-multitypes-16.c: Likewise. + * gcc.dg/vect/vect-35.c: Likewise. + * gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c: Likewise. + * gcc.dg/vect/vect-multitypes-17.c: Likewise. + * gcc.dg/vect/slp-widen-mult-s16.c: Likewise. + +2009-03-28 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/38968 + * gfortran.dg/vect/fast-math-pr38968.f90: New testcase. + +2009-03-28 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/37795 + * gcc.dg/tree-ssa/ssa-ifcombine-7.c: New testcase. + +2009-03-28 Joseph Myers <joseph@codesourcery.com> + + * g++.old-deja/g++.ext/attrib5.C, g++.old-deja/g++.jason/thunk3.C, + gcc.c-torture/compile/981006-1.c: Don't XFAIL or add special + options for removed targets. + 2009-03-27 Richard Guenther <rguenther@suse.de> PR tree-optimization/39120 diff --git a/gcc/testsuite/g++.dg/tree-ssa/fwprop-align.C b/gcc/testsuite/g++.dg/tree-ssa/fwprop-align.C new file mode 100644 index 00000000000..69f26021689 --- /dev/null +++ b/gcc/testsuite/g++.dg/tree-ssa/fwprop-align.C @@ -0,0 +1,20 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-forwprop2" } */ + +struct A +{ + void foo () + { + } +}; + +int main() +{ + void (A::* const p)() = & A::foo; + A a; + (a.*p)(); +} + +/* We should eliminate the check if p points to a virtual function. */ +/* { dg-final { scan-tree-dump-times "& 1" 0 "forwprop2" } } */ +/* { dg-final { cleanup-tree-dump "forwprop2" } } */ diff --git a/gcc/testsuite/g++.dg/warn/Warray-bounds.C b/gcc/testsuite/g++.dg/warn/Warray-bounds.C index 0385516abd4..d53af521486 100644 --- a/gcc/testsuite/g++.dg/warn/Warray-bounds.C +++ b/gcc/testsuite/g++.dg/warn/Warray-bounds.C @@ -26,10 +26,10 @@ int* f(void) { a[ 9] = 0; a[10] = 0; /* { dg-warning "array subscript" } */ a[11] = 0; /* { dg-warning "array subscript" } */ - a[2 * n() - 11] = 0; /* { dg-warning "array subscript" } */ - a[2 * n() - 10] = 0; - a[2 * n() - 1] = 0; - a[2 * n() - 0] = 0; /* { dg-warning "array subscript" } */ + a[2 * n() - 11] = 1; /* { dg-warning "array subscript" } */ + a[2 * n() - 10] = 1; + a[2 * n() - 1] = 1; + a[2 * n() - 0] = 1; /* { dg-warning "array subscript" } */ b[-1] = 0; /* { dg-warning "array subscript" } */ b[ 0] = 0; @@ -37,10 +37,10 @@ int* f(void) { b[ 9] = 0; b[10] = 0; /* { dg-warning "array subscript" } */ b[11] = 0; /* { dg-warning "array subscript" } */ - b[2 * n() - 11] = 0; /* { dg-warning "array subscript" } */ - b[2 * n() - 10] = 0; - b[2 * n() - 1] = 0; - b[2 * n() - 0] = 0; /* { dg-warning "array subscript" } */ + b[2 * n() - 11] = 1; /* { dg-warning "array subscript" } */ + b[2 * n() - 10] = 1; + b[2 * n() - 1] = 1; + b[2 * n() - 0] = 1; /* { dg-warning "array subscript" } */ c.c[-1] = 0; /* { dg-warning "array subscript" } */ c.c[ 0] = 0; @@ -48,10 +48,10 @@ int* f(void) { c.c[ 9] = 0; c.c[10] = 0; /* { dg-warning "array subscript" } */ c.c[11] = 0; /* { dg-warning "array subscript" } */ - c.c[2 * n() - 11] = 0; /* { dg-warning "array subscript" } */ - c.c[2 * n() - 10] = 0; - c.c[2 * n() - 1] = 0; - c.c[2 * n() - 0] = 0; /* { dg-warning "array subscript" } */ + c.c[2 * n() - 11] = 1; /* { dg-warning "array subscript" } */ + c.c[2 * n() - 10] = 1; + c.c[2 * n() - 1] = 1; + c.c[2 * n() - 0] = 1; /* { dg-warning "array subscript" } */ g(&a[8]); g(&a[9]); diff --git a/gcc/testsuite/g++.dg/warn/Wdisallowed-functions-1.C b/gcc/testsuite/g++.dg/warn/Wdisallowed-functions-1.C deleted file mode 100644 index 39760950d69..00000000000 --- a/gcc/testsuite/g++.dg/warn/Wdisallowed-functions-1.C +++ /dev/null @@ -1,7 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-Wdisallowed-function-list=foobar" } */ - -int foobar (int i) -{ - return (i * 5); -} diff --git a/gcc/testsuite/g++.dg/warn/Wdisallowed-functions-2.C b/gcc/testsuite/g++.dg/warn/Wdisallowed-functions-2.C deleted file mode 100644 index ca5aab0e50d..00000000000 --- a/gcc/testsuite/g++.dg/warn/Wdisallowed-functions-2.C +++ /dev/null @@ -1,12 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-Wdisallowed-function-list=foo,foobar,bar,foobar" } */ - -int foobar (int i) -{ - return (i * 5); -} - -int foobar1 (int i) -{ - return foobar (i); /* { dg-warning "disallowed call to 'foobar'" } */ -} diff --git a/gcc/testsuite/g++.dg/warn/Wdisallowed-functions-3.C b/gcc/testsuite/g++.dg/warn/Wdisallowed-functions-3.C deleted file mode 100644 index 3ecfb0c2264..00000000000 --- a/gcc/testsuite/g++.dg/warn/Wdisallowed-functions-3.C +++ /dev/null @@ -1,10 +0,0 @@ -// PR c++/39554 -// { dg-do compile } -// { dg-options "-Wdisallowed-function-list=bar" } - -void -foo (void (*p) (), void (*bar) ()) -{ - p (); - bar (); -} diff --git a/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C b/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C index 2a7e145856c..fcc3c61677a 100644 --- a/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C +++ b/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C @@ -1,4 +1,4 @@ -// { dg-do run { xfail alpha*-dec-osf* *-*-hms i?86-pc-cygwin *-*-coff } } +// { dg-do run { xfail alpha*-dec-osf* i?86-pc-cygwin } } // Test that attributes weak and alias coexist. // { dg-require-weak "" } // { dg-require-alias "" } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C b/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C index d91982f7ed0..612d423be08 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C @@ -1,4 +1,4 @@ -// { dg-do run { xfail rs6000-*-* powerpc-*-eabi m68k-*-coff mn10300-*-* v850-*-* sh-*-* sh64-*-* h8*-*-* xtensa*-*-* m32r*-*-* } } +// { dg-do run { xfail rs6000-*-* powerpc-*-eabi mn10300-*-* v850-*-* sh-*-* sh64-*-* h8*-*-* xtensa*-*-* m32r*-*-* } } // Test that variadic function calls using thunks work right. // Note that this will break on any target that uses the generic thunk // support, because it doesn't support variadic functions. diff --git a/gcc/testsuite/gcc.c-torture/compile/20090114-1.c b/gcc/testsuite/gcc.c-torture/compile/20090114-1.c new file mode 100644 index 00000000000..692c96f76ba --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20090114-1.c @@ -0,0 +1,44 @@ +typedef struct { + int MbInterlace; + int channel_type; +} InputParameters; +typedef struct { + int type; + int NumberofCodedPFrame; + int NumberofGOP; + int NumberofPPicture; + int FieldControl; + int Frame_Total_Number_MB; + int NumberofCodedMacroBlocks; + int BasicUnit; +} ImageParameters; +extern InputParameters *input; +extern ImageParameters *img; +long T; +void rc_init_pict(int fieldpic) +{ + if(input->MbInterlace) + T = img->Frame_Total_Number_MB; + img->NumberofCodedMacroBlocks=0; + if(input->channel_type==1 + && img->NumberofCodedPFrame==58) + T = 4; + if(fieldpic) + { + switch (img->type) + { + case 0: + if(img->NumberofCodedPFrame>0 + && img->FieldControl==1) + T = 3; + if(img->NumberofPPicture==1) + T = 2; + } + if(img->type==0 + && img->NumberofCodedPFrame>0) + T = 0; + } + if(img->type==0 + && img->FieldControl==1) + T = 1; +} diff --git a/gcc/testsuite/gcc.c-torture/compile/20090328-1.c b/gcc/testsuite/gcc.c-torture/compile/20090328-1.c new file mode 100644 index 00000000000..10328ad41c3 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20090328-1.c @@ -0,0 +1,17 @@ +union loc { unsigned reg; signed offset; }; +void __frame_state_for (volatile char *state_in, int x) +{ + /* We should move all the loads out of this loop. Right now, we only + move one. It takes two insertions because we insert a cast. */ + union loc fs; + int reg; + for (;;) { + switch (x) { + case 0: + *state_in = fs.reg; + case 1: + *state_in = fs.offset; + } + } +} + diff --git a/gcc/testsuite/gcc.c-torture/compile/981006-1.c b/gcc/testsuite/gcc.c-torture/compile/981006-1.c index a8b4cc48cd6..d77c115f214 100644 --- a/gcc/testsuite/gcc.c-torture/compile/981006-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/981006-1.c @@ -6,7 +6,7 @@ /* { dg-do assemble } */ /* For MIPS at least, pic is needed to trigger the problem. */ /* { dg-options "-w -Wuninitialized -Werror -fpic" } */ -/* { dg-options "-w -Wuninitialized -Werror" { target { { rs6000-*-aix* powerpc*-*-aix* arm*-*-* fr30-*-* sh-*-hms sh-*-coff h8300*-*-* cris-*-elf* mmix-*-* } || { ! fpic } } } } */ +/* { dg-options "-w -Wuninitialized -Werror" { target { { rs6000-*-aix* powerpc*-*-aix* arm*-*-* fr30-*-* sh-*-hms h8300*-*-* cris-*-elf* mmix-*-* } || { ! fpic } } } } */ int foo (int a, int b) { diff --git a/gcc/testsuite/gcc.c-torture/execute/20090113-1.c b/gcc/testsuite/gcc.c-torture/execute/20090113-1.c new file mode 100644 index 00000000000..9c5f01d71fa --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20090113-1.c @@ -0,0 +1,61 @@ +typedef struct descriptor_dimension +{ + int stride; + int lbound; + int ubound; +} descriptor_dimension; +typedef struct { + int *data; + int dtype; + descriptor_dimension dim[7]; +} gfc_array_i4; + +void +msum_i4 (gfc_array_i4 * const retarray, + gfc_array_i4 * const array, + const int * const pdim) +{ + int count[7]; + int extent[7]; + int * dest; + const int * base; + int dim; + int n; + int len; + + dim = (*pdim) - 1; + len = array->dim[dim].ubound + 1 - array->dim[dim].lbound; + + for (n = 0; n < dim; n++) + { + extent[n] = array->dim[n].ubound + 1 - array->dim[n].lbound; + count[n] = 0; + } + + dest = retarray->data; + base = array->data; + + do + { + int result = 0; + + for (n = 0; n < len; n++, base++) + result += *base; + *dest = result; + + count[0]++; + dest += 1; + } + while (count[0] != extent[0]); +} + +int main() +{ + int rdata[3]; + int adata[9]; + gfc_array_i4 retarray = { rdata, 265, { { 1, 1, 3 } } }; + gfc_array_i4 array = { adata, 266, { { 1, 1, 3 }, { 3, 1, 3 } } }; + int dim = 2; + msum_i4 (&retarray, &array, &dim); + return 0; +} diff --git a/gcc/testsuite/gcc.c-torture/execute/20090113-2.c b/gcc/testsuite/gcc.c-torture/execute/20090113-2.c new file mode 100644 index 00000000000..9871a66ffbc --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20090113-2.c @@ -0,0 +1,160 @@ +struct obstack {}; +struct bitmap_head_def; +typedef struct bitmap_head_def *bitmap; +typedef const struct bitmap_head_def *const_bitmap; +typedef unsigned long BITMAP_WORD; +typedef struct bitmap_obstack +{ + struct bitmap_element_def *elements; + struct bitmap_head_def *heads; + struct obstack obstack; +} bitmap_obstack; +typedef struct bitmap_element_def +{ + struct bitmap_element_def *next; + struct bitmap_element_def *prev; + unsigned int indx; + BITMAP_WORD bits[((128 + (8 * 8 * 1u) - 1) / (8 * 8 * 1u))]; +} bitmap_element; + +struct bitmap_descriptor; + +typedef struct bitmap_head_def { + bitmap_element *first; + bitmap_element *current; + unsigned int indx; + bitmap_obstack *obstack; +} bitmap_head; + +bitmap_element bitmap_zero_bits; + +typedef struct +{ + bitmap_element *elt1; + bitmap_element *elt2; + unsigned word_no; + BITMAP_WORD bits; +} bitmap_iterator; + +static void __attribute__((noinline)) +bmp_iter_set_init (bitmap_iterator *bi, const_bitmap map, + unsigned start_bit, unsigned *bit_no) +{ + bi->elt1 = map->first; + bi->elt2 = ((void *)0); + + while (1) + { + if (!bi->elt1) + { + bi->elt1 = &bitmap_zero_bits; + break; + } + + if (bi->elt1->indx >= start_bit / (((128 + (8 * 8 * 1u) - 1) / (8 * 8 * 1u)) * (8 * 8 * 1u))) + break; + bi->elt1 = bi->elt1->next; + } + + if (bi->elt1->indx != start_bit / (((128 + (8 * 8 * 1u) - 1) / (8 * 8 * 1u)) * (8 * 8 * 1u))) + start_bit = bi->elt1->indx * (((128 + (8 * 8 * 1u) - 1) / (8 * 8 * 1u)) * (8 * 8 * 1u)); + + bi->word_no = start_bit / (8 * 8 * 1u) % ((128 + (8 * 8 * 1u) - 1) / (8 * 8 * 1u)); + bi->bits = bi->elt1->bits[bi->word_no]; + bi->bits >>= start_bit % (8 * 8 * 1u); + + start_bit += !bi->bits; + + *bit_no = start_bit; +} + +static void __attribute__((noinline)) +bmp_iter_next (bitmap_iterator *bi, unsigned *bit_no) +{ + bi->bits >>= 1; + *bit_no += 1; +} + +static unsigned char __attribute__((noinline)) +bmp_iter_set_tail (bitmap_iterator *bi, unsigned *bit_no) +{ + while (!(bi->bits & 1)) + { + bi->bits >>= 1; + *bit_no += 1; + } + return 1; +} + +static __inline__ unsigned char +bmp_iter_set (bitmap_iterator *bi, unsigned *bit_no) +{ + unsigned bno = *bit_no; + BITMAP_WORD bits = bi->bits; + bitmap_element *elt1; + + if (bits) + { + while (!(bits & 1)) + { + bits >>= 1; + bno += 1; + } + *bit_no = bno; + return 1; + } + + *bit_no = ((bno + 64 - 1) / 64 * 64); + bi->word_no++; + + elt1 = bi->elt1; + while (1) + { + while (bi->word_no != 2) + { + bi->bits = elt1->bits[bi->word_no]; + if (bi->bits) + { + bi->elt1 = elt1; + return bmp_iter_set_tail (bi, bit_no); + } + *bit_no += 64; + bi->word_no++; + } + + elt1 = elt1->next; + if (!elt1) + { + bi->elt1 = elt1; + return 0; + } + *bit_no = elt1->indx * (2 * 64); + bi->word_no = 0; + } +} + +extern void abort (void); + +static void __attribute__((noinline)) catchme(int i) +{ + if (i != 0 && i != 64) + abort (); +} +static void __attribute__((noinline)) foobar (bitmap_head *chain) +{ + bitmap_iterator rsi; + unsigned int regno; + for (bmp_iter_set_init (&(rsi), (chain), (0), &(regno)); + bmp_iter_set (&(rsi), &(regno)); + bmp_iter_next (&(rsi), &(regno))) + catchme(regno); +} + +int main() +{ + bitmap_element elem = { (void *)0, (void *)0, 0, { 1, 1 } }; + bitmap_head live_throughout = { &elem, &elem, 0, (void *)0 }; + foobar (&live_throughout); + return 0; +} + diff --git a/gcc/testsuite/gcc.c-torture/execute/20090113-3.c b/gcc/testsuite/gcc.c-torture/execute/20090113-3.c new file mode 100644 index 00000000000..f67bac24135 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20090113-3.c @@ -0,0 +1,138 @@ +struct obstack {}; +struct bitmap_head_def; +typedef struct bitmap_head_def *bitmap; +typedef const struct bitmap_head_def *const_bitmap; +typedef unsigned long BITMAP_WORD; + +typedef struct bitmap_obstack +{ + struct bitmap_element_def *elements; + struct bitmap_head_def *heads; + struct obstack obstack; +} bitmap_obstack; +typedef struct bitmap_element_def +{ + struct bitmap_element_def *next; + struct bitmap_element_def *prev; + unsigned int indx; + BITMAP_WORD bits[(2)]; +} bitmap_element; + +struct bitmap_descriptor; + +typedef struct bitmap_head_def { + bitmap_element *first; + bitmap_element *current; + unsigned int indx; + bitmap_obstack *obstack; +} bitmap_head; + +bitmap_element bitmap_zero_bits; + +typedef struct +{ + bitmap_element *elt1; + bitmap_element *elt2; + unsigned word_no; + BITMAP_WORD bits; +} bitmap_iterator; + +static __attribute__((noinline)) void +bmp_iter_set_init (bitmap_iterator *bi, const_bitmap map, + unsigned start_bit, unsigned *bit_no) +{ + bi->elt1 = map->first; + bi->elt2 = ((void *)0); + + while (1) + { + if (!bi->elt1) + { + bi->elt1 = &bitmap_zero_bits; + break; + } + + if (bi->elt1->indx >= start_bit / (128u)) + break; + bi->elt1 = bi->elt1->next; + } + + if (bi->elt1->indx != start_bit / (128u)) + start_bit = bi->elt1->indx * (128u); + + bi->word_no = start_bit / 64u % (2); + bi->bits = bi->elt1->bits[bi->word_no]; + bi->bits >>= start_bit % 64u; + + start_bit += !bi->bits; + + *bit_no = start_bit; +} + +static __inline__ __attribute__((always_inline)) void +bmp_iter_next (bitmap_iterator *bi, unsigned *bit_no) +{ + bi->bits >>= 1; + *bit_no += 1; +} + +static __inline__ __attribute__((always_inline)) unsigned char +bmp_iter_set (bitmap_iterator *bi, unsigned *bit_no) +{ + if (bi->bits) + { + while (!(bi->bits & 1)) + { + bi->bits >>= 1; + *bit_no += 1; + } + return 1; + } + + *bit_no = ((*bit_no + 64u - 1) / 64u * 64u); + bi->word_no++; + + while (1) + { + while (bi->word_no != (2)) + { + bi->bits = bi->elt1->bits[bi->word_no]; + if (bi->bits) + { + while (!(bi->bits & 1)) + { + bi->bits >>= 1; + *bit_no += 1; + } + return 1; + } + *bit_no += 64u; + bi->word_no++; + } + + bi->elt1 = bi->elt1->next; + if (!bi->elt1) + return 0; + *bit_no = bi->elt1->indx * (128u); + bi->word_no = 0; + } +} + +static void __attribute__((noinline)) +foobar (bitmap_head *live_throughout) +{ + bitmap_iterator rsi; + unsigned int regno; + for (bmp_iter_set_init (&(rsi), (live_throughout), (0), &(regno)); + bmp_iter_set (&(rsi), &(regno)); + bmp_iter_next (&(rsi), &(regno))) + ; +} +int main() +{ + bitmap_element elem = { (void *)0, (void *)0, 0, { 1, 1 } }; + bitmap_head live_throughout = { &elem, &elem, 0, (void *)0 }; + foobar (&live_throughout); + return 0; +} + diff --git a/gcc/testsuite/gcc.c-torture/execute/20090207-1.c b/gcc/testsuite/gcc.c-torture/execute/20090207-1.c new file mode 100644 index 00000000000..51a686028ea --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20090207-1.c @@ -0,0 +1,16 @@ +int foo(int i) +{ + int a[32]; + a[1] = 3; + a[0] = 1; + a[i] = 2; + return a[0]; +} +extern void abort (void); +int main() +{ + if (foo (0) != 2 + || foo (1) != 1) + abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/Warray-bounds.c b/gcc/testsuite/gcc.dg/Warray-bounds.c index bbb5bea65e1..ac384e6bb2f 100644 --- a/gcc/testsuite/gcc.dg/Warray-bounds.c +++ b/gcc/testsuite/gcc.dg/Warray-bounds.c @@ -26,10 +26,10 @@ int* f(void) { a[ 9] = 0; a[10] = 0; /* { dg-warning "array subscript" } */ a[11] = 0; /* { dg-warning "array subscript" } */ - a[2 * n() - 11] = 0; /* { dg-warning "array subscript" } */ - a[2 * n() - 10] = 0; - a[2 * n() - 1] = 0; - a[2 * n() - 0] = 0; /* { dg-warning "array subscript" } */ + a[2 * n() - 11] = 1; /* { dg-warning "array subscript" } */ + a[2 * n() - 10] = 1; + a[2 * n() - 1] = 1; + a[2 * n() - 0] = 1; /* { dg-warning "array subscript" } */ b[-1] = 0; /* { dg-warning "array subscript" } */ b[ 0] = 0; @@ -37,10 +37,10 @@ int* f(void) { b[ 9] = 0; b[10] = 0; /* { dg-warning "array subscript" } */ b[11] = 0; /* { dg-warning "array subscript" } */ - b[2 * n() - 11] = 0; /* { dg-warning "array subscript" } */ - b[2 * n() - 10] = 0; - b[2 * n() - 1] = 0; - b[2 * n() - 0] = 0; /* { dg-warning "array subscript" } */ + b[2 * n() - 11] = 1; /* { dg-warning "array subscript" } */ + b[2 * n() - 10] = 1; + b[2 * n() - 1] = 1; + b[2 * n() - 0] = 1; /* { dg-warning "array subscript" } */ c.c[-1] = 0; /* { dg-warning "array subscript" } */ c.c[ 0] = 0; @@ -48,10 +48,10 @@ int* f(void) { c.c[ 9] = 0; c.c[10] = 0; /* { dg-warning "array subscript" } */ c.c[11] = 0; /* { dg-warning "array subscript" } */ - c.c[2 * n() - 11] = 0; /* { dg-warning "array subscript" } */ - c.c[2 * n() - 10] = 0; - c.c[2 * n() - 1] = 0; - c.c[2 * n() - 0] = 0; /* { dg-warning "array subscript" } */ + c.c[2 * n() - 11] = 1; /* { dg-warning "array subscript" } */ + c.c[2 * n() - 10] = 1; + c.c[2 * n() - 1] = 1; + c.c[2 * n() - 0] = 1; /* { dg-warning "array subscript" } */ g(&a[8]); g(&a[9]); diff --git a/gcc/testsuite/gcc.dg/attr-noinline.c b/gcc/testsuite/gcc.dg/attr-noinline.c index 9f7abcd07e8..7d57c0172c5 100644 --- a/gcc/testsuite/gcc.dg/attr-noinline.c +++ b/gcc/testsuite/gcc.dg/attr-noinline.c @@ -1,39 +1,41 @@ /* { dg-do compile } */ /* { dg-options "-O2 -finline-functions" } */ -static inline void __attribute__((__noinline__)) function_definition(void) {} /* { dg-warning "inline function \[^\n\]* given attribute noinline" "" } */ +extern int t(); + +static inline void __attribute__((__noinline__)) function_definition(void) {t();} /* { dg-warning "inline function \[^\n\]* given attribute noinline" "" } */ static inline void __attribute__((__noinline__)) function_declaration_both_before(void); /* { dg-warning "inline function \[^\n\]* given attribute noinline" "" } */ -static void function_declaration_both_before(void) {} +static void function_declaration_both_before(void) {t();} static void function_declaration_both_after(void); static inline void __attribute__((__noinline__)) function_declaration_both_after(void); /* { dg-warning "(inline function \[^\n\]* given attribute noinline|declared inline after its definition)" "" } */ -static void function_declaration_both_after(void) {} +static void function_declaration_both_after(void) {t();} static void function_declaration_noinline_before(void) __attribute__((__noinline__)); /* { dg-message "note: previous declaration" "" } */ -static inline void function_declaration_noinline_before(void) {} /* { dg-warning "follows declaration with attribute noinline" "" } */ +static inline void function_declaration_noinline_before(void) {t();} /* { dg-warning "follows declaration with attribute noinline" "" } */ -static inline void function_declaration_noinline_after(void) {} /* { dg-message "note: previous definition" "" } */ +static inline void function_declaration_noinline_after(void) {t();} /* { dg-message "note: previous definition" "" } */ static void function_declaration_noinline_after(void) __attribute__((__noinline__)); /* { dg-warning "follows inline declaration" "" } */ static inline void function_declaration_inline_before(void); /* { dg-message "note: previous declaration" "" } */ -static void __attribute__((__noinline__)) function_declaration_inline_before(void) {} /* { dg-warning "follows inline declaration" "" } */ +static void __attribute__((__noinline__)) function_declaration_inline_before(void) {t();} /* { dg-warning "follows inline declaration" "" } */ static inline void function_declaration_inline_noinline_before(void); /* { dg-message "note: previous declaration" "" } */ static void function_declaration_inline_noinline_before(void) __attribute__((__noinline__)); /* { dg-warning "follows inline declaration" "" } */ -static void function_declaration_inline_noinline_before(void) {} +static void function_declaration_inline_noinline_before(void) {t();} static inline void function_declaration_inline_noinline_after(void); -static void function_declaration_inline_noinline_after(void) {} /* { dg-message "note: previous definition" "" } */ +static void function_declaration_inline_noinline_after(void) {t();} /* { dg-message "note: previous definition" "" } */ static void function_declaration_inline_noinline_after(void) __attribute__((__noinline__)); /* { dg-warning "follows inline declaration" "" } */ @@ -41,7 +43,7 @@ static void function_declaration_noinline_inline_before(void) __attribute__((__n static inline void function_declaration_noinline_inline_before(void); /* { dg-warning "follows declaration with attribute noinline" "" } */ -static void function_declaration_noinline_inline_before(void) {} +static void function_declaration_noinline_inline_before(void) {t();} void f () { function_definition (); diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-3.c b/gcc/testsuite/gcc.dg/ipa/ipa-3.c index c476b925050..6eb3da40a6f 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-3.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-3.c @@ -6,8 +6,10 @@ /* Double constants. */ #include <stdio.h> +void t(void); int g (double b, double c) { + t(); return (int)(b+c); } int f (double a) diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-5.c b/gcc/testsuite/gcc.dg/ipa/ipa-5.c index 9352e19ab65..9e8006a2fef 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-5.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-5.c @@ -5,12 +5,15 @@ /* Float & short constants. */ #include <stdio.h> +void t(void); int g (float b, short c) { + t(); return c + (int)b; } int f (float a) { + t(); /* a is modified. */ if (a++ > 0) g (a, 3); diff --git a/gcc/testsuite/gcc.dg/noncompile/920507-1.c b/gcc/testsuite/gcc.dg/noncompile/920507-1.c index c1a3523008c..7024a5b03a0 100644 --- a/gcc/testsuite/gcc.dg/noncompile/920507-1.c +++ b/gcc/testsuite/gcc.dg/noncompile/920507-1.c @@ -3,5 +3,5 @@ x(void) { register int *a asm("unknown_register"); /* { dg-error "invalid register" } */ int *v[1] = {a}; - return v[1]; + return v[0]; } diff --git a/gcc/testsuite/gcc.dg/pr33826.c b/gcc/testsuite/gcc.dg/pr33826.c index 3e08b14fa97..c091bbcdb10 100644 --- a/gcc/testsuite/gcc.dg/pr33826.c +++ b/gcc/testsuite/gcc.dg/pr33826.c @@ -3,7 +3,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target nonpic } */ -/* { dg-options "-O1 -fdump-ipa-pure-const" } */ +/* { dg-options "-O1 -fdump-tree-local-pure-const1 -fdump-ipa-pure-const" } */ int recurese1 (int i) { @@ -30,8 +30,14 @@ int norecurse1b (int i) return i+1; } -/* { dg-final { scan-ipa-dump "found to be const: norecurse1a" "pure-const" } } */ -/* { dg-final { scan-ipa-dump "found to be const: norecurse1b" "pure-const" } } */ +/* { dg-final { scan-tree-dump "found to be const: norecurse1a" "local-pure-const1" } } */ +/* { dg-final { scan-tree-dump "found to be const: norecurse1b" "local-pure-const1" } } */ +/* { dg-final { scan-tree-dump-not "found to be pure: recurse1" "local-pure-const1" } } */ +/* { dg-final { scan-tree-dump-not "found to be pure: recurse2a" "local-pure-const1" } } */ +/* { dg-final { scan-tree-dump-not "found to be pure: recurse2b" "local-pure-const1" } } */ +/* { dg-final { scan-tree-dump-not "found to be const: recurse1" "local-pure-const1" } } */ +/* { dg-final { scan-tree-dump-not "found to be const: recurse2a" "local-pure-const1" } } */ +/* { dg-final { scan-tree-dump-not "found to be const: recurse2b" "local-pure-const1" } } */ /* { dg-final { scan-ipa-dump-not "found to be pure: recurse1" "pure-const" } } */ /* { dg-final { scan-ipa-dump-not "found to be pure: recurse2a" "pure-const" } } */ /* { dg-final { scan-ipa-dump-not "found to be pure: recurse2b" "pure-const" } } */ @@ -39,3 +45,4 @@ int norecurse1b (int i) /* { dg-final { scan-ipa-dump-not "found to be const: recurse2a" "pure-const" } } */ /* { dg-final { scan-ipa-dump-not "found to be const: recurse2b" "pure-const" } } */ /* { dg-final { cleanup-ipa-dump "pure-const" } } */ +/* { dg-final { cleanup-tree-dump "local-pure-const1" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-24.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-24.c new file mode 100644 index 00000000000..84f69e9d3bd --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-24.c @@ -0,0 +1,23 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fdump-tree-ccp1" } */ + +static const int x; +int foo() +{ + const int *p = &x; + int y = *p; + return y + 1; +} + +static const int x2[3] = { 1, 0, 2 }; +int bar() +{ + int i = 1; + const int *p = &x2[i]; + int y = *p; + return y + 1; +} + +/* { dg-final { scan-tree-dump-times "return 1;" 2 "ccp1" } } */ +/* { dg-final { cleanup-tree-dump "ccp1" } } */ + diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-11.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-11.c index bd66bc2a78e..6e13e187501 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-11.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-11.c @@ -6,13 +6,13 @@ void foo(int *p) { while (1) { - *p = 0; + *p = 1; *p = 0; } } void bar(int *p) { - *p = 0; + *p = 1; *p = 0; abort (); } diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-21.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-21.c new file mode 100644 index 00000000000..aadf32e21bd --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-21.c @@ -0,0 +1,26 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fdump-tree-fre" } */ + +struct f { + float a; + float b; + float c; + float d; +}; + +struct f a; + +void h(float, float, float, float); + +void g(void) +{ + float a1 = a.a, b = a.b, c = a.c, d = a.d; + a.a = a1; + a.b = b; + a.c = c; + a.d = d; + h(a1, b, c, d); +} + +/* { dg-final { scan-tree-dump-not "a\\\.? = " "fre" } } */ +/* { dg-final { cleanup-tree-dump "fre" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-22.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-22.c new file mode 100644 index 00000000000..ce311b68b9e --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-22.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fdump-tree-fre" } */ + +int i; +int foo (void) +{ + int j; + i = j; + return i; +} + +/* We should eliminate the redundant load of i. */ + +/* { dg-final { scan-tree-dump-not "= i;" "fre" } } */ +/* { dg-final { cleanup-tree-dump "fre" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-7.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-7.c new file mode 100644 index 00000000000..fd202509217 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-7.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fdump-tree-optimized" } */ + +int test1 (int i, int j) +{ + if (i >= j) + if (i != j) + return 0; + return -1; +} + +/* The above should be optimized to a i > j test by ifcombine. */ + +/* { dg-final { scan-tree-dump " > " "optimized" } } */ +/* { dg-final { cleanup-tree-dump "optimized" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/slp-widen-mult-s16.c b/gcc/testsuite/gcc.dg/vect/slp-widen-mult-s16.c index b4ed282d0aa..32853d73a15 100644 --- a/gcc/testsuite/gcc.dg/vect/slp-widen-mult-s16.c +++ b/gcc/testsuite/gcc.dg/vect/slp-widen-mult-s16.c @@ -5,8 +5,9 @@ #define N 64 -short X[N] __attribute__ ((__aligned__(16))); -short Y[N] __attribute__ ((__aligned__(16))); +short X[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63}; +short Y[N] __attribute__ ((__aligned__(16))) = {64,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1}; + int result[N]; /* short->int widening-mult */ @@ -26,11 +27,6 @@ int main (void) check_vect (); - for (i=0; i<N; i++) { - X[i] = i; - Y[i] = 64-i; - } - foo1 (N); for (i=0; i<N; i++) { diff --git a/gcc/testsuite/gcc.dg/vect/slp-widen-mult-u8.c b/gcc/testsuite/gcc.dg/vect/slp-widen-mult-u8.c index 16bf5781684..2f80ea085b6 100644 --- a/gcc/testsuite/gcc.dg/vect/slp-widen-mult-u8.c +++ b/gcc/testsuite/gcc.dg/vect/slp-widen-mult-u8.c @@ -5,8 +5,9 @@ #define N 64 -unsigned char X[N] __attribute__ ((__aligned__(16))); -unsigned char Y[N] __attribute__ ((__aligned__(16))); +unsigned char X[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63}; +unsigned char Y[N] __attribute__ ((__aligned__(16))) = {64,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1}; + unsigned short result[N]; /* char->short widening-mult */ @@ -26,13 +27,6 @@ int main (void) check_vect (); - for (i=0; i<N; i++) { - X[i] = i; - Y[i] = 64-i; - if (i % 5) - X[i] = i; - } - foo1 (N); for (i=0; i<N; i++) { diff --git a/gcc/testsuite/gcc.dg/vect/vect-35.c b/gcc/testsuite/gcc.dg/vect/vect-35.c index d75308f22fe..c6c3bf33860 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-35.c +++ b/gcc/testsuite/gcc.dg/vect/vect-35.c @@ -17,9 +17,7 @@ int main1 () /* Initialization. */ for (i = 0; i < N; i++) { - s.b[i] = 3*i; - if (i%3 == 0) - s.b[i] = 3*i; + s.b[i] = i; } /* Dependence analysis fails cause s.a and s.b may overlap. @@ -32,7 +30,7 @@ int main1 () /* check results: */ for (i = 0; i < N; i++) { - if (s.a[i] != 3*i + 1) + if (s.a[i] != i + 1) abort (); } @@ -47,6 +45,6 @@ int main (void) } -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */ /* { dg-final { scan-tree-dump-times "can't determine dependence between" 1 "vect" } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-multitypes-16.c b/gcc/testsuite/gcc.dg/vect/vect-multitypes-16.c index b5347ebecc3..4192e3d19ec 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-multitypes-16.c +++ b/gcc/testsuite/gcc.dg/vect/vect-multitypes-16.c @@ -5,7 +5,7 @@ #define N 64 -char x[N] __attribute__ ((__aligned__(16))); +char x[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63}; __attribute__ ((noinline)) int foo (int len, long long *z) { @@ -24,12 +24,6 @@ int main (void) check_vect (); - for (i=0; i<N; i++) { - x[i] = i; - if (i % 5) - x[i] = i; - } - foo (N,z+2); for (i=0; i<N; i++) { diff --git a/gcc/testsuite/gcc.dg/vect/vect-multitypes-17.c b/gcc/testsuite/gcc.dg/vect/vect-multitypes-17.c index 61670e6995e..9084fc82a12 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-multitypes-17.c +++ b/gcc/testsuite/gcc.dg/vect/vect-multitypes-17.c @@ -5,9 +5,9 @@ #define N 64 -unsigned char uX[N] __attribute__ ((__aligned__(16))); +unsigned char uX[N] __attribute__ ((__aligned__(16))) = {16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1}; unsigned char uresultX[N]; -unsigned long long uY[N] __attribute__ ((__aligned__(16))); +unsigned long long uY[N] __attribute__ ((__aligned__(16))) = {16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1}; unsigned char uresultY[N]; /* Unsigned type demotion (si->qi) */ @@ -28,13 +28,6 @@ int main (void) check_vect (); - for (i=0; i<N; i++) { - uX[i] = 16-i; - uY[i] = 16-i; - if (i%5 == 0) - uX[i] = 16-i; - } - foo1 (N); for (i=0; i<N; i++) { diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8a.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8a.c index d8aefdad1a6..1934deb40d1 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8a.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8a.c @@ -7,8 +7,8 @@ #define DOT 43680 -unsigned char X[N] __attribute__ ((__aligned__(16))); -unsigned char Y[N] __attribute__ ((__aligned__(16))); +unsigned char X[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63}; +unsigned char Y[N] __attribute__ ((__aligned__(16))) = {64,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1}; /* char->short->int dot product. Detected as a dot-product pattern. @@ -41,13 +41,6 @@ int main (void) check_vect (); - for (i=0; i<N; i++) { - X[i] = i; - Y[i] = 64-i; - if (i%5 == 0) - X[i] = i; - } - dot = foo (N); if (dot != DOT) abort (); diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8b.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8b.c index 5496f6af920..3266d1ca0b5 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8b.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8b.c @@ -7,8 +7,8 @@ #define DOT 43680 -unsigned char X[N] __attribute__ ((__aligned__(16))); -unsigned char Y[N] __attribute__ ((__aligned__(16))); +unsigned char X[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63}; +unsigned char Y[N] __attribute__ ((__aligned__(16))) = {64,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1}; /* char->short->short dot product. Detected as a dot-product pattern. @@ -36,14 +36,6 @@ int main (void) check_vect (); - for (i=0; i<N; i++) { - X[i] = i; - Y[i] = 64-i; - /* Avoid vectorization. */ - if (i%100 == 0) - X[i] = i; - } - dot = foo (N); if (dot != DOT) abort (); diff --git a/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c b/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c index 31eb3f62054..7fc00e21a79 100644 --- a/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c +++ b/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c @@ -7,8 +7,8 @@ #define DOT -21856 -signed char X[N] __attribute__ ((__aligned__(16))); -signed char Y[N] __attribute__ ((__aligned__(16))); +signed char X[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63}; +signed char Y[N] __attribute__ ((__aligned__(16))) = {64,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1}; /* char->short->short dot product. The dot-product pattern should be detected. @@ -37,13 +37,6 @@ int main (void) check_vect (); - for (i=0; i<N; i++) { - X[i] = i; - Y[i] = 64-i; - if (i%5 == 0) - X[i] = i; - } - dot = foo (N); if (dot != DOT) abort (); diff --git a/gcc/testsuite/gcc.dg/wdisallowed-functions-1.c b/gcc/testsuite/gcc.dg/wdisallowed-functions-1.c deleted file mode 100644 index 39760950d69..00000000000 --- a/gcc/testsuite/gcc.dg/wdisallowed-functions-1.c +++ /dev/null @@ -1,7 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-Wdisallowed-function-list=foobar" } */ - -int foobar (int i) -{ - return (i * 5); -} diff --git a/gcc/testsuite/gcc.dg/wdisallowed-functions-2.c b/gcc/testsuite/gcc.dg/wdisallowed-functions-2.c deleted file mode 100644 index ca5aab0e50d..00000000000 --- a/gcc/testsuite/gcc.dg/wdisallowed-functions-2.c +++ /dev/null @@ -1,12 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-Wdisallowed-function-list=foo,foobar,bar,foobar" } */ - -int foobar (int i) -{ - return (i * 5); -} - -int foobar1 (int i) -{ - return foobar (i); /* { dg-warning "disallowed call to 'foobar'" } */ -} diff --git a/gcc/testsuite/gcc.dg/wdisallowed-functions-3.c b/gcc/testsuite/gcc.dg/wdisallowed-functions-3.c deleted file mode 100644 index 5b8b31bdfc9..00000000000 --- a/gcc/testsuite/gcc.dg/wdisallowed-functions-3.c +++ /dev/null @@ -1,10 +0,0 @@ -/* PR c++/39554 */ -/* { dg-do compile } */ -/* { dg-options "-Wdisallowed-function-list=bar" } */ - -void -foo (void (*p) (void), void (*bar) (void)) -{ - p (); - bar (); -} diff --git a/gcc/testsuite/gcc.dg/winline-10.c b/gcc/testsuite/gcc.dg/winline-10.c new file mode 100644 index 00000000000..2106253fcf2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/winline-10.c @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -Winline" } */ + +struct s { int a; }; + +inline void f (x) /* { dg-warning "inlining .* mismatched arg" "" } */ + int x; +{ + asm (""); +} + +void g (struct s x) +{ + f (x); /* { dg-warning "called from here" "" } */ +} + +void f (int x); /* { dg-warning "follows non-prototype definition" } */ diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-28.c b/gcc/testsuite/gcc.target/powerpc/altivec-28.c new file mode 100644 index 00000000000..db6c25ac7e8 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/altivec-28.c @@ -0,0 +1,16 @@ +/* { dg-do compile { target powerpc*-*-* } } */ +/* { dg-require-effective-target powerpc_altivec_ok } */ +/* { dg-options "-maltivec" } */ + +#define B bool +#define P pixel +#define I int +#define BI bool int +#define PI pixel int + +vector B int i; +vector P int j; +vector B I k; +vector P I l; +vector BI m; +vector PI n; diff --git a/gcc/testsuite/gfortran.dg/alloc_comp_assign_9.f90 b/gcc/testsuite/gfortran.dg/alloc_comp_assign_9.f90 new file mode 100644 index 00000000000..9051bafa019 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/alloc_comp_assign_9.f90 @@ -0,0 +1,20 @@ +! { dg-do run } +! Test the fix for PR39519, where the presence of the pointer +! as the first component was preventing the second from passing +! the "alloc_comp" attribute to the derived type. +! +! Contributed by Gilbert Scott <gilbert.scott@easynet.co.uk> +! +PROGRAM X + TYPE T + INTEGER, POINTER :: P + INTEGER, ALLOCATABLE :: A(:) + END TYPE T + TYPE(T) :: T1,T2 + ALLOCATE ( T1%A(1) ) + ALLOCATE ( T2%A(1) ) + T1%A = 23 + T2 = T1 + T1%A = 42 + if (T2%A(1) .NE. 23) CALL ABORT +END PROGRAM X diff --git a/gcc/testsuite/gfortran.dg/array_constructor_11.f90 b/gcc/testsuite/gfortran.dg/array_constructor_11.f90 index 395d2927b9e..bb9f0dddb11 100644 --- a/gcc/testsuite/gfortran.dg/array_constructor_11.f90 +++ b/gcc/testsuite/gfortran.dg/array_constructor_11.f90 @@ -10,20 +10,20 @@ contains call test (1, 11, 3, (/ (i, i = 1, 11, 3) /)) call test (3, 20, 2, (/ (i, i = 3, 20, 2) /)) - call test (4, 0, 11, (/ (i, i = 4, 0, 11) /)) + call test (4, 0, 11, (/ (i, i = 4, 0, 11) /)) ! { dg-warning "will be executed zero times" } call test (110, 10, -3, (/ (i, i = 110, 10, -3) /)) call test (200, 20, -12, (/ (i, i = 200, 20, -12) /)) - call test (29, 30, -6, (/ (i, i = 29, 30, -6) /)) + call test (29, 30, -6, (/ (i, i = 29, 30, -6) /)) ! { dg-warning "will be executed zero times" } call test (1, order, 3, (/ (i, i = 1, order, 3) /)) call test (order, 1, -3, (/ (i, i = order, 1, -3) /)) ! Triggers compile-time iterator calculations in trans-array.c call test (1, 1000, 2, (/ (i, i = 1, 1000, 2), (i, i = order, 0, 1) /)) - call test (1, 0, 3, (/ (i, i = 1, 0, 3), (i, i = order, 0, 1) /)) - call test (1, 2000, -5, (/ (i, i = 1, 2000, -5), (i, i = order, 0, 1) /)) - call test (3000, 99, 4, (/ (i, i = 3000, 99, 4), (i, i = order, 0, 1) /)) + call test (1, 0, 3, (/ (i, i = 1, 0, 3), (i, i = order, 0, 1) /)) ! { dg-warning "will be executed zero times" } + call test (1, 2000, -5, (/ (i, i = 1, 2000, -5), (i, i = order, 0, 1) /)) ! { dg-warning "will be executed zero times" } + call test (3000, 99, 4, (/ (i, i = 3000, 99, 4), (i, i = order, 0, 1) /)) ! { dg-warning "will be executed zero times" } call test (400, 77, -39, (/ (i, i = 400, 77, -39), (i, i = order, 0, 1) /)) do j = -10, 10 diff --git a/gcc/testsuite/gfortran.dg/array_constructor_18.f90 b/gcc/testsuite/gfortran.dg/array_constructor_18.f90 index 246f448063c..c78976839d0 100644 --- a/gcc/testsuite/gfortran.dg/array_constructor_18.f90 +++ b/gcc/testsuite/gfortran.dg/array_constructor_18.f90 @@ -5,7 +5,7 @@ ! ! Contributed by Joost VandeVondele <jv244@cam.ac.uk> ! - call foo ((/(S1(i),i=1,3,-1)/)) + call foo ((/(S1(i),i=1,3,-1)/)) ! { dg-warning "will be executed zero times" } CONTAINS FUNCTION S1(i) CHARACTER(LEN=1) :: S1 diff --git a/gcc/testsuite/gfortran.dg/array_constructor_22.f90 b/gcc/testsuite/gfortran.dg/array_constructor_22.f90 index d29039a80e6..0dcdaea68c1 100644 --- a/gcc/testsuite/gfortran.dg/array_constructor_22.f90 +++ b/gcc/testsuite/gfortran.dg/array_constructor_22.f90 @@ -7,7 +7,7 @@ module test function my_string(x) integer i real, intent(in) :: x(:) - character(0) h4(1:minval([(1,i=1,0)],1)) + character(0) h4(1:minval([(1,i=1,0)],1)) ! { dg-warning "will be executed zero times" } character(0) sv1(size(x,1):size(h4)) character(0) sv2(2*lbound(sv1,1):size(h4)) character(lbound(sv2,1)-3) my_string diff --git a/gcc/testsuite/gfortran.dg/char_result_13.f90 b/gcc/testsuite/gfortran.dg/char_result_13.f90 new file mode 100644 index 00000000000..741d55f166a --- /dev/null +++ b/gcc/testsuite/gfortran.dg/char_result_13.f90 @@ -0,0 +1,49 @@ +! { dg-do run } +! Tests the fix for PR38538, where the character length for the +! argument of 'func' was not calculated. +! +! Contributed by Vivek Rao <vivekrao4@yahoo.com> +! +module abc + implicit none +contains + subroutine xmain (i, j) + integer i, j + call foo (func ("_"//bar (i)//"x"//bar (j)//"x"), "_abcxabx") ! original was elemental + call foo (nfunc("_"//bar (j)//"x"//bar (i)//"x"), "_abxabcx") + end subroutine xmain +! + function bar (i) result(yy) + integer i, j, k + character (len = i) :: yy(2) + do j = 1, size (yy, 1) + do k = 1, i + yy(j)(k:k) = char (96+k) + end do + end do + end function bar +! + elemental function func (yy) result(xy) + character (len = *), intent(in) :: yy + character (len = len (yy)) :: xy + xy = yy + end function func +! + function nfunc (yy) result(xy) + character (len = *), intent(in) :: yy(:) + character (len = len (yy)) :: xy(size (yy)) + xy = yy + end function nfunc +! + subroutine foo(cc, teststr) + character (len=*), intent(in) :: cc(:) + character (len=*), intent(in) :: teststr + if (any (cc .ne. teststr)) call abort + end subroutine foo +end module abc + + use abc + call xmain(3, 2) +end +! { dg-final { cleanup-modules "abc" } } + diff --git a/gcc/testsuite/gfortran.dg/do_1.f90 b/gcc/testsuite/gfortran.dg/do_1.f90 index 20e1f31ca67..171275af3f2 100644 --- a/gcc/testsuite/gfortran.dg/do_1.f90 +++ b/gcc/testsuite/gfortran.dg/do_1.f90 @@ -29,17 +29,17 @@ program do_1 ! Zero iterations j = 0 - do i = 1, 0, 1 + do i = 1, 0, 1 ! { dg-warning "executed zero times" } j = j + 1 end do if (j .ne. 0) call abort j = 0 - do i = 1, 0, 2 + do i = 1, 0, 2 ! { dg-warning "executed zero times" } j = j + 1 end do if (j .ne. 0) call abort j = 0 - do i = 1, 2, -1 + do i = 1, 2, -1 ! { dg-warning "executed zero times" } j = j + 1 end do if (j .ne. 0) call abort diff --git a/gcc/testsuite/gfortran.dg/do_3.F90 b/gcc/testsuite/gfortran.dg/do_3.F90 index 3cada5a0051..67723a508f4 100644 --- a/gcc/testsuite/gfortran.dg/do_3.F90 +++ b/gcc/testsuite/gfortran.dg/do_3.F90 @@ -21,16 +21,16 @@ program test TEST_LOOP(i, 0, 1, 2, 1, test_i, 2) TEST_LOOP(i, 0, 1, 3, 1, test_i, 3) TEST_LOOP(i, 0, 1, huge(0), 1, test_i, huge(0)) - TEST_LOOP(i, 0, 1, -1, 0, test_i, 0) - TEST_LOOP(i, 0, 1, -2, 0, test_i, 0) - TEST_LOOP(i, 0, 1, -3, 0, test_i, 0) - TEST_LOOP(i, 0, 1, -huge(0), 0, test_i, 0) - TEST_LOOP(i, 0, 1, -huge(0)-1, 0, test_i, 0) - - TEST_LOOP(i, 1, 0, 1, 0, test_i, 1) - TEST_LOOP(i, 1, 0, 2, 0, test_i, 1) - TEST_LOOP(i, 1, 0, 3, 0, test_i, 1) - TEST_LOOP(i, 1, 0, huge(0), 0, test_i, 1) + TEST_LOOP(i, 0, 1, -1, 0, test_i, 0) ! { dg-warning "executed zero times" } + TEST_LOOP(i, 0, 1, -2, 0, test_i, 0) ! { dg-warning "executed zero times" } + TEST_LOOP(i, 0, 1, -3, 0, test_i, 0) ! { dg-warning "executed zero times" } + TEST_LOOP(i, 0, 1, -huge(0), 0, test_i, 0) ! { dg-warning "executed zero times" } + TEST_LOOP(i, 0, 1, -huge(0)-1, 0, test_i, 0) ! { dg-warning "executed zero times" } + + TEST_LOOP(i, 1, 0, 1, 0, test_i, 1) ! { dg-warning "executed zero times" } + TEST_LOOP(i, 1, 0, 2, 0, test_i, 1) ! { dg-warning "executed zero times" } + TEST_LOOP(i, 1, 0, 3, 0, test_i, 1) ! { dg-warning "executed zero times" } + TEST_LOOP(i, 1, 0, huge(0), 0, test_i, 1) ! { dg-warning "executed zero times" } TEST_LOOP(i, 1, 0, -1, 2, test_i, -1) TEST_LOOP(i, 1, 0, -2, 1, test_i, -1) TEST_LOOP(i, 1, 0, -3, 1, test_i, -2) @@ -58,14 +58,14 @@ program test TEST_LOOP(i1, huge(i1), -huge(i1)-1_1, -huge(i1)-1_1, 2, test_i1, -huge(i1)-2_1) TEST_LOOP(i1, -2_1, 3_1, huge(i1), 1, test_i1, huge(i1)-2_1) - TEST_LOOP(i1, -2_1, 3_1, -huge(i1), 0, test_i1, -2_1) + TEST_LOOP(i1, -2_1, 3_1, -huge(i1), 0, test_i1, -2_1) ! { dg-warning "executed zero times" } TEST_LOOP(i1, 2_1, -3_1, -huge(i1), 1, test_i1, 2_1-huge(i1)) - TEST_LOOP(i1, 2_1, -3_1, huge(i1), 0, test_i1, 2_1) + TEST_LOOP(i1, 2_1, -3_1, huge(i1), 0, test_i1, 2_1) ! { dg-warning "executed zero times" } ! Real loops TEST_LOOP(r, 0.0, 1.0, 0.11, 1 + int(1.0/0.11), test_r, 0.0) - TEST_LOOP(r, 0.0, 1.0, -0.11, 0, test_r, 0.0) - TEST_LOOP(r, 0.0, -1.0, 0.11, 0, test_r, 0.0) + TEST_LOOP(r, 0.0, 1.0, -0.11, 0, test_r, 0.0) ! { dg-warning "executed zero times" } + TEST_LOOP(r, 0.0, -1.0, 0.11, 0, test_r, 0.0) ! { dg-warning "executed zero times" } TEST_LOOP(r, 0.0, -1.0, -0.11, 1 + int(1.0/0.11), test_r, 0.0) TEST_LOOP(r, 0.0, 0.0, 0.11, 1, test_r, 0.0) TEST_LOOP(r, 0.0, 0.0, -0.11, 1, test_r, 0.0) diff --git a/gcc/testsuite/gfortran.dg/do_check_1.f90 b/gcc/testsuite/gfortran.dg/do_check_1.f90 new file mode 100644 index 00000000000..94d8a848810 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/do_check_1.f90 @@ -0,0 +1,16 @@ +! { dg-do run } +! { dg-options "-fcheck=do" } +! { dg-shouldfail "DO check" } +! +! PR fortran/34656 +! Run-time check for zero STEP +! +program test + implicit none + integer :: i,j + j = 0 + do i = 1, 40, j + print *, i + end do +end program test +! { dg-output "Fortran runtime error: DO step value is zero" } diff --git a/gcc/testsuite/gfortran.dg/do_check_2.f90 b/gcc/testsuite/gfortran.dg/do_check_2.f90 new file mode 100644 index 00000000000..c40760d2598 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/do_check_2.f90 @@ -0,0 +1,20 @@ +! { dg-do run } +! { dg-options "-fcheck=do" } +! { dg-shouldfail "DO check" } +! +! PR fortran/34656 +! Run-time check for modifing loop variables +! +program test + implicit none + integer :: i,j + do i = 1, 10 + call modLoopVar(i) + end do +contains + subroutine modLoopVar(i) + integer :: i + i = i + 1 + end subroutine modLoopVar +end program test +! { dg-output "Fortran runtime error: Loop variable has been modified" } diff --git a/gcc/testsuite/gfortran.dg/do_check_3.f90 b/gcc/testsuite/gfortran.dg/do_check_3.f90 new file mode 100644 index 00000000000..15086c20a13 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/do_check_3.f90 @@ -0,0 +1,22 @@ +! { dg-do run } +! { dg-options "-fcheck=do" } +! { dg-shouldfail "DO check" } +! +! PR fortran/34656 +! Run-time check for modifing loop variables +! +program test + implicit none + real :: i, j, k + j = 10.0 + k = 1.0 + do i = 1.0, j, k ! { dg-warning "must be integer" } + call modLoopVar(i) + end do +contains + subroutine modLoopVar(x) + real :: x + x = x + 1 + end subroutine modLoopVar +end program test +! { dg-output "Fortran runtime error: Loop variable has been modified" } diff --git a/gcc/testsuite/gfortran.dg/do_check_4.f90 b/gcc/testsuite/gfortran.dg/do_check_4.f90 new file mode 100644 index 00000000000..65bc92c7e1a --- /dev/null +++ b/gcc/testsuite/gfortran.dg/do_check_4.f90 @@ -0,0 +1,21 @@ +! { dg-do run } +! { dg-options "-fcheck=do" } +! { dg-shouldfail "DO check" } +! +! PR fortran/34656 +! Run-time check for modifing loop variables +! +PROGRAM test + IMPLICIT NONE + INTEGER :: i + DO i=1,100 + CALL do_something() + ENDDO +CONTAINS + SUBROUTINE do_something() + IMPLICIT NONE + DO i=1,10 + ENDDO + END SUBROUTINE do_something +END PROGRAM test +! { dg-output "Fortran runtime error: Loop variable has been modified" } diff --git a/gcc/testsuite/gfortran.dg/do_check_5.f90 b/gcc/testsuite/gfortran.dg/do_check_5.f90 new file mode 100644 index 00000000000..081a228cfc7 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/do_check_5.f90 @@ -0,0 +1,32 @@ +! { dg-do compile } +! +! PR/fortran 38432 +! DO-loop compile-time checks +! +implicit none +integer :: i +real :: r +do i = 1, 0 ! { dg-warning "executed zero times" } +end do + +do i = 1, -1, 1 ! { dg-warning "executed zero times" } +end do + +do i = 1, 2, -1 ! { dg-warning "executed zero times" } +end do + +do i = 1, 2, 0 ! { dg-error "cannot be zero" } +end do + +do r = 1, 0 ! { dg-warning "must be integer|executed zero times" } +end do + +do r = 1, -1, 1 ! { dg-warning "must be integer|executed zero times" } +end do + +do r = 1, 2, -1 ! { dg-warning "must be integer|executed zero times" } +end do + +do r = 1, 2, 0 ! { dg-error "must be integer|cannot be zero" } +end do +end diff --git a/gcc/testsuite/gfortran.dg/recursive_check_7.f90 b/gcc/testsuite/gfortran.dg/recursive_check_7.f90 new file mode 100644 index 00000000000..c1af8adc810 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/recursive_check_7.f90 @@ -0,0 +1,40 @@ +! { dg-do run } +! { dg-options "-fcheck=recursion" } +! { dg-shouldfail "Recursion check" } +! +! PR fortran/32626 +! Recursion run-time check +! + +subroutine NormalFunc() +end subroutine NormalFunc + +recursive subroutine valid(x) + logical :: x + if(x) call sndValid() + print *, 'OK' +end subroutine valid + +subroutine sndValid() + call valid(.false.) +end subroutine sndValid + +subroutine invalid(x) + logical :: x + if(x) call sndInvalid() + print *, 'BUG' + call abort() +end subroutine invalid + +subroutine sndInvalid() + call invalid(.false.) +end subroutine sndInvalid + +call valid(.true.) +call valid(.true.) +call NormalFunc() +call NormalFunc() +call invalid(.true.) +end + +! { dg-output "Fortran runtime error: Recursive call to nonrecursive procedure 'invalid'" } diff --git a/gcc/testsuite/gfortran.dg/trim_1.f90 b/gcc/testsuite/gfortran.dg/trim_1.f90 new file mode 100644 index 00000000000..ac1e1f2032d --- /dev/null +++ b/gcc/testsuite/gfortran.dg/trim_1.f90 @@ -0,0 +1,41 @@ +! { dg-do run } + +! Torture-test TRIM and LEN_TRIM for correctness. + + +! Given a total string length and a trimmed length, construct an +! appropriate string and check gfortran gets it right. + +SUBROUTINE check_trim (full_len, trimmed_len) + IMPLICIT NONE + INTEGER, INTENT(IN) :: full_len, trimmed_len + CHARACTER(LEN=full_len) :: string + + string = "" + IF (trimmed_len > 0) THEN + string(trimmed_len:trimmed_len) = "x" + END IF + + IF (LEN (string) /= full_len & + .OR. LEN_TRIM (string) /= trimmed_len & + .OR. LEN (TRIM (string)) /= trimmed_len & + .OR. TRIM (string) /= string (1:trimmed_len)) THEN + PRINT *, full_len, trimmed_len + PRINT *, LEN (string), LEN_TRIM (string) + CALL abort () + END IF +END SUBROUTINE check_trim + + +! The main program, check with various combinations. + +PROGRAM main + IMPLICIT NONE + INTEGER :: i, j + + DO i = 0, 20 + DO j = 0, i + CALL check_trim (i, j) + END DO + END DO +END PROGRAM main diff --git a/gcc/testsuite/gfortran.dg/vect/fast-math-pr38968.f90 b/gcc/testsuite/gfortran.dg/vect/fast-math-pr38968.f90 new file mode 100644 index 00000000000..e16131502db --- /dev/null +++ b/gcc/testsuite/gfortran.dg/vect/fast-math-pr38968.f90 @@ -0,0 +1,21 @@ +program mymatmul + implicit none + integer, parameter :: kp = 4 + integer, parameter :: n = 2000 + real(kp), dimension(n,n) :: rr, ri + complex(kp), dimension(n,n) :: a,b,c + real :: t1, t2 + integer :: i, j, k + + do j = 1, n + do k = 1, n + do i = 1, n + c(i,j) = c(i,j) + a(i,k) * b(k,j) + end do + end do + end do + +end program mymatmul + +! { dg-final { scan-tree-dump "vectorized 1 loops" "vect" } } +! { dg-final { cleanup-tree-dump "vect" } } diff --git a/gcc/testsuite/objc.dg/conditional-1.m b/gcc/testsuite/objc.dg/conditional-1.m new file mode 100644 index 00000000000..0aad62c55f1 --- /dev/null +++ b/gcc/testsuite/objc.dg/conditional-1.m @@ -0,0 +1,45 @@ +/* Testing conditional warnings (without headers). */ +/* Author: David Ayers */ + +/* { dg-do compile } */ + +#define nil ((id)0) +@interface MyObject +@end + +@protocol MyProtocol +@end + +@interface MyProtoObject <MyProtocol> +@end + + +int +main (int argc, char *argv[]) +{ + id var_id = nil; + id <MyProtocol> var_id_p = nil; + MyObject *var_obj = nil; + MyProtoObject *var_obj_p = nil; + + var_id = (var_id == var_obj) ? var_id : var_obj; + var_id = (var_id == var_obj) ? var_id : var_obj_p; + + /* Ayers: Currently, the following test case passes for + technically the wrong reason (see below). + */ + var_obj_p = (var_id == var_obj) ? var_obj_p : var_obj; /* { dg-warning "distinct Objective-C types" } */ + var_obj_p = (var_id == var_obj) ? var_obj_p : var_id_p; + + /* Ayers: The first of the following test cases + should probably warn for var_obj_p = var_obj, + yet that would require extensive changes to + build_conditional_expr to create a tree with + multiple types that the assignment would have + to evaluate both versions for correct diagnostics. + */ + var_obj_p = (var_id == var_obj) ? var_id : var_obj; + var_obj_p = (var_id == var_obj) ? var_id : var_obj_p; + + return 0; +} diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index e4fbaf7327c..20e62edbf05 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -1946,11 +1946,34 @@ make_eh_edge (struct eh_region *region, void *data) make_edge (src, dst, EDGE_ABNORMAL | EDGE_EH); } +/* See if STMT is call that might be inlined. */ + +static bool +inlinable_call_p (gimple stmt) +{ + tree decl; + if (gimple_code (stmt) != GIMPLE_CALL) + return false; + if (cfun->after_inlining) + return false; + /* Indirect calls can be propagated to direct call + and inlined. */ + decl = gimple_call_fndecl (stmt); + if (!decl) + return true; + if (cgraph_function_flags_ready + && cgraph_function_body_availability (cgraph_node (decl)) + < AVAIL_OVERWRITABLE) + return false; + return !DECL_UNINLINABLE (decl); +} + void make_eh_edges (gimple stmt) { int region_nr; bool is_resx; + bool inlinable = false; if (gimple_code (stmt) == GIMPLE_RESX) { @@ -1963,9 +1986,10 @@ make_eh_edges (gimple stmt) if (region_nr < 0) return; is_resx = false; + inlinable = inlinable_call_p (stmt); } - foreach_reachable_handler (region_nr, is_resx, make_eh_edge, stmt); + foreach_reachable_handler (region_nr, is_resx, inlinable, make_eh_edge, stmt); } static bool mark_eh_edge_found_error; @@ -2019,6 +2043,7 @@ verify_eh_edges (gimple stmt) basic_block bb = gimple_bb (stmt); edge_iterator ei; edge e; + bool inlinable = false; FOR_EACH_EDGE (e, ei, bb->succs) gcc_assert (!e->aux); @@ -2046,10 +2071,11 @@ verify_eh_edges (gimple stmt) error ("BB %i last statement has incorrectly set region", bb->index); return true; } + inlinable = inlinable_call_p (stmt); is_resx = false; } - foreach_reachable_handler (region_nr, is_resx, mark_eh_edge, stmt); + foreach_reachable_handler (region_nr, is_resx, inlinable, mark_eh_edge, stmt); FOR_EACH_EDGE (e, ei, bb->succs) { if ((e->flags & EDGE_EH) && !e->aux) @@ -2342,15 +2368,7 @@ stmt_could_throw_p (gimple stmt) if (code == GIMPLE_ASSIGN || code == GIMPLE_COND) return stmt_could_throw_1_p (stmt); else if (is_gimple_call (stmt)) - { - tree t = gimple_call_fndecl (stmt); - - /* Assume that calls to weak functions may trap. */ - if (!t || !DECL_P (t) || DECL_WEAK (t)) - return true; - - return (gimple_call_flags (stmt) & ECF_NOTHROW) == 0; - } + return (gimple_call_flags (stmt) & ECF_NOTHROW) == 0; else if (gimple_code (stmt) == GIMPLE_ASM) return (gimple_asm_volatile_p (stmt)); else @@ -2384,6 +2402,32 @@ tree_could_throw_p (tree t) return false; } +/* Return true if STMT can throw an exception that is not caught within + the current function (CFUN). */ + +bool +stmt_can_throw_external (gimple stmt) +{ + int region_nr; + bool is_resx = false; + bool inlinable_call = false; + + if (!stmt_could_throw_p (stmt)) + return false; + + if (gimple_code (stmt) == GIMPLE_RESX) + { + region_nr = gimple_resx_region (stmt); + is_resx = true; + } + else + region_nr = lookup_stmt_eh_region (stmt); + + if (region_nr < 0) + return true; + + return can_throw_external_1 (region_nr, is_resx, inlinable_call); +} /* Return true if STMT can throw an exception that is caught within the current function (CFUN). */ @@ -2393,6 +2437,7 @@ stmt_can_throw_internal (gimple stmt) { int region_nr; bool is_resx = false; + bool inlinable_call = false; if (gimple_code (stmt) == GIMPLE_RESX) { @@ -2400,12 +2445,15 @@ stmt_can_throw_internal (gimple stmt) is_resx = true; } else - region_nr = lookup_stmt_eh_region (stmt); + { + region_nr = lookup_stmt_eh_region (stmt); + inlinable_call = inlinable_call_p (stmt); + } if (region_nr < 0) return false; - return can_throw_internal_1 (region_nr, is_resx); + return can_throw_internal_1 (region_nr, is_resx, inlinable_call); } @@ -2591,3 +2639,274 @@ struct gimple_opt_pass pass_refactor_eh = TODO_dump_func /* todo_flags_finish */ } }; + +/* Walk statements, see what regions are really references and remove unreachable ones. */ + +static void +tree_remove_unreachable_handlers (void) +{ + sbitmap reachable, contains_stmt; + VEC(int,heap) * label_to_region; + basic_block bb; + + label_to_region = label_to_region_map (); + reachable = sbitmap_alloc (num_eh_regions ()); + sbitmap_zero (reachable); + contains_stmt = sbitmap_alloc (num_eh_regions ()); + sbitmap_zero (contains_stmt); + + FOR_EACH_BB (bb) + { + gimple_stmt_iterator gsi; + int region; + bool has_eh_preds = false; + edge e; + edge_iterator ei; + + FOR_EACH_EDGE (e, ei, bb->preds) if (e->flags & EDGE_EH) + has_eh_preds = true; + + for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) + { + gimple stmt = gsi_stmt (gsi); + + if (gimple_code (stmt) == GIMPLE_LABEL && has_eh_preds) + { + int uid = LABEL_DECL_UID (gimple_label_label (stmt)); + if (uid <= cfun->cfg->last_label_uid) + { + int region = VEC_index (int, label_to_region, uid); + SET_BIT (reachable, region); + } + } + if (gimple_code (stmt) == RESX) + SET_BIT (reachable, gimple_resx_region (stmt)); + if ((region = lookup_stmt_eh_region (stmt)) >= 0) + SET_BIT (contains_stmt, region); + } + } + + if (dump_file) + { + fprintf (dump_file, "Before removal of unreachable regions:\n"); + dump_eh_tree (dump_file, cfun); + fprintf (dump_file, "Reachable regions: "); + dump_sbitmap_file (dump_file, reachable); + fprintf (dump_file, "Regions containing insns: "); + dump_sbitmap_file (dump_file, contains_stmt); + } + + remove_unreachable_regions (reachable, contains_stmt); + sbitmap_free (reachable); + sbitmap_free (contains_stmt); + VEC_free (int, heap, label_to_region); + if (dump_file) + { + fprintf (dump_file, "\n\nAfter removal of unreachable regions:\n"); + dump_eh_tree (dump_file, cfun); + fprintf (dump_file, "\n\n"); + } +} + +/* Pattern match emtpy EH receiver looking like: + + save_filt.6352_662 = [filter_expr] <<<filter object>>>; + save_eptr.6351_663 = [exc_ptr_expr] <<<exception object>>>; + <<<exception object>>> = save_eptr.6351_663; + <<<filter object>>> = save_filt.6352_662; + resx 1 + */ + +static int +tree_empty_eh_handler_p (basic_block bb) +{ + gimple_stmt_iterator gsi; + int region; + + gsi = gsi_last_bb (bb); + + /* RESX */ + if (gsi_end_p (gsi)) + return 0; + if (gimple_code (gsi_stmt (gsi)) != GIMPLE_RESX) + return 0; + region = gimple_resx_region (gsi_stmt (gsi)); + + /* filter_object set. */ + gsi_prev (&gsi); + if (gsi_end_p (gsi)) + return 0; + if (gimple_code (gsi_stmt (gsi)) != GIMPLE_ASSIGN) + return 0; + if (TREE_CODE (gimple_assign_lhs (gsi_stmt (gsi))) != FILTER_EXPR) + return 0; + + /* filter_object set. */ + gsi_prev (&gsi); + if (gsi_end_p (gsi)) + return 0; + if (gimple_code (gsi_stmt (gsi)) != GIMPLE_ASSIGN) + return 0; + if (TREE_CODE (gimple_assign_lhs (gsi_stmt (gsi))) != EXC_PTR_EXPR) + return 0; + + /* filter_object get. */ + gsi_prev (&gsi); + if (gsi_end_p (gsi)) + return 0; + if (gimple_code (gsi_stmt (gsi)) != GIMPLE_ASSIGN) + return 0; + if (TREE_CODE (gimple_assign_rhs1 (gsi_stmt (gsi))) != EXC_PTR_EXPR) + return 0; + + /* filter_object get. */ + gsi_prev (&gsi); + if (gsi_end_p (gsi)) + return 0; + if (gimple_code (gsi_stmt (gsi)) != GIMPLE_ASSIGN) + return 0; + if (TREE_CODE (gimple_assign_rhs1 (gsi_stmt (gsi))) != FILTER_EXPR) + return 0; + + /* label. */ + gsi_prev (&gsi); + if (gsi_end_p (gsi)) + return 0; + if (gimple_code (gsi_stmt (gsi)) == GIMPLE_LABEL) + return region; + else + return 0; +} + +static bool dominance_info_invalidated; + +/* Look for basic blocks containing empty exception handler and remove them. + This is similar to jump forwarding, just across EH edges. */ + +static bool +cleanup_empty_eh (basic_block bb) +{ + int region; + + /* When handler of EH region winds up to be empty, we can safely + remove it. This leads to inner EH regions to be redirected + to outer one, if present in function. So we need to rebuild + EH edges in all sources. */ + if ((region = tree_empty_eh_handler_p (bb))) + { + edge_iterator ei; + edge e; + gimple_stmt_iterator si; + + remove_eh_region (region); + + /* It is safe to mark symbol for renaming because we have abnormal PHI + here. Once EH edges are made redirectable we might need to add here + similar updating as jump threading does. */ + + for (si = gsi_start_phis (bb); !gsi_end_p (si); gsi_next (&si)) + mark_sym_for_renaming (SSA_NAME_VAR (PHI_RESULT (gsi_stmt (si)))); + + while ((e = ei_safe_edge (ei_start (bb->preds)))) + { + basic_block src = e->src; + gcc_assert (e->flags & EDGE_EH); + for (ei = ei_start (src->succs); (e = ei_safe_edge (ei));) + { + if (e->flags & EDGE_EH) + { + remove_edge (e); + dominance_info_invalidated = true; + } + else + ei_next (&ei); + } + if (!stmt_can_throw_internal (last_stmt (src))) + continue; + make_eh_edges (last_stmt (src)); + FOR_EACH_EDGE (e, ei, src->succs) if (e->flags & EDGE_EH) + { + dominance_info_invalidated = true; + for (si = gsi_start_phis (e->dest); !gsi_end_p (si); + gsi_next (&si)) + mark_sym_for_renaming (SSA_NAME_VAR + (PHI_RESULT (gsi_stmt (si)))); + } + } + if (dump_file) + fprintf (dump_file, "Empty EH handler %i removed\n", region); + delete_basic_block (bb); + return true; + } + return false; +} + + +/* Perform cleanups and lowering of exception handling + 1) cleanups regions with handlers doing nothing are optimized out + 2) MUST_NOT_THROW regions that became dead because of 1) are optimized out + 3) Info about regions that are containing instructions, and regions + reachable via local EH edges is collected + 4) Eh tree is pruned for regions no longer neccesary. + */ + +static unsigned int +cleanup_eh (void) +{ + bool changed = false; + basic_block bb; + int i; + + if (!cfun->eh) + return 0; + if (dump_file) + { + fprintf (dump_file, "Before cleanups:\n"); + dump_eh_tree (dump_file, cfun); + } + + dominance_info_invalidated = false; + /* We cannot use FOR_EACH_BB, since the basic blocks may get removed. */ + for (i = NUM_FIXED_BLOCKS; i < last_basic_block; i++) + { + bb = BASIC_BLOCK (i); + if (bb) + changed |= cleanup_empty_eh (bb); + } + if (dominance_info_invalidated) + { + free_dominance_info (CDI_DOMINATORS); + free_dominance_info (CDI_POST_DOMINATORS); + } + + /* Removing contained cleanup can render MUST_NOT_THROW regions empty. */ + if (changed) + delete_unreachable_blocks (); + + tree_remove_unreachable_handlers (); + if (dump_file) + { + fprintf (dump_file, "After cleanups:\n"); + dump_eh_tree (dump_file, cfun); + } + + return (changed ? TODO_cleanup_cfg | TODO_update_ssa : 0); +} + +struct gimple_opt_pass pass_cleanup_eh = { + { + GIMPLE_PASS, + "ehcleanup", /* name */ + NULL, /* gate */ + cleanup_eh, /* execute */ + NULL, /* sub */ + NULL, /* next */ + 0, /* static_pass_number */ + TV_TREE_EH, /* tv_id */ + PROP_gimple_lcf, /* properties_required */ + 0, /* properties_provided */ + 0, /* properties_destroyed */ + 0, /* todo_flags_start */ + TODO_dump_func /* todo_flags_finish */ + } +}; diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h index c5b9bd79e3a..07fb9be31e8 100644 --- a/gcc/tree-flow.h +++ b/gcc/tree-flow.h @@ -1077,6 +1077,7 @@ extern bool operation_could_trap_p (enum tree_code, bool, bool, tree); extern bool stmt_could_throw_p (gimple); extern bool tree_could_throw_p (tree); extern bool stmt_can_throw_internal (gimple); +extern bool stmt_can_throw_external (gimple); extern void add_stmt_to_eh_region (gimple, int); extern bool remove_stmt_from_eh_region (gimple); extern bool maybe_clean_or_replace_eh_stmt (gimple, gimple); diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index e6a2fb301eb..37d9098034f 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -3153,7 +3153,7 @@ expand_call_inline (basic_block bb, gimple stmt, copy_body_data *id) tree modify_dest; location_t saved_location; struct cgraph_edge *cg_edge; - const char *reason; + cgraph_inline_failed_t reason; basic_block return_block; edge e; gimple_stmt_iterator gsi, stmt_gsi; @@ -3218,7 +3218,7 @@ expand_call_inline (basic_block bb, gimple stmt, copy_body_data *id) cgraph_create_edge (id->dst_node, dest, stmt, bb->count, CGRAPH_FREQ_BASE, bb->loop_depth)->inline_failed - = N_("originally indirect function call not considered for inlining"); + = CIF_ORIGINALLY_INDIRECT_CALL; if (dump_file) { fprintf (dump_file, "Created new direct edge to %s", @@ -3241,18 +3241,19 @@ expand_call_inline (basic_block bb, gimple stmt, copy_body_data *id) /* Avoid warnings during early inline pass. */ && cgraph_global_info_ready) { - sorry ("inlining failed in call to %q+F: %s", fn, reason); + sorry ("inlining failed in call to %q+F: %s", fn, + cgraph_inline_failed_string (reason)); sorry ("called from here"); } else if (warn_inline && DECL_DECLARED_INLINE_P (fn) && !DECL_IN_SYSTEM_HEADER (fn) - && strlen (reason) + && reason != CIF_UNSPECIFIED && !lookup_attribute ("noinline", DECL_ATTRIBUTES (fn)) /* Avoid warnings during early inline pass. */ && cgraph_global_info_ready) { warning (OPT_Winline, "inlining failed in call to %q+F: %s", - fn, reason); + fn, cgraph_inline_failed_string (reason)); warning (OPT_Winline, "called from here"); } goto egress; diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c index 2640167face..d69fd2949df 100644 --- a/gcc/tree-optimize.c +++ b/gcc/tree-optimize.c @@ -293,9 +293,6 @@ execute_fixup_cfg (void) gimple_stmt_iterator gsi; int todo = gimple_in_ssa_p (cfun) ? TODO_verify_ssa : 0; - cfun->after_inlining = true; - cfun->always_inline_functions_inlined = true; - if (cfun->eh) FOR_EACH_BB (bb) { @@ -314,6 +311,7 @@ execute_fixup_cfg (void) if (gimple_in_ssa_p (cfun)) { todo |= TODO_update_ssa | TODO_cleanup_cfg; + mark_symbols_for_renaming (stmt); update_stmt (stmt); } } @@ -333,6 +331,25 @@ execute_fixup_cfg (void) return todo; } +struct gimple_opt_pass pass_fixup_cfg = +{ + { + GIMPLE_PASS, + NULL, /* name */ + NULL, /* gate */ + execute_fixup_cfg, /* execute */ + NULL, /* sub */ + NULL, /* next */ + 0, /* static_pass_number */ + 0, /* tv_id */ + PROP_cfg, /* properties_required */ + 0, /* properties_provided */ + 0, /* properties_destroyed */ + 0, /* todo_flags_start */ + 0 /* todo_flags_finish */ + } +}; + /* Do the actions required to initialize internal data structures used in tree-ssa optimization passes. */ diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h index db437a62538..77896725ae3 100644 --- a/gcc/tree-pass.h +++ b/gcc/tree-pass.h @@ -309,6 +309,8 @@ extern struct gimple_opt_pass pass_tree_profile; extern struct gimple_opt_pass pass_early_tree_profile; extern struct gimple_opt_pass pass_cleanup_cfg; extern struct gimple_opt_pass pass_referenced_vars; +extern struct gimple_opt_pass pass_cleanup_eh; +extern struct gimple_opt_pass pass_fixup_cfg; extern struct gimple_opt_pass pass_sra; extern struct gimple_opt_pass pass_sra_early; extern struct gimple_opt_pass pass_tail_recursion; @@ -388,6 +390,7 @@ extern struct gimple_opt_pass pass_reassoc; extern struct gimple_opt_pass pass_rebuild_cgraph_edges; extern struct gimple_opt_pass pass_build_cgraph_edges; extern struct gimple_opt_pass pass_reset_cc_flags; +extern struct gimple_opt_pass pass_local_pure_const; /* IPA Passes */ extern struct ipa_opt_pass pass_ipa_inline; @@ -523,6 +526,7 @@ extern void execute_pass_list (struct opt_pass *); extern void execute_ipa_pass_list (struct opt_pass *); extern void print_current_pass (FILE *); extern void debug_pass (void); +extern bool function_called_by_processed_nodes_p (void); /* Set to true if the pass is called the first time during compilation of the current function. Note that using this information in the optimization diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index 5080cc32ce7..c7df5884783 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -208,6 +208,7 @@ along with GCC; see the file COPYING3. If not see #include "langhooks.h" #include "target.h" #include "toplev.h" +#include "dbgcnt.h" /* Possible lattice values. */ @@ -320,52 +321,45 @@ get_default_value (tree var) { tree sym = SSA_NAME_VAR (var); prop_value_t val = { UNINITIALIZED, NULL_TREE }; - tree cst_val; - - if (!is_gimple_reg (var)) - { - /* Short circuit for regular CCP. We are not interested in any - non-register when DO_STORE_CCP is false. */ - val.lattice_val = VARYING; - } - else if ((cst_val = get_symbol_constant_value (sym)) != NULL_TREE) + gimple stmt; + + stmt = SSA_NAME_DEF_STMT (var); + + if (gimple_nop_p (stmt)) { - /* Globals and static variables declared 'const' take their - initial value. */ - val.lattice_val = CONSTANT; - val.value = cst_val; + /* Variables defined by an empty statement are those used + before being initialized. If VAR is a local variable, we + can assume initially that it is UNDEFINED, otherwise we must + consider it VARYING. */ + if (is_gimple_reg (sym) && TREE_CODE (sym) != PARM_DECL) + val.lattice_val = UNDEFINED; + else + val.lattice_val = VARYING; } - else - { - gimple stmt = SSA_NAME_DEF_STMT (var); - - if (gimple_nop_p (stmt)) + else if (is_gimple_assign (stmt) + /* Value-returning GIMPLE_CALL statements assign to + a variable, and are treated similarly to GIMPLE_ASSIGN. */ + || (is_gimple_call (stmt) + && gimple_call_lhs (stmt) != NULL_TREE) + || gimple_code (stmt) == GIMPLE_PHI) + { + tree cst; + if (gimple_assign_single_p (stmt) + && DECL_P (gimple_assign_rhs1 (stmt)) + && (cst = get_symbol_constant_value (gimple_assign_rhs1 (stmt)))) { - /* Variables defined by an empty statement are those used - before being initialized. If VAR is a local variable, we - can assume initially that it is UNDEFINED, otherwise we must - consider it VARYING. */ - if (is_gimple_reg (sym) && TREE_CODE (sym) != PARM_DECL) - val.lattice_val = UNDEFINED; - else - val.lattice_val = VARYING; - } - else if (is_gimple_assign (stmt) - /* Value-returning GIMPLE_CALL statements assign to - a variable, and are treated similarly to GIMPLE_ASSIGN. */ - || (is_gimple_call (stmt) - && gimple_call_lhs (stmt) != NULL_TREE) - || gimple_code (stmt) == GIMPLE_PHI) - { - /* Any other variable defined by an assignment or a PHI node - is considered UNDEFINED. */ - val.lattice_val = UNDEFINED; + val.lattice_val = CONSTANT; + val.value = cst; } else - { - /* Otherwise, VAR will never take on a constant value. */ - val.lattice_val = VARYING; - } + /* Any other variable defined by an assignment or a PHI node + is considered UNDEFINED. */ + val.lattice_val = UNDEFINED; + } + else + { + /* Otherwise, VAR will never take on a constant value. */ + val.lattice_val = VARYING; } return val; @@ -501,6 +495,7 @@ likely_value (gimple stmt) bool has_constant_operand, has_undefined_operand, all_undefined_operands; tree use; ssa_op_iter iter; + unsigned i; enum gimple_code code = gimple_code (stmt); @@ -516,33 +511,11 @@ likely_value (gimple stmt) if (gimple_has_volatile_ops (stmt)) return VARYING; - /* If we are not doing store-ccp, statements with loads - and/or stores will never fold into a constant. */ - if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_ALL_VIRTUALS)) - return VARYING; - - /* Note that only a GIMPLE_SINGLE_RHS assignment can satisfy - is_gimple_min_invariant, so we do not consider calls or - other forms of assignment. */ - if (gimple_assign_single_p (stmt) - && is_gimple_min_invariant (gimple_assign_rhs1 (stmt))) - return CONSTANT; - - if (code == GIMPLE_COND - && is_gimple_min_invariant (gimple_cond_lhs (stmt)) - && is_gimple_min_invariant (gimple_cond_rhs (stmt))) - return CONSTANT; - - if (code == GIMPLE_SWITCH - && is_gimple_min_invariant (gimple_switch_index (stmt))) - return CONSTANT; - /* Arrive here for more complex cases. */ - has_constant_operand = false; has_undefined_operand = false; all_undefined_operands = true; - FOR_EACH_SSA_TREE_OPERAND (use, stmt, iter, SSA_OP_USE | SSA_OP_VUSE) + FOR_EACH_SSA_TREE_OPERAND (use, stmt, iter, SSA_OP_USE) { prop_value_t *val = get_value (use); @@ -555,6 +528,17 @@ likely_value (gimple stmt) has_constant_operand = true; } + /* There may be constants in regular rhs operands. */ + for (i = is_gimple_call (stmt) + gimple_has_lhs (stmt); + i < gimple_num_ops (stmt); ++i) + { + tree op = gimple_op (stmt, i); + if (!op || TREE_CODE (op) == SSA_NAME) + continue; + if (is_gimple_min_invariant (op)) + has_constant_operand = true; + } + /* If the operation combines operands like COMPLEX_EXPR make sure to not mark the result UNDEFINED if only one part of the result is undefined. */ @@ -585,11 +569,11 @@ likely_value (gimple stmt) if (has_undefined_operand) return VARYING; + /* We do not consider virtual operands here -- load from read-only + memory may have only VARYING virtual operands, but still be + constant. */ if (has_constant_operand - /* We do not consider virtual operands here -- load from read-only - memory may have only VARYING virtual operands, but still be - constant. */ - || ZERO_SSA_OPERANDS (stmt, SSA_OP_USE)) + || gimple_references_memory_p (stmt)) return CONSTANT; return VARYING; @@ -605,9 +589,6 @@ surely_varying_stmt_p (gimple stmt) if (gimple_has_volatile_ops (stmt)) return true; - if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_ALL_VIRTUALS)) - return true; - /* If it is a call and does not return a value or is not a builtin and not an indirect call, it is varying. */ if (is_gimple_call (stmt)) @@ -619,6 +600,10 @@ surely_varying_stmt_p (gimple stmt) return true; } + /* Any other store operation is not interesting. */ + else if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_VIRTUAL_DEFS)) + return true; + /* Anything other than assignments and conditional jumps are not interesting for CCP. */ if (gimple_code (stmt) != GIMPLE_ASSIGN @@ -657,10 +642,7 @@ ccp_initialize (void) /* If the statement will not produce a constant, mark all its outputs VARYING. */ FOR_EACH_SSA_TREE_OPERAND (def, stmt, iter, SSA_OP_ALL_DEFS) - { - if (is_varying) - set_value_varying (def); - } + set_value_varying (def); } prop_set_simulate_again (stmt, !is_varying); } @@ -685,6 +667,24 @@ ccp_initialize (void) } } +/* Debug count support. Reset the values of ssa names + VARYING when the total number ssa names analyzed is + beyond the debug count specified. */ + +static void +do_dbg_cnt (void) +{ + unsigned i; + for (i = 0; i < num_ssa_names; i++) + { + if (!dbg_cnt (ccp)) + { + const_val[i].lattice_val = VARYING; + const_val[i].value = NULL_TREE; + } + } +} + /* Do final substitution of propagated values, cleanup the flowgraph and free allocated storage. @@ -694,8 +694,11 @@ ccp_initialize (void) static bool ccp_finalize (void) { + bool something_changed; + + do_dbg_cnt (); /* Perform substitutions based on the known constant values. */ - bool something_changed = substitute_and_fold (const_val, false); + something_changed = substitute_and_fold (const_val, false); free (const_val); const_val = NULL; @@ -953,6 +956,16 @@ ccp_fold (gimple stmt) return fold_unary (VIEW_CONVERT_EXPR, TREE_TYPE (rhs), val->value); } + else if (TREE_CODE (rhs) == INDIRECT_REF + && TREE_CODE (TREE_OPERAND (rhs, 0)) == SSA_NAME) + { + prop_value_t *val = get_value (TREE_OPERAND (rhs, 0)); + if (val->lattice_val == CONSTANT + && TREE_CODE (val->value) == ADDR_EXPR + && useless_type_conversion_p (TREE_TYPE (rhs), + TREE_TYPE (TREE_TYPE (val->value)))) + rhs = TREE_OPERAND (val->value, 0); + } return fold_const_aggregate_ref (rhs); } else if (kind == tcc_declaration) @@ -1144,6 +1157,9 @@ fold_const_aggregate_ref (tree t) unsigned HOST_WIDE_INT cnt; tree cfield, cval; + if (TREE_CODE_CLASS (TREE_CODE (t)) == tcc_declaration) + return get_symbol_constant_value (t); + switch (TREE_CODE (t)) { case ARRAY_REF: diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c index 64c697a5196..5b3616394bb 100644 --- a/gcc/tree-ssa-copy.c +++ b/gcc/tree-ssa-copy.c @@ -892,7 +892,7 @@ copy_prop_visit_phi_node (gimple phi) memory reference of all the other arguments. */ if (phi_val.value == NULL_TREE) { - phi_val.value = arg; + phi_val.value = arg_val->value ? arg_val->value : arg; continue; } diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index dd45bb7bc45..fb29f91bbf1 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -147,6 +147,14 @@ along with GCC; see the file COPYING3. If not see ptr2 = &x[index]; + Or + ssa = (int) decl + res = ssa & 1 + + Provided that decl has known alignment >= 2, will get turned into + + res = 0 + We also propagate casts into SWITCH_EXPR and COND_EXPR conditions to allow us to remove the cast and {NOT_EXPR,NEG_EXPR} into a subsequent {NOT_EXPR,NEG_EXPR}. @@ -1124,6 +1132,45 @@ simplify_gimple_switch (gimple stmt) } } +/* Run bitwise and assignments throug the folder. If the first argument is an + ssa name that is itself a result of a typecast of an ADDR_EXPR to an + integer, feed the ADDR_EXPR to the folder rather than the ssa name. +*/ + +static void +simplify_bitwise_and (gimple_stmt_iterator *gsi, gimple stmt) +{ + tree res; + tree arg1 = gimple_assign_rhs1 (stmt); + tree arg2 = gimple_assign_rhs2 (stmt); + + if (TREE_CODE (arg2) != INTEGER_CST) + return; + + if (TREE_CODE (arg1) == SSA_NAME && !SSA_NAME_IS_DEFAULT_DEF (arg1)) + { + gimple def = SSA_NAME_DEF_STMT (arg1); + + if (gimple_assign_cast_p (def) + && INTEGRAL_TYPE_P (gimple_expr_type (def))) + { + tree op = gimple_assign_rhs1 (def); + + if (TREE_CODE (op) == ADDR_EXPR) + arg1 = op; + } + } + + res = fold_binary (BIT_AND_EXPR, TREE_TYPE (gimple_assign_lhs (stmt)), + arg1, arg2); + if (res && is_gimple_min_invariant (res)) + { + gimple_assign_set_rhs_from_tree (gsi, res); + update_stmt (stmt); + } + return; +} + /* Main entry point for the forward propagation optimizer. */ static unsigned int @@ -1206,6 +1253,11 @@ tree_ssa_forward_propagate_single_use_vars (void) else gsi_next (&gsi); } + else if (gimple_assign_rhs_code (stmt) == BIT_AND_EXPR) + { + simplify_bitwise_and (&gsi, stmt); + gsi_next (&gsi); + } else gsi_next (&gsi); } diff --git a/gcc/tree-ssa-ifcombine.c b/gcc/tree-ssa-ifcombine.c index 335fd068540..08048560cfb 100644 --- a/gcc/tree-ssa-ifcombine.c +++ b/gcc/tree-ssa-ifcombine.c @@ -380,6 +380,43 @@ ifcombine_ifandif (basic_block inner_cond_bb, basic_block outer_cond_bb) return true; } + /* See if we have two comparisons that we can merge into one. */ + else if (TREE_CODE_CLASS (gimple_cond_code (inner_cond)) == tcc_comparison + && TREE_CODE_CLASS (gimple_cond_code (outer_cond)) == tcc_comparison + && operand_equal_p (gimple_cond_lhs (inner_cond), + gimple_cond_lhs (outer_cond), 0) + && operand_equal_p (gimple_cond_rhs (inner_cond), + gimple_cond_rhs (outer_cond), 0)) + { + enum tree_code code1 = gimple_cond_code (inner_cond); + enum tree_code code2 = gimple_cond_code (outer_cond); + tree t; + + if (!(t = combine_comparisons (TRUTH_ANDIF_EXPR, code1, code2, + boolean_type_node, + gimple_cond_lhs (outer_cond), + gimple_cond_rhs (outer_cond)))) + return false; + t = canonicalize_cond_expr_cond (t); + if (!t) + return false; + gimple_cond_set_condition_from_tree (inner_cond, t); + update_stmt (inner_cond); + + /* Leave CFG optimization to cfg_cleanup. */ + gimple_cond_set_condition_from_tree (outer_cond, boolean_true_node); + update_stmt (outer_cond); + + if (dump_file) + { + fprintf (dump_file, "optimizing two comparisons to "); + print_generic_expr (dump_file, t, 0); + fprintf (dump_file, "\n"); + } + + return true; + } + return false; } @@ -502,42 +539,13 @@ ifcombine_iforif (basic_block inner_cond_bb, basic_block outer_cond_bb) { enum tree_code code1 = gimple_cond_code (inner_cond); enum tree_code code2 = gimple_cond_code (outer_cond); - enum tree_code code; tree t; -#define CHK(a,b) ((code1 == a ## _EXPR && code2 == b ## _EXPR) \ - || (code2 == a ## _EXPR && code1 == b ## _EXPR)) - /* Merge the two condition codes if possible. */ - if (code1 == code2) - code = code1; - else if (CHK (EQ, LT)) - code = LE_EXPR; - else if (CHK (EQ, GT)) - code = GE_EXPR; - else if (CHK (LT, LE)) - code = LE_EXPR; - else if (CHK (GT, GE)) - code = GE_EXPR; - else if (INTEGRAL_TYPE_P (TREE_TYPE (gimple_cond_lhs (inner_cond))) - || flag_unsafe_math_optimizations) - { - if (CHK (LT, GT)) - code = NE_EXPR; - else if (CHK (LT, NE)) - code = NE_EXPR; - else if (CHK (GT, NE)) - code = NE_EXPR; - else - return false; - } - /* We could check for combinations leading to trivial true/false. */ - else + if (!(t = combine_comparisons (TRUTH_ORIF_EXPR, code1, code2, + boolean_type_node, + gimple_cond_lhs (outer_cond), + gimple_cond_rhs (outer_cond)))) return false; -#undef CHK - - /* Do it. */ - t = fold_build2 (code, boolean_type_node, gimple_cond_lhs (outer_cond), - gimple_cond_rhs (outer_cond)); t = canonicalize_cond_expr_cond (t); if (!t) return false; diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index 9d931c496e8..9d06a8a3f29 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -3564,46 +3564,28 @@ compute_avail (void) basic_block block, son; basic_block *worklist; size_t sp = 0; - tree param; + unsigned i; - /* For arguments with default definitions, we pretend they are - defined in the entry block. */ - for (param = DECL_ARGUMENTS (current_function_decl); - param; - param = TREE_CHAIN (param)) + /* We pretend that default definitions are defined in the entry block. + This includes function arguments and the static chain decl. */ + for (i = 1; i < num_ssa_names; ++i) { - if (gimple_default_def (cfun, param) != NULL) - { - tree def = gimple_default_def (cfun, param); - pre_expr e = get_or_alloc_expr_for_name (def); - - add_to_value (get_expr_value_id (e), e); - if (!in_fre) - { - bitmap_insert_into_set (TMP_GEN (ENTRY_BLOCK_PTR), e); - bitmap_value_insert_into_set (maximal_set, e); - } - bitmap_value_insert_into_set (AVAIL_OUT (ENTRY_BLOCK_PTR), e); - } - } + tree name = ssa_name (i); + pre_expr e; + if (!name + || !SSA_NAME_IS_DEFAULT_DEF (name) + || has_zero_uses (name) + || !is_gimple_reg (name)) + continue; - /* Likewise for the static chain decl. */ - if (cfun->static_chain_decl) - { - param = cfun->static_chain_decl; - if (gimple_default_def (cfun, param) != NULL) + e = get_or_alloc_expr_for_name (name); + add_to_value (get_expr_value_id (e), e); + if (!in_fre) { - tree def = gimple_default_def (cfun, param); - pre_expr e = get_or_alloc_expr_for_name (def); - - add_to_value (get_expr_value_id (e), e); - if (!in_fre) - { - bitmap_insert_into_set (TMP_GEN (ENTRY_BLOCK_PTR), e); - bitmap_value_insert_into_set (maximal_set, e); - } - bitmap_value_insert_into_set (AVAIL_OUT (ENTRY_BLOCK_PTR), e); + bitmap_insert_into_set (TMP_GEN (ENTRY_BLOCK_PTR), e); + bitmap_value_insert_into_set (maximal_set, e); } + bitmap_value_insert_into_set (AVAIL_OUT (ENTRY_BLOCK_PTR), e); } /* Allocate the worklist. */ @@ -3857,7 +3839,7 @@ eliminate (void) { gimple_stmt_iterator i; - for (i = gsi_start_bb (b); !gsi_end_p (i); gsi_next (&i)) + for (i = gsi_start_bb (b); !gsi_end_p (i);) { gimple stmt = gsi_stmt (i); @@ -3915,6 +3897,7 @@ eliminate (void) propagate_tree_value_into_stmt (&i, sprime); stmt = gsi_stmt (i); update_stmt (stmt); + gsi_next (&i); continue; } @@ -3975,6 +3958,58 @@ eliminate (void) } } } + /* If the statement is a scalar store, see if the expression + has the same value number as its rhs. If so, the store is + dead. */ + else if (gimple_assign_single_p (stmt) + && !is_gimple_reg (gimple_assign_lhs (stmt)) + && (TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME + || is_gimple_min_invariant (gimple_assign_rhs1 (stmt)))) + { + tree rhs = gimple_assign_rhs1 (stmt); + tree val; + val = vn_reference_lookup (gimple_assign_lhs (stmt), + shared_vuses_from_stmt (stmt), + true, NULL); + if (TREE_CODE (rhs) == SSA_NAME) + rhs = VN_INFO (rhs)->valnum; + if (val + && operand_equal_p (val, rhs, 0)) + { + def_operand_p def; + use_operand_p use; + vuse_vec_p usevec; + ssa_op_iter oi; + imm_use_iterator ui; + gimple use_stmt; + + if (dump_file && (dump_flags & TDF_DETAILS)) + { + fprintf (dump_file, "Deleted dead store "); + print_gimple_stmt (dump_file, stmt, 0, 0); + } + + /* Propagate all may-uses to the uses of their defs. */ + FOR_EACH_SSA_VDEF_OPERAND (def, usevec, stmt, oi) + { + tree vuse = VUSE_ELEMENT_VAR (*usevec, 0); + tree vdef = DEF_FROM_PTR (def); + + /* If the vdef is used in an abnormal PHI node we + have to propagate that flag to the vuse as well. */ + if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (vdef)) + SSA_NAME_OCCURS_IN_ABNORMAL_PHI (vuse) = 1; + + FOR_EACH_IMM_USE_STMT (use_stmt, ui, vdef) + FOR_EACH_IMM_USE_ON_STMT (use, ui) + SET_USE (use, vuse); + } + + gsi_remove (&i, true); + release_defs (stmt); + continue; + } + } /* Visit COND_EXPRs and fold the comparison with the available value-numbers. */ else if (gimple_code (stmt) == GIMPLE_COND) @@ -3999,6 +4034,8 @@ eliminate (void) todo = TODO_cleanup_cfg; } } + + gsi_next (&i); } } diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index dc55676c4a3..fb903921656 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -658,6 +658,8 @@ copy_reference_ops_from_ref (tree ref, VEC(vn_reference_op_s, heap) **result) case CONST_DECL: case RESULT_DECL: case SSA_NAME: + case EXC_PTR_EXPR: + case FILTER_EXPR: temp.op0 = ref; break; case ADDR_EXPR: @@ -750,6 +752,8 @@ get_ref_from_reference_ops (VEC(vn_reference_op_s, heap) *ops) case CONST_DECL: case RESULT_DECL: case SSA_NAME: + case FILTER_EXPR: + case EXC_PTR_EXPR: *op0_p = op->op0; break; diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 32e25a2455e..1cb07f5581c 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -5669,23 +5669,20 @@ ipa_pta_execute (void) for (node = cgraph_nodes; node; node = node->next) { - if (!node->analyzed || cgraph_is_master_clone (node)) - { - unsigned int varid; + unsigned int varid; - varid = create_function_info_for (node->decl, - cgraph_node_name (node)); - if (node->local.externally_visible) - { - varinfo_t fi = get_varinfo (varid); - for (; fi; fi = fi->next) - make_constraint_from (fi, anything_id); - } + varid = create_function_info_for (node->decl, + cgraph_node_name (node)); + if (node->local.externally_visible) + { + varinfo_t fi = get_varinfo (varid); + for (; fi; fi = fi->next) + make_constraint_from (fi, anything_id); } } for (node = cgraph_nodes; node; node = node->next) { - if (node->analyzed && cgraph_is_master_clone (node)) + if (node->analyzed) { struct function *func = DECL_STRUCT_FUNCTION (node->decl); basic_block bb; diff --git a/gcc/tree-vect-analyze.c b/gcc/tree-vect-analyze.c index 0b947143c68..eb5166bac92 100644 --- a/gcc/tree-vect-analyze.c +++ b/gcc/tree-vect-analyze.c @@ -1504,7 +1504,7 @@ vect_compute_data_ref_alignment (struct data_reference *dr) && DECL_ALIGN (base) >= TYPE_ALIGN (vectype))); /* Modulo alignment. */ - misalign = size_binop (TRUNC_MOD_EXPR, misalign, alignment); + misalign = size_binop (FLOOR_MOD_EXPR, misalign, alignment); if (!host_integerp (misalign, 1)) { diff --git a/gcc/tree.h b/gcc/tree.h index 51fd7ec0c71..9ff30a39e2d 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4853,6 +4853,8 @@ extern bool tree_call_nonnegative_warnv_p (tree, tree, tree, tree, bool *); extern bool tree_expr_nonzero_warnv_p (tree, bool *); extern bool fold_real_zero_addition_p (const_tree, const_tree, int); +extern tree combine_comparisons (enum tree_code, enum tree_code, + enum tree_code, tree, tree, tree); /* Return nonzero if CODE is a tree code that represents a truth value. */ static inline bool diff --git a/gcc/tsystem.h b/gcc/tsystem.h index cbd21dc1ed8..d1ccaaa238c 100644 --- a/gcc/tsystem.h +++ b/gcc/tsystem.h @@ -1,6 +1,6 @@ /* Get common system includes and various definitions and declarations based on target macros. - Copyright (C) 2000, 2001, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2004, 2005, 2009 Free Software Foundation, Inc. This file is part of GCC. @@ -99,7 +99,7 @@ extern void *memset (void *, int, size_t); extern int errno; #endif -/* GCC (fixproto) guarantees these system headers exist. */ +/* If these system headers do not exist, fixincludes must create them. */ #include <string.h> #include <stdlib.h> #include <unistd.h> @@ -107,7 +107,7 @@ extern int errno; /* GCC supplies this header. */ #include <limits.h> -/* GCC (fixproto) guarantees this system headers exists. */ +/* If these system headers do not exist, fixincludes must create them. */ #include <time.h> #endif /* inhibit_libc */ diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index acffe8e39e0..61d5b975404 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,8 @@ +2009-03-28 Joseph Myers <joseph@codesourcery.com> + + * Makefile.in (po/$(PACKAGE).pot): Use $(mkinstalldirs) not + mkinstalldirs. + 2009-03-18 Jakub Jelinek <jakub@redhat.com> * include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts. diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in index 2d82ebdd8b3..5815f73775b 100644 --- a/libcpp/Makefile.in +++ b/libcpp/Makefile.in @@ -236,7 +236,7 @@ endif # Rule for regenerating the message template. $(PACKAGE).pot: po/$(PACKAGE).pot po/$(PACKAGE).pot: $(libcpp_a_SOURCES) - mkinstalldirs $(srcdir)/po + $(mkinstalldirs) $(srcdir)/po $(XGETTEXT) --default-domain=$(PACKAGE) \ --keyword=_ --keyword=N_ \ --keyword=cpp_error:3 --keyword=cpp_errno:3 \ diff --git a/libcpp/po/ChangeLog b/libcpp/po/ChangeLog index 55a2ed12f50..f953ffbb54b 100644 --- a/libcpp/po/ChangeLog +++ b/libcpp/po/ChangeLog @@ -1,3 +1,7 @@ +2009-03-28 Joseph Myers <joseph@codesourcery.com> + + * cpplib.pot: Regenerate. + 2009-03-04 Joseph Myers <joseph@codesourcery.com> * es.po: Update. diff --git a/libcpp/po/cpplib.pot b/libcpp/po/cpplib.pot index c4ae3af86c0..62c28846e4c 100644 --- a/libcpp/po/cpplib.pot +++ b/libcpp/po/cpplib.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n" -"POT-Creation-Date: 2008-11-18 20:02+0000\n" +"POT-Creation-Date: 2009-03-28 06:55+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -398,7 +398,7 @@ msgid "unterminated #%s" msgstr "" #: directives-only.c:222 -#: lex.c:1138 +#: lex.c:1148 #: traditional.c:162 msgid "unterminated comment" msgstr "" @@ -748,28 +748,28 @@ msgstr "" msgid "__VA_ARGS__ can only appear in the expansion of a C99 variadic macro" msgstr "" -#: lex.c:664 +#: lex.c:674 msgid "null character(s) preserved in literal" msgstr "" -#: lex.c:667 +#: lex.c:677 #, c-format msgid "missing terminating %c character" msgstr "" -#: lex.c:1149 +#: lex.c:1159 msgid "C++ style comments are not allowed in ISO C90" msgstr "" -#: lex.c:1151 +#: lex.c:1161 msgid "(this will be reported only once per input file)" msgstr "" -#: lex.c:1156 +#: lex.c:1166 msgid "multi-line comment" msgstr "" -#: lex.c:1469 +#: lex.c:1480 #, c-format msgid "unspellable token %s" msgstr "" @@ -924,28 +924,33 @@ msgstr "" msgid "while writing precompiled header" msgstr "" -#: pch.c:485 +#: pch.c:484 +#, c-format +msgid "%s: not used because `%.*s' is poisoned" +msgstr "" + +#: pch.c:506 #, c-format msgid "%s: not used because `%.*s' not defined" msgstr "" -#: pch.c:497 +#: pch.c:518 #, c-format msgid "%s: not used because `%.*s' defined as `%s' not `%.*s'" msgstr "" -#: pch.c:538 +#: pch.c:559 #, c-format msgid "%s: not used because `%s' is defined" msgstr "" -#: pch.c:558 +#: pch.c:579 #, c-format msgid "%s: not used because `__COUNTER__' is invalid" msgstr "" -#: pch.c:567 -#: pch.c:737 +#: pch.c:588 +#: pch.c:758 msgid "while reading precompiled header" msgstr "" diff --git a/libdecnumber/ChangeLog b/libdecnumber/ChangeLog index 21943b9e9ae..d49bfb5a7d5 100644 --- a/libdecnumber/ChangeLog +++ b/libdecnumber/ChangeLog @@ -1,3 +1,12 @@ +2009-03-29 Ben Elliston <bje@au.ibm.com> + + * decNumber.c, decNumber.h, decNumberLocal.h, decDouble.c, + decDouble.h, decSingle.c, decContext.c, decSingle.h, decPacked.c, + decCommon.c, decContext.h, decQuad.c, decPacked.h, decQuad.h, + decDPD.h, decBasic.c: Upgrade to decNumber 3.61. + * dpd/decimal128.h, dpd/decimal32.c, dpd/decimal32.h, + dpd/decimal64.c, dpd/decimal128.c, dpd/decimal64.h: Likewise. + 2009-02-10 Joseph Myers <joseph@codesourcery.com> * Makefile.in (clean): Don't remove makedepend$(EXEEXT). diff --git a/libdecnumber/decBasic.c b/libdecnumber/decBasic.c index fddba979053..06aa8bae320 100644 --- a/libdecnumber/decBasic.c +++ b/libdecnumber/decBasic.c @@ -32,8 +32,8 @@ /* decBasic.c -- common base code for Basic decimal types */ /* ------------------------------------------------------------------ */ /* This module comprises code that is shared between decDouble and */ -/* decQuad (but not decSingle). The main arithmetic operations are */ -/* here (Add, Subtract, Multiply, FMA, and Division operators). */ +/* decQuad (but not decSingle). The main arithmetic operations are */ +/* here (Add, Subtract, Multiply, FMA, and Division operators). */ /* */ /* Unlike decNumber, parameterization takes place at compile time */ /* rather than at runtime. The parameters are set in the decDouble.c */ @@ -59,7 +59,7 @@ #define DIVIDE 0x80000000 /* Divide operations [as flags] */ #define REMAINDER 0x40000000 /* .. */ #define DIVIDEINT 0x20000000 /* .. */ -#define REMNEAR 0x10000000 /* .. */ +#define REMNEAR 0x10000000 /* .. */ /* Private functions (local, used only by routines in this module) */ static decFloat *decDivide(decFloat *, const decFloat *, @@ -81,7 +81,7 @@ static uInt decToInt32(const decFloat *, decContext *, enum rounding, /* decCanonical -- copy a decFloat, making canonical */ /* */ /* result gets the canonicalized df */ -/* df is the decFloat to copy and make canonical */ +/* df is the decFloat to copy and make canonical */ /* returns result */ /* */ /* This is exposed via decFloatCanonical for Double and Quad only. */ @@ -141,14 +141,14 @@ static decFloat * decCanonical(decFloat *result, const decFloat *df) { uoff-=32; dpd|=encode<<(10-uoff); /* get pending bits */ } - dpd&=0x3ff; /* clear uninteresting bits */ + dpd&=0x3ff; /* clear uninteresting bits */ if (dpd<0x16e) continue; /* must be canonical */ canon=BIN2DPD[DPD2BIN[dpd]]; /* determine canonical declet */ if (canon==dpd) continue; /* have canonical declet */ /* need to replace declet */ if (uoff>=10) { /* all within current word */ encode&=~(0x3ff<<(uoff-10)); /* clear the 10 bits ready for replace */ - encode|=canon<<(uoff-10); /* insert the canonical form */ + encode|=canon<<(uoff-10); /* insert the canonical form */ DFWORD(result, inword)=encode; /* .. and save */ continue; } @@ -167,16 +167,16 @@ static decFloat * decCanonical(decFloat *result, const decFloat *df) { /* decDivide -- divide operations */ /* */ /* result gets the result of dividing dfl by dfr: */ -/* dfl is the first decFloat (lhs) */ +/* dfl is the first decFloat (lhs) */ /* dfr is the second decFloat (rhs) */ /* set is the context */ -/* op is the operation selector */ +/* op is the operation selector */ /* returns result */ /* */ /* op is one of DIVIDE, REMAINDER, DIVIDEINT, or REMNEAR. */ /* ------------------------------------------------------------------ */ #define DIVCOUNT 0 /* 1 to instrument subtractions counter */ -#define DIVBASE BILLION /* the base used for divide */ +#define DIVBASE ((uInt)BILLION) /* the base used for divide */ #define DIVOPLEN DECPMAX9 /* operand length ('digits' base 10**9) */ #define DIVACCLEN (DIVOPLEN*3) /* accumulator length (ditto) */ static decFloat * decDivide(decFloat *result, const decFloat *dfl, @@ -184,17 +184,18 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl, decFloat quotient; /* for remainders */ bcdnum num; /* for final conversion */ uInt acc[DIVACCLEN]; /* coefficent in base-billion .. */ - uInt div[DIVOPLEN]; /* divisor in base-billion .. */ + uInt div[DIVOPLEN]; /* divisor in base-billion .. */ uInt quo[DIVOPLEN+1]; /* quotient in base-billion .. */ - uByte bcdacc[(DIVOPLEN+1)*9+2]; /* for quotient in BCD, +1, +1 */ + uByte bcdacc[(DIVOPLEN+1)*9+2]; /* for quotient in BCD, +1, +1 */ uInt *msua, *msud, *msuq; /* -> msu of acc, div, and quo */ Int divunits, accunits; /* lengths */ Int quodigits; /* digits in quotient */ uInt *lsua, *lsuq; /* -> current acc and quo lsus */ Int length, multiplier; /* work */ uInt carry, sign; /* .. */ - uInt *ua, *ud, *uq; /* .. */ - uByte *ub; /* .. */ + uInt *ua, *ud, *uq; /* .. */ + uByte *ub; /* .. */ + uInt uiwork; /* for macros */ uInt divtop; /* top unit of div adjusted for estimating */ #if DIVCOUNT static uInt maxcount=0; /* worst-seen subtractions count */ @@ -235,7 +236,7 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl, if (op&(REMAINDER|REMNEAR)) return decInvalid(result, set); /* bad rem */ set->status|=DEC_Division_by_zero; DFWORD(result, 0)=num.sign; - return decInfinity(result, result); /* x/0 -> signed Infinity */ + return decInfinity(result, result); /* x/0 -> signed Infinity */ } num.exponent=GETEXPUN(dfl)-GETEXPUN(dfr); /* ideal exponent */ if (DFISZERO(dfl)) { /* 0/x (x!=0) */ @@ -246,7 +247,7 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl, DFWORD(result, 0)|=num.sign; /* add sign */ return result; } - if (!(op&DIVIDE)) { /* a remainder */ + if (!(op&DIVIDE)) { /* a remainder */ /* exponent is the minimum of the operands */ num.exponent=MINI(GETEXPUN(dfl), GETEXPUN(dfr)); /* if the result is zero the sign shall be sign of dfl */ @@ -289,7 +290,7 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl, #endif /* set msu and lsu pointers */ - msua=acc+DIVACCLEN-1; /* [leading zeros removed below] */ + msua=acc+DIVACCLEN-1; /* [leading zeros removed below] */ msuq=quo+DIVOPLEN; /*[loop for div will terminate because operands are non-zero] */ for (msud=div+DIVOPLEN-1; *msud==0;) msud--; @@ -298,7 +299,7 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl, /* This moves one position towards the least possible for each */ /* iteration */ divunits=(Int)(msud-div+1); /* precalculate */ - lsua=msua-divunits+1; /* initial working lsu of acc */ + lsua=msua-divunits+1; /* initial working lsu of acc */ lsuq=msuq; /* and of quo */ /* set up the estimator for the multiplier; this is the msu of div, */ @@ -371,7 +372,7 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl, for (ud=msud, ua=msua; ud>div; ud--, ua--) if (*ud!=*ua) break; /* [now at first mismatch or lsu] */ if (*ud>*ua) break; /* next time... */ - if (*ud==*ua) { /* all compared equal */ + if (*ud==*ua) { /* all compared equal */ *lsuq+=1; /* increment result */ msua=lsua; /* collapse acc units */ *msua=0; /* .. to a zero */ @@ -418,10 +419,11 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl, } else if (divunits==1) { mul=(uLong)*msua * DIVBASE + *(msua-1); - mul/=*msud; /* no more to the right */ + mul/=*msud; /* no more to the right */ } else { - mul=(uLong)(*msua) * (uInt)(DIVBASE<<2) + (*(msua-1)<<2); + mul=(uLong)(*msua) * (uInt)(DIVBASE<<2) + + (*(msua-1)<<2); mul/=divtop; /* [divtop already allows for sticky bits] */ } multiplier=(Int)mul; @@ -540,10 +542,10 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl, /* most significant end [offset by one into bcdacc to leave room */ /* for a possible carry digit if rounding for REMNEAR is needed] */ for (uq=msuq, ub=bcdacc+1; uq>=lsuq; uq--, ub+=9) { - uInt top, mid, rem; /* work */ + uInt top, mid, rem; /* work */ if (*uq==0) { /* no split needed */ - UINTAT(ub)=0; /* clear 9 BCD8s */ - UINTAT(ub+4)=0; /* .. */ + UBFROMUI(ub, 0); /* clear 9 BCD8s */ + UBFROMUI(ub+4, 0); /* .. */ *(ub+8)=0; /* .. */ continue; } @@ -558,11 +560,11 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl, mid=rem/divsplit6; rem=rem%divsplit6; /* lay out the nine BCD digits (plus one unwanted byte) */ - UINTAT(ub) =UINTAT(&BIN2BCD8[top*4]); - UINTAT(ub+3)=UINTAT(&BIN2BCD8[mid*4]); - UINTAT(ub+6)=UINTAT(&BIN2BCD8[rem*4]); + UBFROMUI(ub, UBTOUI(&BIN2BCD8[top*4])); + UBFROMUI(ub+3, UBTOUI(&BIN2BCD8[mid*4])); + UBFROMUI(ub+6, UBTOUI(&BIN2BCD8[rem*4])); } /* BCD conversion loop */ - ub--; /* -> lsu */ + ub--; /* -> lsu */ /* complete the bcdnum; quodigits is correct, so the position of */ /* the first non-zero is known */ @@ -642,7 +644,7 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl, num.msd--; /* use the 0 .. */ num.lsd=num.msd; /* .. at the new MSD place */ } - if (reround!=0) { /* discarding non-zero */ + if (reround!=0) { /* discarding non-zero */ uInt bump=0; /* rounding is DEC_ROUND_HALF_EVEN always */ if (reround>5) bump=1; /* >0.5 goes up */ @@ -651,7 +653,7 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl, if (bump!=0) { /* need increment */ /* increment the coefficient; this might end up with 1000... */ ub=num.lsd; - for (; UINTAT(ub-3)==0x09090909; ub-=4) UINTAT(ub-3)=0; + for (; UBTOUI(ub-3)==0x09090909; ub-=4) UBFROMUI(ub-3, 0); for (; *ub==9; ub--) *ub=0; /* at most 3 more */ *ub+=1; if (ub<num.msd) num.msd--; /* carried */ @@ -680,7 +682,7 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl, /* */ /* num gets the result of multiplying dfl and dfr */ /* bcdacc .. with the coefficient in this array */ -/* dfl is the first decFloat (lhs) */ +/* dfl is the first decFloat (lhs) */ /* dfr is the second decFloat (rhs) */ /* */ /* This effects the multiplication of two decFloats, both known to be */ @@ -695,7 +697,7 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl, /* variables (Ints and uInts) or smaller; the other uses uLongs (for */ /* multiplication and addition only). Both implementations cover */ /* both arithmetic sizes (DOUBLE and QUAD) in order to allow timing */ -/* comparisons. In any one compilation only one implementation for */ +/* comparisons. In any one compilation only one implementation for */ /* each size can be used, and if DECUSE64 is 0 then use of the 32-bit */ /* version is forced. */ /* */ @@ -704,7 +706,7 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl, /* during lazy carry splitting because the initial quotient estimate */ /* (est) can exceed 32 bits. */ -#define MULTBASE BILLION /* the base used for multiply */ +#define MULTBASE ((uInt)BILLION) /* the base used for multiply */ #define MULOPLEN DECPMAX9 /* operand length ('digits' base 10**9) */ #define MULACCLEN (MULOPLEN*2) /* accumulator length (ditto) */ #define LEADZEROS (MULACCLEN*9 - DECPMAX*2) /* leading zeros always */ @@ -723,11 +725,12 @@ static void decFiniteMultiply(bcdnum *num, uByte *bcdacc, uInt bufl[MULOPLEN]; /* left coefficient (base-billion) */ uInt bufr[MULOPLEN]; /* right coefficient (base-billion) */ uInt *ui, *uj; /* work */ - uByte *ub; /* .. */ + uByte *ub; /* .. */ + uInt uiwork; /* for macros */ #if DECUSE64 - uLong accl[MULACCLEN]; /* lazy accumulator (base-billion+) */ - uLong *pl; /* work -> lazy accumulator */ + uLong accl[MULACCLEN]; /* lazy accumulator (base-billion+) */ + uLong *pl; /* work -> lazy accumulator */ uInt acc[MULACCLEN]; /* coefficent in base-billion .. */ #else uInt acc[MULACCLEN*2]; /* accumulator in base-billion .. */ @@ -760,7 +763,7 @@ static void decFiniteMultiply(bcdnum *num, uByte *bcdacc, /* zero the accumulator */ #if MULACCLEN==4 accl[0]=0; accl[1]=0; accl[2]=0; accl[3]=0; - #else /* use a loop */ + #else /* use a loop */ /* MULACCLEN is a multiple of four, asserted above */ for (pl=accl; pl<accl+MULACCLEN; pl+=4) { *pl=0; *(pl+1)=0; *(pl+2)=0; *(pl+3)=0;/* [reduce overhead] */ @@ -812,8 +815,8 @@ static void decFiniteMultiply(bcdnum *num, uByte *bcdacc, /* */ /* Type OPLEN A B maxX maxError maxCorrection */ /* --------------------------------------------------------- */ - /* DOUBLE 2 29 32 <2*10**18 0.63 1 */ - /* QUAD 4 30 31 <4*10**18 1.17 2 */ + /* DOUBLE 2 29 32 <2*10**18 0.63 1 */ + /* QUAD 4 30 31 <4*10**18 1.17 2 */ /* */ /* In the OPLEN==2 case there is most choice, but the value for B */ /* of 32 has a big advantage as then the calculation of the */ @@ -840,7 +843,7 @@ static void decFiniteMultiply(bcdnum *num, uByte *bcdacc, for (pl=accl, pa=acc; pl<accl+MULACCLEN; pl++, pa++) { /* each column position */ uInt lo, hop; /* work */ uInt est; /* cannot exceed 4E+9 */ - if (*pl>MULTBASE) { + if (*pl>=MULTBASE) { /* *pl holds a binary number which needs to be split */ hop=(uInt)(*pl>>MULSHIFTA); est=(uInt)(((uLong)hop*MULMAGIC)>>MULSHIFTB); @@ -905,7 +908,7 @@ static void decFiniteMultiply(bcdnum *num, uByte *bcdacc, /* quotient/remainder has to be calculated for base-billion (1E+9). */ /* For this, Clark & Cowlishaw's quotient estimation approach (also */ /* used in decNumber) is needed, because 64-bit divide is generally */ - /* extremely slow on 32-bit machines. This algorithm splits X */ + /* extremely slow on 32-bit machines. This algorithm splits X */ /* using: */ /* */ /* magic=2**(A+B)/1E+9; // 'magic number' */ @@ -927,8 +930,8 @@ static void decFiniteMultiply(bcdnum *num, uByte *bcdacc, /* */ /* Type OPLEN A B maxX maxError maxCorrection */ /* --------------------------------------------------------- */ - /* DOUBLE 2 29 32 <2*10**18 0.63 1 */ - /* QUAD 4 30 31 <4*10**18 1.17 2 */ + /* DOUBLE 2 29 32 <2*10**18 0.63 1 */ + /* QUAD 4 30 31 <4*10**18 1.17 2 */ /* */ /* In the OPLEN==2 case there is most choice, but the value for B */ /* of 32 has a big advantage as then the calculation of the */ @@ -952,15 +955,15 @@ static void decFiniteMultiply(bcdnum *num, uByte *bcdacc, printf("\n"); #endif - for (pa=acc;; pa++) { /* each low uInt */ + for (pa=acc;; pa++) { /* each low uInt */ uInt hi, lo; /* words of exact multiply result */ uInt hop, estlo; /* work */ #if QUAD - uInt esthi; /* .. */ + uInt esthi; /* .. */ #endif lo=*pa; - hi=*(pa+MULACCLEN); /* top 32 bits */ + hi=*(pa+MULACCLEN); /* top 32 bits */ /* hi and lo now hold a binary number which needs to be split */ #if DOUBLE @@ -1032,7 +1035,7 @@ static void decFiniteMultiply(bcdnum *num, uByte *bcdacc, uInt top, mid, rem; /* work */ /* *pa is non-zero -- split the base-billion acc digit into */ /* hi, mid, and low three-digits */ - #define mulsplit9 1000000 /* divisor */ + #define mulsplit9 1000000 /* divisor */ #define mulsplit6 1000 /* divisor */ /* The splitting is done by simple divides and remainders, */ /* assuming the compiler will optimize these where useful */ @@ -1042,13 +1045,13 @@ static void decFiniteMultiply(bcdnum *num, uByte *bcdacc, mid=rem/mulsplit6; rem=rem%mulsplit6; /* lay out the nine BCD digits (plus one unwanted byte) */ - UINTAT(ub) =UINTAT(&BIN2BCD8[top*4]); - UINTAT(ub+3)=UINTAT(&BIN2BCD8[mid*4]); - UINTAT(ub+6)=UINTAT(&BIN2BCD8[rem*4]); + UBFROMUI(ub, UBTOUI(&BIN2BCD8[top*4])); + UBFROMUI(ub+3, UBTOUI(&BIN2BCD8[mid*4])); + UBFROMUI(ub+6, UBTOUI(&BIN2BCD8[rem*4])); } else { /* *pa==0 */ - UINTAT(ub)=0; /* clear 9 BCD8s */ - UINTAT(ub+4)=0; /* .. */ + UBFROMUI(ub, 0); /* clear 9 BCD8s */ + UBFROMUI(ub+4, 0); /* .. */ *(ub+8)=0; /* .. */ } if (pa==acc) break; @@ -1068,7 +1071,7 @@ static void decFiniteMultiply(bcdnum *num, uByte *bcdacc, /* decFloatAbs -- absolute value, heeding NaNs, etc. */ /* */ /* result gets the canonicalized df with sign 0 */ -/* df is the decFloat to abs */ +/* df is the decFloat to abs */ /* set is the context */ /* returns result */ /* */ @@ -1090,26 +1093,45 @@ decFloat * decFloatAbs(decFloat *result, const decFloat *df, /* decFloatAdd -- add two decFloats */ /* */ /* result gets the result of adding dfl and dfr: */ -/* dfl is the first decFloat (lhs) */ +/* dfl is the first decFloat (lhs) */ /* dfr is the second decFloat (rhs) */ /* set is the context */ /* returns result */ /* */ /* ------------------------------------------------------------------ */ +#if QUAD +/* Table for testing MSDs for fastpath elimination; returns the MSD of */ +/* a decDouble or decQuad (top 6 bits tested) ignoring the sign. */ +/* Infinities return -32 and NaNs return -128 so that summing the two */ +/* MSDs also allows rapid tests for the Specials (see code below). */ +const Int DECTESTMSD[64]={ + 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 9, 8, 9, -32, -128, + 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 9, 8, 9, -32, -128}; +#else +/* The table for testing MSDs is shared between the modules */ +extern const Int DECTESTMSD[64]; +#endif + decFloat * decFloatAdd(decFloat *result, const decFloat *dfl, const decFloat *dfr, decContext *set) { bcdnum num; /* for final conversion */ - Int expl, expr; /* left and right exponents */ - uInt *ui, *uj; /* work */ - uByte *ub; /* .. */ + Int bexpl, bexpr; /* left and right biased exponents */ + uByte *ub, *us, *ut; /* work */ + uInt uiwork; /* for macros */ + #if QUAD + uShort uswork; /* .. */ + #endif uInt sourhil, sourhir; /* top words from source decFloats */ - /* [valid only until specials */ - /* handled or exponents decoded] */ + /* [valid only through end of */ + /* fastpath code -- before swap] */ uInt diffsign; /* non-zero if signs differ */ uInt carry; /* carry: 0 or 1 before add loop */ - Int overlap; /* coefficient overlap (if full) */ + Int overlap; /* coefficient overlap (if full) */ + Int summ; /* sum of the MSDs */ /* the following buffers hold coefficients with various alignments */ /* (see commentary and diagrams below) */ uByte acc[4+2+DECPMAX*3+8]; @@ -1117,48 +1139,116 @@ decFloat * decFloatAdd(decFloat *result, uByte *umsd, *ulsd; /* local MSD and LSD pointers */ #if DECLITEND - #define CARRYPAT 0x01000000 /* carry=1 pattern */ + #define CARRYPAT 0x01000000 /* carry=1 pattern */ #else - #define CARRYPAT 0x00000001 /* carry=1 pattern */ + #define CARRYPAT 0x00000001 /* carry=1 pattern */ #endif /* Start decoding the arguments */ - /* the initial exponents are placed into the opposite Ints to */ + /* The initial exponents are placed into the opposite Ints to */ /* that which might be expected; there are two sets of data to */ /* keep track of (each decFloat and the corresponding exponent), */ /* and this scheme means that at the swap point (after comparing */ /* exponents) only one pair of words needs to be swapped */ - /* whichever path is taken (thereby minimising worst-case path) */ + /* whichever path is taken (thereby minimising worst-case path). */ + /* The calculated exponents will be nonsense when the arguments are */ + /* Special, but are not used in that path */ sourhil=DFWORD(dfl, 0); /* LHS top word */ - expr=DECCOMBEXP[sourhil>>26]; /* get exponent high bits (in place) */ + summ=DECTESTMSD[sourhil>>26]; /* get first MSD for testing */ + bexpr=DECCOMBEXP[sourhil>>26]; /* get exponent high bits (in place) */ + bexpr+=GETECON(dfl); /* .. + continuation */ + sourhir=DFWORD(dfr, 0); /* RHS top word */ - expl=DECCOMBEXP[sourhir>>26]; + summ+=DECTESTMSD[sourhir>>26]; /* sum MSDs for testing */ + bexpl=DECCOMBEXP[sourhir>>26]; + bexpl+=GETECON(dfr); + + /* here bexpr has biased exponent from lhs, and vice versa */ diffsign=(sourhil^sourhir)&DECFLOAT_Sign; - if (EXPISSPECIAL(expl | expr)) { /* either is special? */ - if (DFISNAN(dfl) || DFISNAN(dfr)) return decNaNs(result, dfl, dfr, set); - /* one or two infinities */ - /* two infinities with different signs is invalid */ - if (diffsign && DFISINF(dfl) && DFISINF(dfr)) - return decInvalid(result, set); - if (DFISINF(dfl)) return decInfinity(result, dfl); /* LHS is infinite */ - return decInfinity(result, dfr); /* RHS must be Infinite */ - } + /* now determine whether to take a fast path or the full-function */ + /* slow path. The slow path must be taken when: */ + /* -- both numbers are finite, and: */ + /* the exponents are different, or */ + /* the signs are different, or */ + /* the sum of the MSDs is >8 (hence might overflow) */ + /* specialness and the sum of the MSDs can be tested at once using */ + /* the summ value just calculated, so the test for specials is no */ + /* longer on the worst-case path (as of 3.60) */ + + if (summ<=8) { /* MSD+MSD is good, or there is a special */ + if (summ<0) { /* there is a special */ + /* Inf+Inf would give -64; Inf+finite is -32 or higher */ + if (summ<-64) return decNaNs(result, dfl, dfr, set); /* one or two NaNs */ + /* two infinities with different signs is invalid */ + if (summ==-64 && diffsign) return decInvalid(result, set); + if (DFISINF(dfl)) return decInfinity(result, dfl); /* LHS is infinite */ + return decInfinity(result, dfr); /* RHS must be Inf */ + } + /* Here when both arguments are finite; fast path is possible */ + /* (currently only for aligned and same-sign) */ + if (bexpr==bexpl && !diffsign) { + uInt tac[DECLETS+1]; /* base-1000 coefficient */ + uInt encode; /* work */ + + /* Get one coefficient as base-1000 and add the other */ + GETCOEFFTHOU(dfl, tac); /* least-significant goes to [0] */ + ADDCOEFFTHOU(dfr, tac); + /* here the sum of the MSDs (plus any carry) will be <10 due to */ + /* the fastpath test earlier */ + + /* construct the result; low word is the same for both formats */ + encode =BIN2DPD[tac[0]]; + encode|=BIN2DPD[tac[1]]<<10; + encode|=BIN2DPD[tac[2]]<<20; + encode|=BIN2DPD[tac[3]]<<30; + DFWORD(result, (DECBYTES/4)-1)=encode; + + /* collect next two declets (all that remains, for Double) */ + encode =BIN2DPD[tac[3]]>>2; + encode|=BIN2DPD[tac[4]]<<8; - /* Here when both arguments are finite */ + #if QUAD + /* complete and lay out middling words */ + encode|=BIN2DPD[tac[5]]<<18; + encode|=BIN2DPD[tac[6]]<<28; + DFWORD(result, 2)=encode; + + encode =BIN2DPD[tac[6]]>>4; + encode|=BIN2DPD[tac[7]]<<6; + encode|=BIN2DPD[tac[8]]<<16; + encode|=BIN2DPD[tac[9]]<<26; + DFWORD(result, 1)=encode; + + /* and final two declets */ + encode =BIN2DPD[tac[9]]>>6; + encode|=BIN2DPD[tac[10]]<<4; + #endif - /* complete exponent gathering (keeping swapped) */ - expr+=GETECON(dfl)-DECBIAS; /* .. + continuation and unbias */ - expl+=GETECON(dfr)-DECBIAS; - /* here expr has exponent from lhs, and vice versa */ + /* add exponent continuation and sign (from either argument) */ + encode|=sourhil & (ECONMASK | DECFLOAT_Sign); + + /* create lookup index = MSD + top two bits of biased exponent <<4 */ + tac[DECLETS]|=(bexpl>>DECECONL)<<4; + encode|=DECCOMBFROM[tac[DECLETS]]; /* add constructed combination field */ + DFWORD(result, 0)=encode; /* complete */ + + /* decFloatShow(result, ">"); */ + return result; + } /* fast path OK */ + /* drop through to slow path */ + } /* low sum or Special(s) */ + + /* Slow path required -- arguments are finite and might overflow, */ + /* or require alignment, or might have different signs */ /* now swap either exponents or argument pointers */ - if (expl<=expr) { + if (bexpl<=bexpr) { /* original left is bigger */ - Int expswap=expl; - expl=expr; - expr=expswap; + Int bexpswap=bexpl; + bexpl=bexpr; + bexpr=bexpswap; /* printf("left bigger\n"); */ } else { @@ -1167,7 +1257,7 @@ decFloat * decFloatAdd(decFloat *result, dfr=dfswap; /* printf("right bigger\n"); */ } - /* [here dfl and expl refer to the datum with the larger exponent, */ + /* [here dfl and bexpl refer to the datum with the larger exponent, */ /* of if the exponents are equal then the original LHS argument] */ /* if lhs is zero then result will be the rhs (now known to have */ @@ -1209,19 +1299,19 @@ decFloat * decFloatAdd(decFloat *result, #if DOUBLE #define COFF 4 /* offset into acc */ #elif QUAD - USHORTAT(acc+4)=0; /* prefix 00 */ + UBFROMUS(acc+4, 0); /* prefix 00 */ #define COFF 6 /* offset into acc */ #endif GETCOEFF(dfl, acc+COFF); /* decode from decFloat */ ulsd=acc+COFF+DECPMAX-1; umsd=acc+4; /* [having this here avoids */ - /* weird GCC optimizer failure] */ + #if DECTRACE {bcdnum tum; tum.msd=umsd; tum.lsd=ulsd; - tum.exponent=expl; + tum.exponent=bexpl-DECBIAS; tum.sign=DFWORD(dfl, 0) & DECFLOAT_Sign; decShowNum(&tum, "dflx");} #endif @@ -1235,16 +1325,16 @@ decFloat * decFloatAdd(decFloat *result, carry=0; /* assume no carry */ if (diffsign) { carry=CARRYPAT; /* for +1 during add */ - UINTAT(acc+ 4)=0x09090909-UINTAT(acc+ 4); - UINTAT(acc+ 8)=0x09090909-UINTAT(acc+ 8); - UINTAT(acc+12)=0x09090909-UINTAT(acc+12); - UINTAT(acc+16)=0x09090909-UINTAT(acc+16); + UBFROMUI(acc+ 4, 0x09090909-UBTOUI(acc+ 4)); + UBFROMUI(acc+ 8, 0x09090909-UBTOUI(acc+ 8)); + UBFROMUI(acc+12, 0x09090909-UBTOUI(acc+12)); + UBFROMUI(acc+16, 0x09090909-UBTOUI(acc+16)); #if QUAD - UINTAT(acc+20)=0x09090909-UINTAT(acc+20); - UINTAT(acc+24)=0x09090909-UINTAT(acc+24); - UINTAT(acc+28)=0x09090909-UINTAT(acc+28); - UINTAT(acc+32)=0x09090909-UINTAT(acc+32); - UINTAT(acc+36)=0x09090909-UINTAT(acc+36); + UBFROMUI(acc+20, 0x09090909-UBTOUI(acc+20)); + UBFROMUI(acc+24, 0x09090909-UBTOUI(acc+24)); + UBFROMUI(acc+28, 0x09090909-UBTOUI(acc+28)); + UBFROMUI(acc+32, 0x09090909-UBTOUI(acc+32)); + UBFROMUI(acc+36, 0x09090909-UBTOUI(acc+36)); #endif } /* diffsign */ @@ -1252,9 +1342,9 @@ decFloat * decFloatAdd(decFloat *result, /* it can be put straight into acc (with an appropriate gap, if */ /* needed) because no actual addition will be needed (except */ /* possibly to complete ten's complement) */ - overlap=DECPMAX-(expl-expr); + overlap=DECPMAX-(bexpl-bexpr); #if DECTRACE - printf("exps: %ld %ld\n", (LI)expl, (LI)expr); + printf("exps: %ld %ld\n", (LI)(bexpl-DECBIAS), (LI)(bexpr-DECBIAS)); printf("Overlap=%ld carry=%08lx\n", (LI)overlap, (LI)carry); #endif @@ -1274,13 +1364,13 @@ decFloat * decFloatAdd(decFloat *result, /* safe because the lhs is non-zero]. */ gap=-overlap; if (gap>DECPMAX) { - expr+=gap-1; + bexpr+=gap-1; gap=DECPMAX; } ub=ulsd+gap+1; /* where MSD will go */ /* Fill the gap with 0s; note that there is no addition to do */ - ui=&UINTAT(acc+COFF+DECPMAX); /* start of gap */ - for (; ui<&UINTAT(ub); ui++) *ui=0; /* mind the gap */ + ut=acc+COFF+DECPMAX; /* start of gap */ + for (; ut<ub; ut+=4) UBFROMUI(ut, 0); /* mind the gap */ if (overlap<-DECPMAX) { /* gap was > DECPMAX */ *ub=(uByte)(!DFISZERO(dfr)); /* make sticky digit */ } @@ -1294,63 +1384,74 @@ decFloat * decFloatAdd(decFloat *result, else { /* overlap>0 */ /* coefficients overlap (perhaps completely, although also */ /* perhaps only where zeros) */ - ub=buf+COFF+DECPMAX-overlap; /* where MSD will go */ - /* Fill the prefix gap with 0s; 8 will cover most common */ - /* unalignments, so start with direct assignments (a loop is */ - /* then used for any remaining -- the loop (and the one in a */ - /* moment) is not then on the critical path because the number */ - /* of additions is reduced by (at least) two in this case) */ - UINTAT(buf+4)=0; /* [clears decQuad 00 too] */ - UINTAT(buf+8)=0; - if (ub>buf+12) { - ui=&UINTAT(buf+12); /* start of any remaining */ - for (; ui<&UINTAT(ub); ui++) *ui=0; /* fill them */ - } - GETCOEFF(dfr, ub); /* decode from decFloat */ - - /* now move tail of rhs across to main acc; again use direct */ - /* assignment for 8 digits-worth */ - UINTAT(acc+COFF+DECPMAX)=UINTAT(buf+COFF+DECPMAX); - UINTAT(acc+COFF+DECPMAX+4)=UINTAT(buf+COFF+DECPMAX+4); - if (buf+COFF+DECPMAX+8<ub+DECPMAX) { - uj=&UINTAT(buf+COFF+DECPMAX+8); /* source */ - ui=&UINTAT(acc+COFF+DECPMAX+8); /* target */ - for (; uj<&UINTAT(ub+DECPMAX); ui++, uj++) *ui=*uj; + if (overlap==DECPMAX) { /* aligned */ + ub=buf+COFF; /* where msd will go */ + #if QUAD + UBFROMUS(buf+4, 0); /* clear quad's 00 */ + #endif + GETCOEFF(dfr, ub); /* decode from decFloat */ } + else { /* unaligned */ + ub=buf+COFF+DECPMAX-overlap; /* where MSD will go */ + /* Fill the prefix gap with 0s; 8 will cover most common */ + /* unalignments, so start with direct assignments (a loop is */ + /* then used for any remaining -- the loop (and the one in a */ + /* moment) is not then on the critical path because the number */ + /* of additions is reduced by (at least) two in this case) */ + UBFROMUI(buf+4, 0); /* [clears decQuad 00 too] */ + UBFROMUI(buf+8, 0); + if (ub>buf+12) { + ut=buf+12; /* start any remaining */ + for (; ut<ub; ut+=4) UBFROMUI(ut, 0); /* fill them */ + } + GETCOEFF(dfr, ub); /* decode from decFloat */ + + /* now move tail of rhs across to main acc; again use direct */ + /* copies for 8 digits-worth */ + UBFROMUI(acc+COFF+DECPMAX, UBTOUI(buf+COFF+DECPMAX)); + UBFROMUI(acc+COFF+DECPMAX+4, UBTOUI(buf+COFF+DECPMAX+4)); + if (buf+COFF+DECPMAX+8<ub+DECPMAX) { + us=buf+COFF+DECPMAX+8; /* source */ + ut=acc+COFF+DECPMAX+8; /* target */ + for (; us<ub+DECPMAX; us+=4, ut+=4) UBFROMUI(ut, UBTOUI(us)); + } + } /* unaligned */ ulsd=acc+(ub-buf+DECPMAX-1); /* update LSD pointer */ - /* now do the add of the non-tail; this is all nicely aligned, */ + /* Now do the add of the non-tail; this is all nicely aligned, */ /* and is over a multiple of four digits (because for Quad two */ - /* two 0 digits were added on the left); words in both acc and */ + /* zero digits were added on the left); words in both acc and */ /* buf (buf especially) will often be zero */ - /* [byte-by-byte add, here, is about 15% slower than the by-fours] */ + /* [byte-by-byte add, here, is about 15% slower total effect than */ + /* the by-fours] */ /* Now effect the add; this is harder on a little-endian */ /* machine as the inter-digit carry cannot use the usual BCD */ /* addition trick because the bytes are loaded in the wrong order */ /* [this loop could be unrolled, but probably scarcely worth it] */ - ui=&UINTAT(acc+COFF+DECPMAX-4); /* target LSW (acc) */ - uj=&UINTAT(buf+COFF+DECPMAX-4); /* source LSW (buf, to add to acc) */ + ut=acc+COFF+DECPMAX-4; /* target LSW (acc) */ + us=buf+COFF+DECPMAX-4; /* source LSW (buf, to add to acc) */ #if !DECLITEND - for (; ui>=&UINTAT(acc+4); ui--, uj--) { + for (; ut>=acc+4; ut-=4, us-=4) { /* big-endian add loop */ /* bcd8 add */ - carry+=*uj; /* rhs + carry */ + carry+=UBTOUI(us); /* rhs + carry */ if (carry==0) continue; /* no-op */ - carry+=*ui; /* lhs */ + carry+=UBTOUI(ut); /* lhs */ /* Big-endian BCD adjust (uses internal carry) */ carry+=0x76f6f6f6; /* note top nibble not all bits */ - *ui=(carry & 0x0f0f0f0f) - ((carry & 0x60606060)>>4); /* BCD adjust */ + /* apply BCD adjust and save */ + UBFROMUI(ut, (carry & 0x0f0f0f0f) - ((carry & 0x60606060)>>4)); carry>>=31; /* true carry was at far left */ } /* add loop */ #else - for (; ui>=&UINTAT(acc+4); ui--, uj--) { + for (; ut>=acc+4; ut-=4, us-=4) { /* little-endian add loop */ /* bcd8 add */ - carry+=*uj; /* rhs + carry */ + carry+=UBTOUI(us); /* rhs + carry */ if (carry==0) continue; /* no-op [common if unaligned] */ - carry+=*ui; /* lhs */ + carry+=UBTOUI(ut); /* lhs */ /* Little-endian BCD adjust; inter-digit carry must be manual */ /* because the lsb from the array will be in the most-significant */ /* byte of carry */ @@ -1359,12 +1460,13 @@ decFloat * decFloatAdd(decFloat *result, carry+=(carry & 0x00800000)>>15; carry+=(carry & 0x00008000)>>15; carry-=(carry & 0x60606060)>>4; /* BCD adjust back */ - *ui=carry & 0x0f0f0f0f; /* clear debris and save */ + UBFROMUI(ut, carry & 0x0f0f0f0f); /* clear debris and save */ /* here, final carry-out bit is at 0x00000080; move it ready */ /* for next word-add (i.e., to 0x01000000) */ carry=(carry & 0x00000080)<<17; } /* add loop */ #endif + #if DECTRACE {bcdnum tum; printf("Add done, carry=%08lx, diffsign=%ld\n", (LI)carry, (LI)diffsign); @@ -1392,36 +1494,36 @@ decFloat * decFloatAdd(decFloat *result, *(ulsd+1)=0; #endif /* there are always at least four coefficient words */ - UINTAT(umsd) =0x09090909-UINTAT(umsd); - UINTAT(umsd+4) =0x09090909-UINTAT(umsd+4); - UINTAT(umsd+8) =0x09090909-UINTAT(umsd+8); - UINTAT(umsd+12)=0x09090909-UINTAT(umsd+12); + UBFROMUI(umsd, 0x09090909-UBTOUI(umsd)); + UBFROMUI(umsd+4, 0x09090909-UBTOUI(umsd+4)); + UBFROMUI(umsd+8, 0x09090909-UBTOUI(umsd+8)); + UBFROMUI(umsd+12, 0x09090909-UBTOUI(umsd+12)); #if DOUBLE #define BNEXT 16 #elif QUAD - UINTAT(umsd+16)=0x09090909-UINTAT(umsd+16); - UINTAT(umsd+20)=0x09090909-UINTAT(umsd+20); - UINTAT(umsd+24)=0x09090909-UINTAT(umsd+24); - UINTAT(umsd+28)=0x09090909-UINTAT(umsd+28); - UINTAT(umsd+32)=0x09090909-UINTAT(umsd+32); + UBFROMUI(umsd+16, 0x09090909-UBTOUI(umsd+16)); + UBFROMUI(umsd+20, 0x09090909-UBTOUI(umsd+20)); + UBFROMUI(umsd+24, 0x09090909-UBTOUI(umsd+24)); + UBFROMUI(umsd+28, 0x09090909-UBTOUI(umsd+28)); + UBFROMUI(umsd+32, 0x09090909-UBTOUI(umsd+32)); #define BNEXT 36 #endif if (ulsd>=umsd+BNEXT) { /* unaligned */ /* eight will handle most unaligments for Double; 16 for Quad */ - UINTAT(umsd+BNEXT)=0x09090909-UINTAT(umsd+BNEXT); - UINTAT(umsd+BNEXT+4)=0x09090909-UINTAT(umsd+BNEXT+4); + UBFROMUI(umsd+BNEXT, 0x09090909-UBTOUI(umsd+BNEXT)); + UBFROMUI(umsd+BNEXT+4, 0x09090909-UBTOUI(umsd+BNEXT+4)); #if DOUBLE #define BNEXTY (BNEXT+8) #elif QUAD - UINTAT(umsd+BNEXT+8)=0x09090909-UINTAT(umsd+BNEXT+8); - UINTAT(umsd+BNEXT+12)=0x09090909-UINTAT(umsd+BNEXT+12); + UBFROMUI(umsd+BNEXT+8, 0x09090909-UBTOUI(umsd+BNEXT+8)); + UBFROMUI(umsd+BNEXT+12, 0x09090909-UBTOUI(umsd+BNEXT+12)); #define BNEXTY (BNEXT+16) #endif if (ulsd>=umsd+BNEXTY) { /* very unaligned */ - ui=&UINTAT(umsd+BNEXTY); /* -> continue */ - for (;;ui++) { - *ui=0x09090909-*ui; /* invert four digits */ - if (ui>=&UINTAT(ulsd-3)) break; /* all done */ + ut=umsd+BNEXTY; /* -> continue */ + for (;;ut+=4) { + UBFROMUI(ut, 0x09090909-UBTOUI(ut)); /* invert four digits */ + if (ut>=ulsd-3) break; /* all done */ } } } @@ -1446,10 +1548,10 @@ decFloat * decFloatAdd(decFloat *result, umsd=acc+COFF+DECPMAX-1; /* so far, so zero */ if (ulsd>umsd) { /* more to check */ umsd++; /* to align after checked area */ - for (; UINTAT(umsd)==0 && umsd+3<ulsd;) umsd+=4; + for (; UBTOUI(umsd)==0 && umsd+3<ulsd;) umsd+=4; for (; *umsd==0 && umsd<ulsd;) umsd++; } - if (*umsd==0) { /* must be true zero (and diffsign) */ + if (*umsd==0) { /* must be true zero (and diffsign) */ num.sign=0; /* assume + */ if (set->round==DEC_ROUND_FLOOR) num.sign=DECFLOAT_Sign; } @@ -1468,9 +1570,9 @@ decFloat * decFloatAdd(decFloat *result, #endif } /* same sign */ - num.msd=umsd; /* set MSD .. */ - num.lsd=ulsd; /* .. and LSD */ - num.exponent=expr; /* set exponent to smaller */ + num.msd=umsd; /* set MSD .. */ + num.lsd=ulsd; /* .. and LSD */ + num.exponent=bexpr-DECBIAS; /* set exponent to smaller, unbiassed */ #if DECTRACE decFloatShow(dfl, "dfl"); @@ -1484,12 +1586,12 @@ decFloat * decFloatAdd(decFloat *result, /* decFloatAnd -- logical digitwise AND of two decFloats */ /* */ /* result gets the result of ANDing dfl and dfr */ -/* dfl is the first decFloat (lhs) */ +/* dfl is the first decFloat (lhs) */ /* dfr is the second decFloat (rhs) */ /* set is the context */ /* returns result, which will be canonical with sign=0 */ /* */ -/* The operands must be positive, finite with exponent q=0, and */ +/* The operands must be positive, finite with exponent q=0, and */ /* comprise just zeros and ones; if not, Invalid operation results. */ /* ------------------------------------------------------------------ */ decFloat * decFloatAnd(decFloat *result, @@ -1516,7 +1618,7 @@ decFloat * decFloatAnd(decFloat *result, /* decFloatCanonical -- copy a decFloat, making canonical */ /* */ /* result gets the canonicalized df */ -/* df is the decFloat to copy and make canonical */ +/* df is the decFloat to copy and make canonical */ /* returns result */ /* */ /* This works on specials, too; no error or exception is possible. */ @@ -1528,7 +1630,7 @@ decFloat * decFloatCanonical(decFloat *result, const decFloat *df) { /* ------------------------------------------------------------------ */ /* decFloatClass -- return the class of a decFloat */ /* */ -/* df is the decFloat to test */ +/* df is the decFloat to test */ /* returns the decClass that df falls into */ /* ------------------------------------------------------------------ */ enum decClass decFloatClass(const decFloat *df) { @@ -1560,7 +1662,7 @@ enum decClass decFloatClass(const decFloat *df) { /* ------------------------------------------------------------------ */ /* decFloatClassString -- return the class of a decFloat as a string */ /* */ -/* df is the decFloat to test */ +/* df is the decFloat to test */ /* returns a constant string describing the class df falls into */ /* ------------------------------------------------------------------ */ const char *decFloatClassString(const decFloat *df) { @@ -1579,10 +1681,10 @@ const char *decFloatClassString(const decFloat *df) { } /* decFloatClassString */ /* ------------------------------------------------------------------ */ -/* decFloatCompare -- compare two decFloats; quiet NaNs allowed */ +/* decFloatCompare -- compare two decFloats; quiet NaNs allowed */ /* */ /* result gets the result of comparing dfl and dfr */ -/* dfl is the first decFloat (lhs) */ +/* dfl is the first decFloat (lhs) */ /* dfr is the second decFloat (rhs) */ /* set is the context */ /* returns result, which may be -1, 0, 1, or NaN (Unordered) */ @@ -1606,7 +1708,7 @@ decFloat * decFloatCompare(decFloat *result, /* decFloatCompareSignal -- compare two decFloats; all NaNs signal */ /* */ /* result gets the result of comparing dfl and dfr */ -/* dfl is the first decFloat (lhs) */ +/* dfl is the first decFloat (lhs) */ /* dfr is the second decFloat (rhs) */ /* set is the context */ /* returns result, which may be -1, 0, 1, or NaN (Unordered) */ @@ -1633,17 +1735,21 @@ decFloat * decFloatCompareSignal(decFloat *result, /* decFloatCompareTotal -- compare two decFloats with total ordering */ /* */ /* result gets the result of comparing dfl and dfr */ -/* dfl is the first decFloat (lhs) */ +/* dfl is the first decFloat (lhs) */ /* dfr is the second decFloat (rhs) */ /* returns result, which may be -1, 0, or 1 */ /* ------------------------------------------------------------------ */ decFloat * decFloatCompareTotal(decFloat *result, const decFloat *dfl, const decFloat *dfr) { - Int comp; /* work */ + Int comp; /* work */ + uInt uiwork; /* for macros */ + #if QUAD + uShort uswork; /* .. */ + #endif if (DFISNAN(dfl) || DFISNAN(dfr)) { Int nanl, nanr; /* work */ /* morph NaNs to +/- 1 or 2, leave numbers as 0 */ - nanl=DFISSNAN(dfl)+DFISQNAN(dfl)*2; /* quiet > signalling */ + nanl=DFISSNAN(dfl)+DFISQNAN(dfl)*2; /* quiet > signalling */ if (DFISSIGNED(dfl)) nanl=-nanl; nanr=DFISSNAN(dfr)+DFISQNAN(dfr)*2; if (DFISSIGNED(dfr)) nanr=-nanr; @@ -1654,23 +1760,22 @@ decFloat * decFloatCompareTotal(decFloat *result, uByte bufl[DECPMAX+4]; /* for LHS coefficient + foot */ uByte bufr[DECPMAX+4]; /* for RHS coefficient + foot */ uByte *ub, *uc; /* work */ - Int sigl; /* signum of LHS */ + Int sigl; /* signum of LHS */ sigl=(DFISSIGNED(dfl) ? -1 : +1); /* decode the coefficients */ /* (shift both right two if Quad to make a multiple of four) */ #if QUAD - ub = bufl; /* avoid type-pun violation */ - USHORTAT(ub)=0; - uc = bufr; /* avoid type-pun violation */ - USHORTAT(uc)=0; + UBFROMUS(bufl, 0); + UBFROMUS(bufr, 0); #endif GETCOEFF(dfl, bufl+QUAD*2); /* decode from decFloat */ GETCOEFF(dfr, bufr+QUAD*2); /* .. */ /* all multiples of four, here */ comp=0; /* assume equal */ for (ub=bufl, uc=bufr; ub<bufl+DECPMAX+QUAD*2; ub+=4, uc+=4) { - if (UINTAT(ub)==UINTAT(uc)) continue; /* so far so same */ + uInt ui=UBTOUI(ub); + if (ui==UBTOUI(uc)) continue; /* so far so same */ /* about to find a winner; go by bytes in case little-endian */ for (;; ub++, uc++) { if (*ub==*uc) continue; @@ -1696,7 +1801,7 @@ decFloat * decFloatCompareTotal(decFloat *result, /* decFloatCompareTotalMag -- compare magnitudes with total ordering */ /* */ /* result gets the result of comparing abs(dfl) and abs(dfr) */ -/* dfl is the first decFloat (lhs) */ +/* dfl is the first decFloat (lhs) */ /* dfr is the second decFloat (rhs) */ /* returns result, which may be -1, 0, or 1 */ /* ------------------------------------------------------------------ */ @@ -1747,7 +1852,7 @@ decFloat * decFloatCopyAbs(decFloat *result, const decFloat *dfl) { /* ------------------------------------------------------------------ */ /* decFloatCopyNegate -- copy a decFloat as-is with inverted sign bit */ /* */ -/* result gets the copy of dfl with sign bit inverted */ +/* result gets the copy of dfl with sign bit inverted */ /* dfl is the decFloat to copy */ /* returns result */ /* */ @@ -1760,10 +1865,10 @@ decFloat * decFloatCopyNegate(decFloat *result, const decFloat *dfl) { } /* decFloatCopyNegate */ /* ------------------------------------------------------------------ */ -/* decFloatCopySign -- copy a decFloat with the sign of another */ +/* decFloatCopySign -- copy a decFloat with the sign of another */ /* */ -/* result gets the result of copying dfl with the sign of dfr */ -/* dfl is the first decFloat (lhs) */ +/* result gets the result of copying dfl with the sign of dfr */ +/* dfl is the first decFloat (lhs) */ /* dfr is the second decFloat (rhs) */ /* returns result */ /* */ @@ -1795,7 +1900,7 @@ decFloat * decFloatCopySign(decFloat *result, /* next one is used when it is known that the declet must be */ /* non-zero, or is the final zero declet */ #define dpdlendun(n, form) {dpd=(form)&0x3ff; \ - if (dpd==0) return 1; \ + if (dpd==0) return 1; \ return (DECPMAX-1-3*(n))-(3-DPD2BCD8[dpd*4+3]);} uInt decFloatDigits(const decFloat *df) { @@ -1819,7 +1924,7 @@ uInt decFloatDigits(const decFloat *df) { } /* [cannot drop through] */ sourlo=DFWORD(df, 1); /* sourhi not involved now */ if (sourlo&0xfff00000) { /* in one of first two */ - dpdlenchk(1, sourlo>>30); /* very rare */ + dpdlenchk(1, sourlo>>30); /* very rare */ dpdlendun(2, sourlo>>20); } /* [cannot drop through] */ dpdlenchk(3, sourlo>>10); @@ -1850,7 +1955,7 @@ uInt decFloatDigits(const decFloat *df) { } /* [cannot drop through] */ sourlo=DFWORD(df, 3); if (sourlo&0xfff00000) { /* in one of first two */ - dpdlenchk(7, sourlo>>30); /* very rare */ + dpdlenchk(7, sourlo>>30); /* very rare */ dpdlendun(8, sourlo>>20); } /* [cannot drop through] */ dpdlenchk(9, sourlo>>10); @@ -1863,7 +1968,7 @@ uInt decFloatDigits(const decFloat *df) { /* decFloatDivide -- divide a decFloat by another */ /* */ /* result gets the result of dividing dfl by dfr: */ -/* dfl is the first decFloat (lhs) */ +/* dfl is the first decFloat (lhs) */ /* dfr is the second decFloat (rhs) */ /* set is the context */ /* returns result */ @@ -1880,7 +1985,7 @@ decFloat * decFloatDivide(decFloat *result, /* decFloatDivideInteger -- integer divide a decFloat by another */ /* */ /* result gets the result of dividing dfl by dfr: */ -/* dfl is the first decFloat (lhs) */ +/* dfl is the first decFloat (lhs) */ /* dfr is the second decFloat (rhs) */ /* set is the context */ /* returns result */ @@ -1896,9 +2001,9 @@ decFloat * decFloatDivideInteger(decFloat *result, /* decFloatFMA -- multiply and add three decFloats, fused */ /* */ /* result gets the result of (dfl*dfr)+dff with a single rounding */ -/* dfl is the first decFloat (lhs) */ +/* dfl is the first decFloat (lhs) */ /* dfr is the second decFloat (rhs) */ -/* dff is the final decFloat (fhs) */ +/* dff is the final decFloat (fhs) */ /* set is the context */ /* returns result */ /* */ @@ -1906,21 +2011,23 @@ decFloat * decFloatDivideInteger(decFloat *result, decFloat * decFloatFMA(decFloat *result, const decFloat *dfl, const decFloat *dfr, const decFloat *dff, decContext *set) { + /* The accumulator has the bytes needed for FiniteMultiply, plus */ /* one byte to the left in case of carry, plus DECPMAX+2 to the */ /* right for the final addition (up to full fhs + round & sticky) */ - #define FMALEN (1+ (DECPMAX9*18) +DECPMAX+2) - uByte acc[FMALEN]; /* for multiplied coefficient in BCD */ + #define FMALEN (ROUNDUP4(1+ (DECPMAX9*18+1) +DECPMAX+2)) + uByte acc[FMALEN]; /* for multiplied coefficient in BCD */ /* .. and for final result */ bcdnum mul; /* for multiplication result */ bcdnum fin; /* for final operand, expanded */ - uByte coe[DECPMAX]; /* dff coefficient in BCD */ + uByte coe[ROUNDUP4(DECPMAX)]; /* dff coefficient in BCD */ bcdnum *hi, *lo; /* bcdnum with higher/lower exponent */ uInt diffsign; /* non-zero if signs differ */ - uInt hipad; /* pad digit for hi if needed */ + uInt hipad; /* pad digit for hi if needed */ Int padding; /* excess exponent */ - uInt carry; /* +1 for ten's complement and during add */ - uByte *ub, *uh, *ul; /* work */ + uInt carry; /* +1 for ten's complement and during add */ + uByte *ub, *uh, *ul; /* work */ + uInt uiwork; /* for macros */ /* handle all the special values [any special operand leads to a */ /* special result] */ @@ -1971,8 +2078,8 @@ decFloat * decFloatFMA(decFloat *result, const decFloat *dfl, GETCOEFF(dff, coe); /* extract the coefficient */ /* now set hi and lo so that hi points to whichever of mul and fin */ - /* has the higher exponent and lo point to the other [don't care if */ - /* the same] */ + /* has the higher exponent and lo points to the other [don't care, */ + /* if the same]. One coefficient will be in acc, the other in coe. */ if (mul.exponent>=fin.exponent) { hi=&mul; lo=&fin; @@ -1983,22 +2090,23 @@ decFloat * decFloatFMA(decFloat *result, const decFloat *dfl, } /* remove leading zeros on both operands; this will save time later */ - /* and make testing for zero trivial */ - for (; UINTAT(hi->msd)==0 && hi->msd+3<hi->lsd;) hi->msd+=4; + /* and make testing for zero trivial (tests are safe because acc */ + /* and coe are rounded up to uInts) */ + for (; UBTOUI(hi->msd)==0 && hi->msd+3<hi->lsd;) hi->msd+=4; for (; *hi->msd==0 && hi->msd<hi->lsd;) hi->msd++; - for (; UINTAT(lo->msd)==0 && lo->msd+3<lo->lsd;) lo->msd+=4; + for (; UBTOUI(lo->msd)==0 && lo->msd+3<lo->lsd;) lo->msd+=4; for (; *lo->msd==0 && lo->msd<lo->lsd;) lo->msd++; /* if hi is zero then result will be lo (which has the smaller */ /* exponent), which also may need to be tested for zero for the */ /* weird IEEE 754 sign rules */ - if (*hi->msd==0 && hi->msd==hi->lsd) { /* hi is zero */ + if (*hi->msd==0) { /* hi is zero */ /* "When the sum of two operands with opposite signs is */ /* exactly zero, the sign of that sum shall be '+' in all */ /* rounding modes except round toward -Infinity, in which */ /* mode that sign shall be '-'." */ if (diffsign) { - if (*lo->msd==0 && lo->msd==lo->lsd) { /* lo is zero */ + if (*lo->msd==0) { /* lo is zero */ lo->sign=0; if (set->round==DEC_ROUND_FLOOR) lo->sign=DECFLOAT_Sign; } /* diffsign && lo=0 */ @@ -2006,10 +2114,11 @@ decFloat * decFloatFMA(decFloat *result, const decFloat *dfl, return decFinalize(result, lo, set); /* may need clamping */ } /* numfl is zero */ /* [here, both are minimal length and hi is non-zero] */ + /* (if lo is zero then padding with zeros may be needed, below) */ /* if signs differ, take the ten's complement of hi (zeros to the */ - /* right do not matter because the complement of zero is zero); */ - /* the +1 is done later, as part of the addition, inserted at the */ + /* right do not matter because the complement of zero is zero); the */ + /* +1 is done later, as part of the addition, inserted at the */ /* correct digit */ hipad=0; carry=0; @@ -2017,7 +2126,7 @@ decFloat * decFloatFMA(decFloat *result, const decFloat *dfl, hipad=9; carry=1; /* exactly the correct number of digits must be inverted */ - for (uh=hi->msd; uh<hi->lsd-3; uh+=4) UINTAT(uh)=0x09090909-UINTAT(uh); + for (uh=hi->msd; uh<hi->lsd-3; uh+=4) UBFROMUI(uh, 0x09090909-UBTOUI(uh)); for (; uh<=hi->lsd; uh++) *uh=(uByte)(0x09-*uh); } @@ -2032,7 +2141,8 @@ decFloat * decFloatFMA(decFloat *result, const decFloat *dfl, /* printf("FMA pad %ld\n", (LI)padding); */ /* the result of the addition will be built into the accumulator, */ - /* starting from the far right; this could be either hi or lo */ + /* starting from the far right; this could be either hi or lo, and */ + /* will be aligned */ ub=acc+FMALEN-1; /* where lsd of result will go */ ul=lo->lsd; /* lsd of rhs */ @@ -2042,45 +2152,43 @@ decFloat * decFloatFMA(decFloat *result, const decFloat *dfl, /* digit at the right place, as it stays clear of hi digits */ /* [it must be DECPMAX+2 because during a subtraction the msd */ /* could become 0 after a borrow from 1.000 to 0.9999...] */ - Int hilen=(Int)(hi->lsd-hi->msd+1); /* lengths */ - Int lolen=(Int)(lo->lsd-lo->msd+1); /* .. */ - Int newexp=MINI(hi->exponent, hi->exponent+hilen-DECPMAX)-3; - Int reduce=newexp-lo->exponent; - if (reduce>0) { /* [= case gives reduce=0 nop] */ + + Int hilen=(Int)(hi->lsd-hi->msd+1); /* length of hi */ + Int lolen=(Int)(lo->lsd-lo->msd+1); /* and of lo */ + + if (hilen+padding-lolen > DECPMAX+2) { /* can reduce lo to single */ + /* make sure it is virtually at least DECPMAX from hi->msd, at */ + /* least to right of hi->lsd (in case of destructive subtract), */ + /* and separated by at least two digits from either of those */ + /* (the tricky DOUBLE case is when hi is a 1 that will become a */ + /* 0.9999... by subtraction: */ + /* hi: 1 E+16 */ + /* lo: .................1000000000000000 E-16 */ + /* which for the addition pads to: */ + /* hi: 1000000000000000000 E-16 */ + /* lo: .................1000000000000000 E-16 */ + Int newexp=MINI(hi->exponent, hi->exponent+hilen-DECPMAX)-3; + /* printf("FMA reduce: %ld\n", (LI)reduce); */ - if (reduce>=lolen) { /* eating all */ - lo->lsd=lo->msd; /* reduce to single digit */ - lo->exponent=newexp; /* [known to be non-zero] */ - } - else { /* < */ - uByte *up=lo->lsd; - lo->lsd=lo->lsd-reduce; - if (*lo->lsd==0) /* could need sticky bit */ - for (; up>lo->lsd; up--) { /* search discarded digits */ - if (*up!=0) { /* found one... */ - *lo->lsd=1; /* set sticky bit */ - break; - } - } - lo->exponent+=reduce; - } - padding=hi->exponent-lo->exponent; /* recalculate */ - ul=lo->lsd; /* .. */ - } /* maybe reduce */ - /* padding is now <= DECPMAX+2 but still > 0; tricky DOUBLE case */ - /* is when hi is a 1 that will become a 0.9999... by subtraction: */ - /* hi: 1 E+16 */ - /* lo: .................1000000000000000 E-16 */ - /* which for the addition pads and reduces to: */ - /* hi: 1000000000000000000 E-2 */ - /* lo: .................1 E-2 */ + lo->lsd=lo->msd; /* to single digit [maybe 0] */ + lo->exponent=newexp; /* new lowest exponent */ + padding=hi->exponent-lo->exponent; /* recalculate */ + ul=lo->lsd; /* .. and repoint */ + } + + /* padding is still > 0, but will fit in acc (less leading carry slot) */ #if DECCHECK - if (padding>DECPMAX+2) printf("FMA excess padding: %ld\n", (LI)padding); if (padding<=0) printf("FMA low padding: %ld\n", (LI)padding); + if (hilen+padding+1>FMALEN) + printf("FMA excess hilen+padding: %ld+%ld \n", (LI)hilen, (LI)padding); /* printf("FMA padding: %ld\n", (LI)padding); */ #endif + /* padding digits can now be set in the result; one or more of */ /* these will come from lo; others will be zeros in the gap */ + for (; ul-3>=lo->msd && padding>3; padding-=4, ul-=4, ub-=4) { + UBFROMUI(ub-3, UBTOUI(ul-3)); /* [cannot overlap] */ + } for (; ul>=lo->msd && padding>0; padding--, ul--, ub--) *ub=*ul; for (;padding>0; padding--, ub--) *ub=0; /* mind the gap */ } @@ -2088,23 +2196,39 @@ decFloat * decFloatFMA(decFloat *result, const decFloat *dfl, /* addition now complete to the right of the rightmost digit of hi */ uh=hi->lsd; - /* carry was set up depending on ten's complement above; do the add... */ + /* dow do the add from hi->lsd to the left */ + /* [bytewise, because either operand can run out at any time] */ + /* carry was set up depending on ten's complement above */ + /* first assume both operands have some digits */ for (;; ub--) { - uInt hid, lod; - if (uh<hi->msd) { + if (uh<hi->msd || ul<lo->msd) break; + *ub=(uByte)(carry+(*uh--)+(*ul--)); + carry=0; + if (*ub<10) continue; + *ub-=10; + carry=1; + } /* both loop */ + + if (ul<lo->msd) { /* to left of lo */ + for (;; ub--) { + if (uh<hi->msd) break; + *ub=(uByte)(carry+(*uh--)); /* [+0] */ + carry=0; + if (*ub<10) continue; + *ub-=10; + carry=1; + } /* hi loop */ + } + else { /* to left of hi */ + for (;; ub--) { if (ul<lo->msd) break; - hid=hipad; - } - else hid=*uh--; - if (ul<lo->msd) lod=0; - else lod=*ul--; - *ub=(uByte)(carry+hid+lod); - if (*ub<10) carry=0; - else { + *ub=(uByte)(carry+hipad+(*ul--)); + carry=0; + if (*ub<10) continue; *ub-=10; carry=1; - } - } /* addition loop */ + } /* lo loop */ + } /* addition complete -- now handle carry, borrow, etc. */ /* use lo to set up the num (its exponent is already correct, and */ @@ -2122,7 +2246,7 @@ decFloat * decFloatFMA(decFloat *result, const decFloat *dfl, if (!carry) { /* no carry out means hi<lo */ /* borrowed -- take ten's complement of the right digits */ lo->sign=hi->sign; /* sign is lhs sign */ - for (ul=lo->msd; ul<lo->lsd-3; ul+=4) UINTAT(ul)=0x09090909-UINTAT(ul); + for (ul=lo->msd; ul<lo->lsd-3; ul+=4) UBFROMUI(ul, 0x09090909-UBTOUI(ul)); for (; ul<=lo->lsd; ul++) *ul=(uByte)(0x09-*ul); /* [leaves ul at lsd+1] */ /* complete the ten's complement by adding 1 [cannot overrun] */ for (ul--; *ul==9; ul--) *ul=0; @@ -2133,7 +2257,7 @@ decFloat * decFloatFMA(decFloat *result, const decFloat *dfl, /* all done except for the special IEEE 754 exact-zero-result */ /* rule (see above); while testing for zero, strip leading */ /* zeros (which will save decFinalize doing it) */ - for (; UINTAT(lo->msd)==0 && lo->msd+3<lo->lsd;) lo->msd+=4; + for (; UBTOUI(lo->msd)==0 && lo->msd+3<lo->lsd;) lo->msd+=4; for (; *lo->msd==0 && lo->msd<lo->lsd;) lo->msd++; if (*lo->msd==0) { /* must be true zero (and diffsign) */ lo->sign=0; /* assume + */ @@ -2143,11 +2267,18 @@ decFloat * decFloatFMA(decFloat *result, const decFloat *dfl, } /* subtraction gave positive result */ } /* diffsign */ + #if DECCHECK + /* assert no left underrun */ + if (lo->msd<acc) { + printf("FMA underrun by %ld \n", (LI)(acc-lo->msd)); + } + #endif + return decFinalize(result, lo, set); /* round, check, and lay out */ } /* decFloatFMA */ /* ------------------------------------------------------------------ */ -/* decFloatFromInt -- initialise a decFloat from an Int */ +/* decFloatFromInt -- initialise a decFloat from an Int */ /* */ /* result gets the converted Int */ /* n is the Int to convert */ @@ -2213,7 +2344,7 @@ decFloat * decFloatFromUInt32(decFloat *result, uInt u) { /* decFloatInvert -- logical digitwise INVERT of a decFloat */ /* */ /* result gets the result of INVERTing df */ -/* df is the decFloat to invert */ +/* df is the decFloat to invert */ /* set is the context */ /* returns result, which will be canonical with sign=0 */ /* */ @@ -2241,12 +2372,12 @@ decFloat * decFloatInvert(decFloat *result, const decFloat *df, /* ------------------------------------------------------------------ */ /* decFloatIs -- decFloat tests (IsSigned, etc.) */ /* */ -/* df is the decFloat to test */ -/* returns 0 or 1 in an int32_t */ +/* df is the decFloat to test */ +/* returns 0 or 1 in a uInt */ /* */ /* Many of these could be macros, but having them as real functions */ -/* is a bit cleaner (and they can be referred to here by the generic */ -/* names) */ +/* is a little cleaner (and they can be referred to here by the */ +/* generic names) */ /* ------------------------------------------------------------------ */ uInt decFloatIsCanonical(const decFloat *df) { if (DFISSPECIAL(df)) { @@ -2333,10 +2464,10 @@ uInt decFloatIsZero(const decFloat *df) { } /* decFloatIs... */ /* ------------------------------------------------------------------ */ -/* decFloatLogB -- return adjusted exponent, by 754r rules */ +/* decFloatLogB -- return adjusted exponent, by 754 rules */ /* */ /* result gets the adjusted exponent as an integer, or a NaN etc. */ -/* df is the decFloat to be examined */ +/* df is the decFloat to be examined */ /* set is the context */ /* returns result */ /* */ @@ -2353,12 +2484,12 @@ decFloat * decFloatLogB(decFloat *result, const decFloat *df, if (DFISNAN(df)) return decNaNs(result, df, NULL, set); if (DFISINF(df)) { DFWORD(result, 0)=0; /* need +ve */ - return decInfinity(result, result); /* canonical +Infinity */ + return decInfinity(result, result); /* canonical +Infinity */ } if (DFISZERO(df)) { - set->status|=DEC_Division_by_zero; /* as per 754r */ + set->status|=DEC_Division_by_zero; /* as per 754 */ DFWORD(result, 0)=DECFLOAT_Sign; /* make negative */ - return decInfinity(result, result); /* canonical -Infinity */ + return decInfinity(result, result); /* canonical -Infinity */ } ae=GETEXPUN(df) /* get unbiased exponent .. */ +decFloatDigits(df)-1; /* .. and make adjusted exponent */ @@ -2381,10 +2512,10 @@ decFloat * decFloatLogB(decFloat *result, const decFloat *df, } /* decFloatLogB */ /* ------------------------------------------------------------------ */ -/* decFloatMax -- return maxnum of two operands */ +/* decFloatMax -- return maxnum of two operands */ /* */ /* result gets the chosen decFloat */ -/* dfl is the first decFloat (lhs) */ +/* dfl is the first decFloat (lhs) */ /* dfr is the second decFloat (rhs) */ /* set is the context */ /* returns result */ @@ -2416,7 +2547,7 @@ decFloat * decFloatMax(decFloat *result, /* decFloatMaxMag -- return maxnummag of two operands */ /* */ /* result gets the chosen decFloat */ -/* dfl is the first decFloat (lhs) */ +/* dfl is the first decFloat (lhs) */ /* dfr is the second decFloat (rhs) */ /* set is the context */ /* returns result */ @@ -2440,10 +2571,10 @@ decFloat * decFloatMaxMag(decFloat *result, } /* decFloatMaxMag */ /* ------------------------------------------------------------------ */ -/* decFloatMin -- return minnum of two operands */ +/* decFloatMin -- return minnum of two operands */ /* */ /* result gets the chosen decFloat */ -/* dfl is the first decFloat (lhs) */ +/* dfl is the first decFloat (lhs) */ /* dfr is the second decFloat (rhs) */ /* set is the context */ /* returns result */ @@ -2475,7 +2606,7 @@ decFloat * decFloatMin(decFloat *result, /* decFloatMinMag -- return minnummag of two operands */ /* */ /* result gets the chosen decFloat */ -/* dfl is the first decFloat (lhs) */ +/* dfl is the first decFloat (lhs) */ /* dfr is the second decFloat (rhs) */ /* set is the context */ /* returns result */ @@ -2501,8 +2632,8 @@ decFloat * decFloatMinMag(decFloat *result, /* ------------------------------------------------------------------ */ /* decFloatMinus -- negate value, heeding NaNs, etc. */ /* */ -/* result gets the canonicalized 0-df */ -/* df is the decFloat to minus */ +/* result gets the canonicalized 0-df */ +/* df is the decFloat to minus */ /* set is the context */ /* returns result */ /* */ @@ -2524,8 +2655,8 @@ decFloat * decFloatMinus(decFloat *result, const decFloat *df, /* ------------------------------------------------------------------ */ /* decFloatMultiply -- multiply two decFloats */ /* */ -/* result gets the result of multiplying dfl and dfr: */ -/* dfl is the first decFloat (lhs) */ +/* result gets the result of multiplying dfl and dfr: */ +/* dfl is the first decFloat (lhs) */ /* dfr is the second decFloat (rhs) */ /* set is the context */ /* returns result */ @@ -2535,7 +2666,7 @@ decFloat * decFloatMultiply(decFloat *result, const decFloat *dfl, const decFloat *dfr, decContext *set) { bcdnum num; /* for final conversion */ - uByte bcdacc[DECPMAX9*18+1]; /* for coefficent in BCD */ + uByte bcdacc[DECPMAX9*18+1]; /* for coefficent in BCD */ if (DFISSPECIAL(dfl) || DFISSPECIAL(dfr)) { /* either is special? */ /* NaNs are handled as usual */ @@ -2561,7 +2692,7 @@ decFloat * decFloatMultiply(decFloat *result, /* set is the context */ /* returns result */ /* */ -/* This is 754r nextdown; Invalid is the only status possible (from */ +/* This is 754 nextdown; Invalid is the only status possible (from */ /* an sNaN). */ /* ------------------------------------------------------------------ */ decFloat * decFloatNextMinus(decFloat *result, const decFloat *dfl, @@ -2580,19 +2711,19 @@ decFloat * decFloatNextMinus(decFloat *result, const decFloat *dfl, /* here (but can be done with normal add if the sign of zero is */ /* treated carefully, because no Inexactitude is interesting); */ /* rounding to -Infinity then pushes the result to next below */ - decFloatZero(&delta); /* set up tiny delta */ - DFWORD(&delta, DECWORDS-1)=1; /* coefficient=1 */ + decFloatZero(&delta); /* set up tiny delta */ + DFWORD(&delta, DECWORDS-1)=1; /* coefficient=1 */ DFWORD(&delta, 0)=DECFLOAT_Sign; /* Sign=1 + biased exponent=0 */ /* set up for the directional round */ - saveround=set->round; /* save mode */ + saveround=set->round; /* save mode */ set->round=DEC_ROUND_FLOOR; /* .. round towards -Infinity */ - savestat=set->status; /* save status */ + savestat=set->status; /* save status */ decFloatAdd(result, dfl, &delta, set); /* Add rules mess up the sign when going from +Ntiny to 0 */ if (DFISZERO(result)) DFWORD(result, 0)^=DECFLOAT_Sign; /* correct */ set->status&=DEC_Invalid_operation; /* preserve only sNaN status */ set->status|=savestat; /* restore pending flags */ - set->round=saveround; /* .. and mode */ + set->round=saveround; /* .. and mode */ return result; } /* decFloatNextMinus */ @@ -2604,7 +2735,7 @@ decFloat * decFloatNextMinus(decFloat *result, const decFloat *dfl, /* set is the context */ /* returns result */ /* */ -/* This is 754r nextup; Invalid is the only status possible (from */ +/* This is 754 nextup; Invalid is the only status possible (from */ /* an sNaN). */ /* ------------------------------------------------------------------ */ decFloat * decFloatNextPlus(decFloat *result, const decFloat *dfl, @@ -2624,19 +2755,19 @@ decFloat * decFloatNextPlus(decFloat *result, const decFloat *dfl, /* here (but can be done with normal add if the sign of zero is */ /* treated carefully, because no Inexactitude is interesting); */ /* rounding to +Infinity then pushes the result to next above */ - decFloatZero(&delta); /* set up tiny delta */ - DFWORD(&delta, DECWORDS-1)=1; /* coefficient=1 */ + decFloatZero(&delta); /* set up tiny delta */ + DFWORD(&delta, DECWORDS-1)=1; /* coefficient=1 */ DFWORD(&delta, 0)=0; /* Sign=0 + biased exponent=0 */ /* set up for the directional round */ - saveround=set->round; /* save mode */ - set->round=DEC_ROUND_CEILING; /* .. round towards +Infinity */ - savestat=set->status; /* save status */ + saveround=set->round; /* save mode */ + set->round=DEC_ROUND_CEILING; /* .. round towards +Infinity */ + savestat=set->status; /* save status */ decFloatAdd(result, dfl, &delta, set); /* Add rules mess up the sign when going from -Ntiny to -0 */ if (DFISZERO(result)) DFWORD(result, 0)^=DECFLOAT_Sign; /* correct */ set->status&=DEC_Invalid_operation; /* preserve only sNaN status */ set->status|=savestat; /* restore pending flags */ - set->round=saveround; /* .. and mode */ + set->round=saveround; /* .. and mode */ return result; } /* decFloatNextPlus */ @@ -2649,8 +2780,9 @@ decFloat * decFloatNextPlus(decFloat *result, const decFloat *dfl, /* set is the context */ /* returns result */ /* */ -/* This is 754r nextafter; status may be set unless the result is a */ -/* normal number. */ +/* This is 754-1985 nextafter, as modified during revision (dropped */ +/* from 754-2008); status may be set unless the result is a normal */ +/* number. */ /* ------------------------------------------------------------------ */ decFloat * decFloatNextToward(decFloat *result, const decFloat *dfl, const decFloat *dfr, @@ -2676,7 +2808,7 @@ decFloat * decFloatNextToward(decFloat *result, } saveround=set->round; /* save mode */ set->round=DEC_ROUND_CEILING; /* .. round towards +Infinity */ - deltatop=0; /* positive delta */ + deltatop=0; /* positive delta */ } else { /* lhs>rhs, do NextMinus, see above for commentary */ if (DFISINF(dfl) && !DFISSIGNED(dfl)) { /* +Infinity special case */ @@ -2684,23 +2816,23 @@ decFloat * decFloatNextToward(decFloat *result, return result; } saveround=set->round; /* save mode */ - set->round=DEC_ROUND_FLOOR; /* .. round towards -Infinity */ + set->round=DEC_ROUND_FLOOR; /* .. round towards -Infinity */ deltatop=DECFLOAT_Sign; /* negative delta */ } - savestat=set->status; /* save status */ + savestat=set->status; /* save status */ /* Here, Inexact is needed where appropriate (and hence Underflow, */ /* etc.). Therefore the tiny delta which is otherwise */ /* unrepresentable (see NextPlus and NextMinus) is constructed */ /* using the multiplication of FMA. */ - decFloatZero(&delta); /* set up tiny delta */ - DFWORD(&delta, DECWORDS-1)=1; /* coefficient=1 */ + decFloatZero(&delta); /* set up tiny delta */ + DFWORD(&delta, DECWORDS-1)=1; /* coefficient=1 */ DFWORD(&delta, 0)=deltatop; /* Sign + biased exponent=0 */ decFloatFromString(&pointone, "1E-1", set); /* set up multiplier */ decFloatFMA(result, &delta, &pointone, dfl, set); /* [Delta is truly tiny, so no need to correct sign of zero] */ /* use new status unless the result is normal */ if (decFloatIsNormal(result)) set->status=savestat; /* else goes forward */ - set->round=saveround; /* restore mode */ + set->round=saveround; /* restore mode */ return result; } /* decFloatNextToward */ @@ -2708,12 +2840,12 @@ decFloat * decFloatNextToward(decFloat *result, /* decFloatOr -- logical digitwise OR of two decFloats */ /* */ /* result gets the result of ORing dfl and dfr */ -/* dfl is the first decFloat (lhs) */ +/* dfl is the first decFloat (lhs) */ /* dfr is the second decFloat (rhs) */ /* set is the context */ /* returns result, which will be canonical with sign=0 */ /* */ -/* The operands must be positive, finite with exponent q=0, and */ +/* The operands must be positive, finite with exponent q=0, and */ /* comprise just zeros and ones; if not, Invalid operation results. */ /* ------------------------------------------------------------------ */ decFloat * decFloatOr(decFloat *result, @@ -2739,14 +2871,14 @@ decFloat * decFloatOr(decFloat *result, /* ------------------------------------------------------------------ */ /* decFloatPlus -- add value to 0, heeding NaNs, etc. */ /* */ -/* result gets the canonicalized 0+df */ -/* df is the decFloat to plus */ +/* result gets the canonicalized 0+df */ +/* df is the decFloat to plus */ /* set is the context */ /* returns result */ /* */ /* This has the same effect as 0+df where the exponent of the zero is */ /* the same as that of df (if df is finite). */ -/* The effect is also the same as decFloatCopy except that NaNs */ +/* The effect is also the same as decFloatCopy except that NaNs */ /* are handled normally (the sign of a NaN is not affected, and an */ /* sNaN will signal), the result is canonical, and zero gets sign 0. */ /* ------------------------------------------------------------------ */ @@ -2762,7 +2894,7 @@ decFloat * decFloatPlus(decFloat *result, const decFloat *df, /* decFloatQuantize -- quantize a decFloat */ /* */ /* result gets the result of quantizing dfl to match dfr */ -/* dfl is the first decFloat (lhs) */ +/* dfl is the first decFloat (lhs) */ /* dfr is the second decFloat (rhs), which sets the exponent */ /* set is the context */ /* returns result */ @@ -2775,16 +2907,19 @@ decFloat * decFloatQuantize(decFloat *result, decContext *set) { Int explb, exprb; /* left and right biased exponents */ uByte *ulsd; /* local LSD pointer */ - uInt *ui; /* work */ - uByte *ub; /* .. */ + uByte *ub, *uc; /* work */ Int drop; /* .. */ uInt dpd; /* .. */ - uInt encode; /* encoding accumulator */ + uInt encode; /* encoding accumulator */ uInt sourhil, sourhir; /* top words from source decFloats */ + uInt uiwork; /* for macros */ + #if QUAD + uShort uswork; /* .. */ + #endif /* the following buffer holds the coefficient for manipulation */ - uByte buf[4+DECPMAX*3]; /* + space for zeros to left or right */ + uByte buf[4+DECPMAX*3+2*QUAD]; /* + space for zeros to left or right */ #if DECTRACE - bcdnum num; /* for trace displays */ + bcdnum num; /* for trace displays */ #endif /* Start decoding the arguments */ @@ -2827,7 +2962,7 @@ decFloat * decFloatQuantize(decFloat *result, decShowNum(&num, "dfl"); #endif - if (drop>0) { /* [most common case] */ + if (drop>0) { /* [most common case] */ /* (this code is very similar to that in decFloatFinalize, but */ /* has many differences so is duplicated here -- so any changes */ /* may need to be made there, too) */ @@ -2838,7 +2973,7 @@ decFloat * decFloatQuantize(decFloat *result, /* there is at least one zero needed to the left, in all but one */ /* exceptional (all-nines) case, so place four zeros now; this is */ /* needed almost always and makes rounding all-nines by fours safe */ - UINTAT(BUFOFF-4)=0; + UBFROMUI(BUFOFF-4, 0); /* Three cases here: */ /* 1. new LSD is in coefficient (almost always) */ @@ -2849,7 +2984,7 @@ decFloat * decFloatQuantize(decFloat *result, /* [duplicate check-stickies code to save a test] */ /* [by-digit check for stickies as runs of zeros are rare] */ - if (drop<DECPMAX) { /* NB lengths not addresses */ + if (drop<DECPMAX) { /* NB lengths not addresses */ roundat=BUFOFF+DECPMAX-drop; reround=*roundat; for (ub=roundat+1; ub<BUFOFF+DECPMAX; ub++) { @@ -2932,7 +3067,7 @@ decFloat * decFloatQuantize(decFloat *result, /* increment the coefficient; this could give 1000... (after */ /* the all nines case) */ ub=ulsd; - for (; UINTAT(ub-3)==0x09090909; ub-=4) UINTAT(ub-3)=0; + for (; UBTOUI(ub-3)==0x09090909; ub-=4) UBFROMUI(ub-3, 0); /* now at most 3 digits left to non-9 (usually just the one) */ for (; *ub==9; ub--) *ub=0; *ub+=1; @@ -2945,8 +3080,8 @@ decFloat * decFloatQuantize(decFloat *result, /* available in the coefficent -- the first word to the left was */ /* cleared earlier for safe carry; now add any more needed */ if (drop>4) { - UINTAT(BUFOFF-8)=0; /* must be at least 5 */ - for (ui=&UINTAT(BUFOFF-12); ui>&UINTAT(ulsd-DECPMAX-3); ui--) *ui=0; + UBFROMUI(BUFOFF-8, 0); /* must be at least 5 */ + for (uc=BUFOFF-12; uc>ulsd-DECPMAX-3; uc-=4) UBFROMUI(uc, 0); } } /* need round (drop>0) */ @@ -2967,18 +3102,21 @@ decFloat * decFloatQuantize(decFloat *result, #else static const uInt dmask[]={0, 0xff000000, 0xffff0000, 0xffffff00}; #endif - for (ui=&UINTAT(BUFOFF+DECPMAX);; ui++) { - *ui=0; - if (UINTAT(&UBYTEAT(ui)-DECPMAX)!=0) { /* could be bad */ + /* note that here zeros to the right are added by fours, so in */ + /* the Quad case this could write 36 zeros if the coefficient has */ + /* fewer than three significant digits (hence the +2*QUAD for buf) */ + for (uc=BUFOFF+DECPMAX;; uc+=4) { + UBFROMUI(uc, 0); + if (UBTOUI(uc-DECPMAX)!=0) { /* could be bad */ /* if all four digits should be zero, definitely bad */ - if (ui<=&UINTAT(BUFOFF+DECPMAX+(-drop)-4)) + if (uc<=BUFOFF+DECPMAX+(-drop)-4) return decInvalid(result, set); /* must be a 1- to 3-digit sequence; check more carefully */ - if ((UINTAT(&UBYTEAT(ui)-DECPMAX)&dmask[(-drop)%4])!=0) + if ((UBTOUI(uc-DECPMAX)&dmask[(-drop)%4])!=0) return decInvalid(result, set); break; /* no need for loop end test */ } - if (ui>=&UINTAT(BUFOFF+DECPMAX+(-drop)-4)) break; /* done */ + if (uc>=BUFOFF+DECPMAX+(-drop)-4) break; /* done */ } ulsd=BUFOFF+DECPMAX+(-drop)-1; } /* pad and check leading zeros */ @@ -3045,7 +3183,7 @@ decFloat * decFloatQuantize(decFloat *result, /* decFloatReduce -- reduce finite coefficient to minimum length */ /* */ /* result gets the reduced decFloat */ -/* df is the source decFloat */ +/* df is the source decFloat */ /* set is the context */ /* returns result, which will be canonical */ /* */ @@ -3085,7 +3223,7 @@ decFloat * decFloatReduce(decFloat *result, const decFloat *df, /* decFloatRemainder -- integer divide and return remainder */ /* */ /* result gets the remainder of dividing dfl by dfr: */ -/* dfl is the first decFloat (lhs) */ +/* dfl is the first decFloat (lhs) */ /* dfr is the second decFloat (rhs) */ /* set is the context */ /* returns result */ @@ -3101,7 +3239,7 @@ decFloat * decFloatRemainder(decFloat *result, /* decFloatRemainderNear -- integer divide to nearest and remainder */ /* */ /* result gets the remainder of dividing dfl by dfr: */ -/* dfl is the first decFloat (lhs) */ +/* dfl is the first decFloat (lhs) */ /* dfr is the second decFloat (rhs) */ /* set is the context */ /* returns result */ @@ -3145,7 +3283,7 @@ decFloat * decFloatRotate(decFloat *result, if (DFISNAN(dfl)||DFISNAN(dfr)) return decNaNs(result, dfl, dfr, set); if (!DFISINT(dfr)) return decInvalid(result, set); digits=decFloatDigits(dfr); /* calculate digits */ - if (digits>2) return decInvalid(result, set); /* definitely out of range */ + if (digits>2) return decInvalid(result, set); /* definitely out of range */ rotate=DPD2BIN[DFWORD(dfr, DECWORDS-1)&0x3ff]; /* is in bottom declet */ if (rotate>DECPMAX) return decInvalid(result, set); /* too big */ /* [from here on no error or status change is possible] */ @@ -3178,16 +3316,16 @@ decFloat * decFloatRotate(decFloat *result, num.lsd=num.msd+DECPMAX-1; num.sign=DFWORD(dfl, 0)&DECFLOAT_Sign; num.exponent=GETEXPUN(dfl); - savestat=set->status; /* record */ + savestat=set->status; /* record */ decFinalize(result, &num, set); - set->status=savestat; /* restore */ + set->status=savestat; /* restore */ return result; } /* decFloatRotate */ /* ------------------------------------------------------------------ */ /* decFloatSameQuantum -- test decFloats for same quantum */ /* */ -/* dfl is the first decFloat (lhs) */ +/* dfl is the first decFloat (lhs) */ /* dfr is the second decFloat (rhs) */ /* returns 1 if the operands have the same quantum, 0 otherwise */ /* */ @@ -3204,11 +3342,11 @@ uInt decFloatSameQuantum(const decFloat *dfl, const decFloat *dfr) { } /* decFloatSameQuantum */ /* ------------------------------------------------------------------ */ -/* decFloatScaleB -- multiply by a power of 10, as per 754r */ +/* decFloatScaleB -- multiply by a power of 10, as per 754 */ /* */ /* result gets the result of the operation */ -/* dfl is the first decFloat (lhs) */ -/* dfr is the second decFloat (rhs), am integer (with q=0) */ +/* dfl is the first decFloat (lhs) */ +/* dfr is the second decFloat (rhs), am integer (with q=0) */ /* set is the context */ /* returns result */ /* */ @@ -3229,10 +3367,10 @@ decFloat * decFloatScaleB(decFloat *result, digits=decFloatDigits(dfr); /* calculate digits */ #if DOUBLE - if (digits>3) return decInvalid(result, set); /* definitely out of range */ + if (digits>3) return decInvalid(result, set); /* definitely out of range */ expr=DPD2BIN[DFWORD(dfr, 1)&0x3ff]; /* must be in bottom declet */ #elif QUAD - if (digits>5) return decInvalid(result, set); /* definitely out of range */ + if (digits>5) return decInvalid(result, set); /* definitely out of range */ expr=DPD2BIN[DFWORD(dfr, 3)&0x3ff] /* in bottom 2 declets .. */ +DPD2BIN[(DFWORD(dfr, 3)>>10)&0x3ff]*1000; /* .. */ #endif @@ -3241,7 +3379,7 @@ decFloat * decFloatScaleB(decFloat *result, if (DFISINF(dfl)) return decInfinity(result, dfl); /* canonical */ if (DFISSIGNED(dfr)) expr=-expr; /* dfl is finite and expr is valid */ - *result=*dfl; /* copy to target */ + *result=*dfl; /* copy to target */ return decFloatSetExponent(result, set, GETEXPUN(result)+expr); } /* decFloatScaleB */ @@ -3266,23 +3404,24 @@ decFloat * decFloatScaleB(decFloat *result, decFloat * decFloatShift(decFloat *result, const decFloat *dfl, const decFloat *dfr, decContext *set) { - Int shift; /* dfr as an Int */ - uByte buf[DECPMAX*2]; /* coefficient + padding */ - uInt digits, savestat; /* work */ + Int shift; /* dfr as an Int */ + uByte buf[DECPMAX*2]; /* coefficient + padding */ + uInt digits, savestat; /* work */ bcdnum num; /* .. */ + uInt uiwork; /* for macros */ if (DFISNAN(dfl)||DFISNAN(dfr)) return decNaNs(result, dfl, dfr, set); if (!DFISINT(dfr)) return decInvalid(result, set); digits=decFloatDigits(dfr); /* calculate digits */ - if (digits>2) return decInvalid(result, set); /* definitely out of range */ - shift=DPD2BIN[DFWORD(dfr, DECWORDS-1)&0x3ff]; /* is in bottom declet */ + if (digits>2) return decInvalid(result, set); /* definitely out of range */ + shift=DPD2BIN[DFWORD(dfr, DECWORDS-1)&0x3ff]; /* is in bottom declet */ if (shift>DECPMAX) return decInvalid(result, set); /* too big */ /* [from here on no error or status change is possible] */ if (DFISINF(dfl)) return decInfinity(result, dfl); /* canonical */ /* handle no-shift and all-shift (clear to zero) cases */ if (shift==0) return decCanonical(result, dfl); - if (shift==DECPMAX) { /* zero with sign */ + if (shift==DECPMAX) { /* zero with sign */ uByte sign=(uByte)(DFBYTE(dfl, 0)&0x80); /* save sign bit */ decFloatZero(result); /* make +0 */ DFBYTE(result, 0)=(uByte)(DFBYTE(result, 0)|sign); /* and set sign */ @@ -3299,23 +3438,23 @@ decFloat * decFloatShift(decFloat *result, num.lsd=buf+DECPMAX-shift-1; } else { /* shift left -- zero padding needed to right */ - UINTAT(buf+DECPMAX)=0; /* 8 will handle most cases */ - UINTAT(buf+DECPMAX+4)=0; /* .. */ + UBFROMUI(buf+DECPMAX, 0); /* 8 will handle most cases */ + UBFROMUI(buf+DECPMAX+4, 0); /* .. */ if (shift>8) memset(buf+DECPMAX+8, 0, 8+QUAD*18); /* all other cases */ num.msd+=shift; num.lsd=num.msd+DECPMAX-1; } - savestat=set->status; /* record */ + savestat=set->status; /* record */ decFinalize(result, &num, set); - set->status=savestat; /* restore */ + set->status=savestat; /* restore */ return result; } /* decFloatShift */ /* ------------------------------------------------------------------ */ -/* decFloatSubtract -- subtract a decFloat from another */ +/* decFloatSubtract -- subtract a decFloat from another */ /* */ /* result gets the result of subtracting dfr from dfl: */ -/* dfl is the first decFloat (lhs) */ +/* dfl is the first decFloat (lhs) */ /* dfr is the second decFloat (rhs) */ /* set is the context */ /* returns result */ @@ -3333,9 +3472,9 @@ decFloat * decFloatSubtract(decFloat *result, } /* decFloatSubtract */ /* ------------------------------------------------------------------ */ -/* decFloatToInt -- round to 32-bit binary integer (4 flavours) */ +/* decFloatToInt -- round to 32-bit binary integer (4 flavours) */ /* */ -/* df is the decFloat to round */ +/* df is the decFloat to round */ /* set is the context */ /* round is the rounding mode to use */ /* returns a uInt or an Int, rounded according to the name */ @@ -3361,12 +3500,12 @@ Int decFloatToInt32Exact(const decFloat *df, decContext *set, return (Int)decToInt32(df, set, round, 1, 0);} /* ------------------------------------------------------------------ */ -/* decFloatToIntegral -- round to integral value (two flavours) */ +/* decFloatToIntegral -- round to integral value (two flavours) */ /* */ /* result gets the result */ -/* df is the decFloat to round */ +/* df is the decFloat to round */ /* set is the context */ -/* round is the rounding mode to use */ +/* round is the rounding mode to use */ /* returns result */ /* */ /* No exceptions, even Inexact, are raised except for sNaN input, or */ @@ -3384,12 +3523,12 @@ decFloat * decFloatToIntegralExact(decFloat *result, const decFloat *df, /* decFloatXor -- logical digitwise XOR of two decFloats */ /* */ /* result gets the result of XORing dfl and dfr */ -/* dfl is the first decFloat (lhs) */ +/* dfl is the first decFloat (lhs) */ /* dfr is the second decFloat (rhs) */ /* set is the context */ /* returns result, which will be canonical with sign=0 */ /* */ -/* The operands must be positive, finite with exponent q=0, and */ +/* The operands must be positive, finite with exponent q=0, and */ /* comprise just zeros and ones; if not, Invalid operation results. */ /* ------------------------------------------------------------------ */ decFloat * decFloatXor(decFloat *result, @@ -3432,14 +3571,14 @@ static decFloat *decInvalid(decFloat *result, decContext *set) { /* decInfinity -- set canonical Infinity with sign from a decFloat */ /* */ /* result gets a canonical Infinity */ -/* df is source decFloat (only the sign is used) */ +/* df is source decFloat (only the sign is used) */ /* returns result */ /* */ -/* df may be the same as result */ +/* df may be the same as result */ /* ------------------------------------------------------------------ */ static decFloat *decInfinity(decFloat *result, const decFloat *df) { uInt sign=DFWORD(df, 0); /* save source signword */ - decFloatZero(result); /* clear everything */ + decFloatZero(result); /* clear everything */ DFWORD(result, 0)=DECFLOAT_Inf | (sign & DECFLOAT_Sign); return result; } /* decInfinity */ @@ -3449,7 +3588,7 @@ static decFloat *decInfinity(decFloat *result, const decFloat *df) { /* */ /* result gets the result of handling dfl and dfr, one or both of */ /* which is a NaN */ -/* dfl is the first decFloat (lhs) */ +/* dfl is the first decFloat (lhs) */ /* dfr is the second decFloat (rhs) -- may be NULL for a single- */ /* operand operation */ /* set is the context */ @@ -3476,19 +3615,20 @@ static decFloat *decNaNs(decFloat *result, } /* decNaNs */ /* ------------------------------------------------------------------ */ -/* decNumCompare -- numeric comparison of two decFloats */ +/* decNumCompare -- numeric comparison of two decFloats */ /* */ /* dfl is the left-hand decFloat, which is not a NaN */ /* dfr is the right-hand decFloat, which is not a NaN */ /* tot is 1 for total order compare, 0 for simple numeric */ -/* returns -1, 0, or +1 for dfl<dfr, dfl=dfr, dfl>dfr */ +/* returns -1, 0, or +1 for dfl<dfr, dfl=dfr, dfl>dfr */ /* */ -/* No error is possible; status and mode are unchanged. */ +/* No error is possible; status and mode are unchanged. */ /* ------------------------------------------------------------------ */ static Int decNumCompare(const decFloat *dfl, const decFloat *dfr, Flag tot) { Int sigl, sigr; /* LHS and RHS non-0 signums */ Int shift; /* shift needed to align operands */ uByte *ub, *uc; /* work */ + uInt uiwork; /* for macros */ /* buffers +2 if Quad (36 digits), need double plus 4 for safe padding */ uByte bufl[DECPMAX*2+QUAD*2+4]; /* for LHS coefficient + padding */ uByte bufr[DECPMAX*2+QUAD*2+4]; /* for RHS coefficient + padding */ @@ -3512,7 +3652,7 @@ static Int decNumCompare(const decFloat *dfl, const decFloat *dfr, Flag tot) { sigr=-sigl; /* sign to return if abs(RHS) wins */ if (DFISINF(dfl)) { - if (DFISINF(dfr)) return 0; /* both infinite & same sign */ + if (DFISINF(dfr)) return 0; /* both infinite & same sign */ return sigl; /* inf > n */ } if (DFISINF(dfr)) return sigr; /* n < inf [dfl is finite] */ @@ -3544,17 +3684,16 @@ static Int decNumCompare(const decFloat *dfl, const decFloat *dfr, Flag tot) { /* decode the coefficients */ /* (shift both right two if Quad to make a multiple of four) */ #if QUAD - ub=bufl; /* avoid type-pun violation */ - UINTAT(ub)=0; - uc=bufr; /* avoid type-pun violation */ - UINTAT(uc)=0; + UBFROMUI(bufl, 0); + UBFROMUI(bufr, 0); #endif GETCOEFF(dfl, bufl+QUAD*2); /* decode from decFloat */ GETCOEFF(dfr, bufr+QUAD*2); /* .. */ if (shift==0) { /* aligned; common and easy */ /* all multiples of four, here */ for (ub=bufl, uc=bufr; ub<bufl+DECPMAX+QUAD*2; ub+=4, uc+=4) { - if (UINTAT(ub)==UINTAT(uc)) continue; /* so far so same */ + uInt ui=UBTOUI(ub); + if (ui==UBTOUI(uc)) continue; /* so far so same */ /* about to find a winner; go by bytes in case little-endian */ for (;; ub++, uc++) { if (*ub>*uc) return sigl; /* difference found */ @@ -3565,17 +3704,17 @@ static Int decNumCompare(const decFloat *dfl, const decFloat *dfr, Flag tot) { else if (shift>0) { /* lhs to left */ ub=bufl; /* RHS pointer */ /* pad bufl so right-aligned; most shifts will fit in 8 */ - UINTAT(bufl+DECPMAX+QUAD*2)=0; /* add eight zeros */ - UINTAT(bufl+DECPMAX+QUAD*2+4)=0; /* .. */ + UBFROMUI(bufl+DECPMAX+QUAD*2, 0); /* add eight zeros */ + UBFROMUI(bufl+DECPMAX+QUAD*2+4, 0); /* .. */ if (shift>8) { /* more than eight; fill the rest, and also worth doing the */ /* lead-in by fours */ - uByte *up; /* work */ + uByte *up; /* work */ uByte *upend=bufl+DECPMAX+QUAD*2+shift; - for (up=bufl+DECPMAX+QUAD*2+8; up<upend; up+=4) UINTAT(up)=0; + for (up=bufl+DECPMAX+QUAD*2+8; up<upend; up+=4) UBFROMUI(up, 0); /* [pads up to 36 in all for Quad] */ for (;; ub+=4) { - if (UINTAT(ub)!=0) return sigl; + if (UBTOUI(ub)!=0) return sigl; if (ub+4>bufl+shift-4) break; } } @@ -3585,7 +3724,8 @@ static Int decNumCompare(const decFloat *dfl, const decFloat *dfr, Flag tot) { /* comparison can go for the full length of bufr, which is a */ /* multiple of 4 bytes */ for (uc=bufr; ; uc+=4, ub+=4) { - if (UINTAT(uc)!=UINTAT(ub)) { /* mismatch found */ + uInt ui=UBTOUI(ub); + if (ui!=UBTOUI(uc)) { /* mismatch found */ for (;; uc++, ub++) { /* check from left [little-endian?] */ if (*ub>*uc) return sigl; /* difference found */ if (*ub<*uc) return sigr; /* .. */ @@ -3598,17 +3738,17 @@ static Int decNumCompare(const decFloat *dfl, const decFloat *dfr, Flag tot) { else { /* shift<0) .. RHS is to left of LHS; mirror shift>0 */ uc=bufr; /* RHS pointer */ /* pad bufr so right-aligned; most shifts will fit in 8 */ - UINTAT(bufr+DECPMAX+QUAD*2)=0; /* add eight zeros */ - UINTAT(bufr+DECPMAX+QUAD*2+4)=0; /* .. */ + UBFROMUI(bufr+DECPMAX+QUAD*2, 0); /* add eight zeros */ + UBFROMUI(bufr+DECPMAX+QUAD*2+4, 0); /* .. */ if (shift<-8) { /* more than eight; fill the rest, and also worth doing the */ /* lead-in by fours */ - uByte *up; /* work */ + uByte *up; /* work */ uByte *upend=bufr+DECPMAX+QUAD*2-shift; - for (up=bufr+DECPMAX+QUAD*2+8; up<upend; up+=4) UINTAT(up)=0; + for (up=bufr+DECPMAX+QUAD*2+8; up<upend; up+=4) UBFROMUI(up, 0); /* [pads up to 36 in all for Quad] */ for (;; uc+=4) { - if (UINTAT(uc)!=0) return sigr; + if (UBTOUI(uc)!=0) return sigr; if (uc+4>bufr-shift-4) break; } } @@ -3618,7 +3758,8 @@ static Int decNumCompare(const decFloat *dfl, const decFloat *dfr, Flag tot) { /* comparison can go for the full length of bufl, which is a */ /* multiple of 4 bytes */ for (ub=bufl; ; ub+=4, uc+=4) { - if (UINTAT(ub)!=UINTAT(uc)) { /* mismatch found */ + uInt ui=UBTOUI(ub); + if (ui!=UBTOUI(uc)) { /* mismatch found */ for (;; ub++, uc++) { /* check from left [little-endian?] */ if (*ub>*uc) return sigl; /* difference found */ if (*ub<*uc) return sigr; /* .. */ @@ -3639,10 +3780,10 @@ static Int decNumCompare(const decFloat *dfl, const decFloat *dfr, Flag tot) { /* ------------------------------------------------------------------ */ /* decToInt32 -- local routine to effect ToInteger conversions */ /* */ -/* df is the decFloat to convert */ +/* df is the decFloat to convert */ /* set is the context */ -/* rmode is the rounding mode to use */ -/* exact is 1 if Inexact should be signalled */ +/* rmode is the rounding mode to use */ +/* exact is 1 if Inexact should be signalled */ /* unsign is 1 if the result a uInt, 0 if an Int (cast to uInt) */ /* returns 32-bit result as a uInt */ /* */ @@ -3652,13 +3793,13 @@ static Int decNumCompare(const decFloat *dfl, const decFloat *dfr, Flag tot) { static uInt decToInt32(const decFloat *df, decContext *set, enum rounding rmode, Flag exact, Flag unsign) { Int exp; /* exponent */ - uInt sourhi, sourpen, sourlo; /* top word from source decFloat .. */ + uInt sourhi, sourpen, sourlo; /* top word from source decFloat .. */ uInt hi, lo; /* .. penultimate, least, etc. */ decFloat zero, result; /* work */ Int i; /* .. */ /* Start decoding the argument */ - sourhi=DFWORD(df, 0); /* top word */ + sourhi=DFWORD(df, 0); /* top word */ exp=DECCOMBEXP[sourhi>>26]; /* get exponent high bits (in place) */ if (EXPISSPECIAL(exp)) { /* is special? */ set->status|=DEC_Invalid_operation; /* signal */ @@ -3730,10 +3871,10 @@ static uInt decToInt32(const decFloat *df, decContext *set, /* decToIntegral -- local routine to effect ToIntegral value */ /* */ /* result gets the result */ -/* df is the decFloat to round */ +/* df is the decFloat to round */ /* set is the context */ -/* rmode is the rounding mode to use */ -/* exact is 1 if Inexact should be signalled */ +/* rmode is the rounding mode to use */ +/* exact is 1 if Inexact should be signalled */ /* returns result */ /* ------------------------------------------------------------------ */ static decFloat * decToIntegral(decFloat *result, const decFloat *df, @@ -3746,7 +3887,7 @@ static decFloat * decToIntegral(decFloat *result, const decFloat *df, decFloat zero; /* work */ /* Start decoding the argument */ - sourhi=DFWORD(df, 0); /* top word */ + sourhi=DFWORD(df, 0); /* top word */ exp=DECCOMBEXP[sourhi>>26]; /* get exponent high bits (in place) */ if (EXPISSPECIAL(exp)) { /* is special? */ @@ -3762,12 +3903,12 @@ static decFloat * decToIntegral(decFloat *result, const decFloat *df, if (exp>=0) return decCanonical(result, df); /* already integral */ - saveround=set->round; /* save rounding mode .. */ + saveround=set->round; /* save rounding mode .. */ savestatus=set->status; /* .. and status */ set->round=rmode; /* set mode */ decFloatZero(&zero); /* make 0E+0 */ decFloatQuantize(result, df, &zero, set); /* 'integrate'; cannot fail */ - set->round=saveround; /* restore rounding mode .. */ + set->round=saveround; /* restore rounding mode .. */ if (!exact) set->status=savestatus; /* .. and status, unless exact */ return result; } /* decToIntegral */ diff --git a/libdecnumber/decCommon.c b/libdecnumber/decCommon.c index fa16e792e66..845b9143d61 100644 --- a/libdecnumber/decCommon.c +++ b/libdecnumber/decCommon.c @@ -104,15 +104,15 @@ static decFloat * decFinalize(decFloat *, bcdnum *, decContext *); static Flag decBiStr(const char *, const char *, const char *); /* Macros and private tables; those which are not format-dependent */ -/* are only included if decQuad is being built. */ +/* are only included if decQuad is being built. */ /* ------------------------------------------------------------------ */ /* Combination field lookup tables (uInts to save measurable work) */ /* */ -/* DECCOMBEXP - 2 most-significant-bits of exponent (00, 01, or */ +/* DECCOMBEXP - 2 most-significant-bits of exponent (00, 01, or */ /* 10), shifted left for format, or DECFLOAT_Inf/NaN */ /* DECCOMBWEXP - The same, for the next-wider format (unless QUAD) */ -/* DECCOMBMSD - 4-bit most-significant-digit */ +/* DECCOMBMSD - 4-bit most-significant-digit */ /* [0 if the index is a special (Infinity or NaN)] */ /* DECCOMBFROM - 5-bit combination field from EXP top bits and MSD */ /* (placed in uInt so no shift is needed) */ @@ -123,7 +123,7 @@ static Flag decBiStr(const char *, const char *, const char *); /* DECCOMBFROM is indexed by expTopTwoBits*16 + msd */ /* */ /* DECCOMBMSD and DECCOMBFROM are not format-dependent and so are */ -/* only included once, when QUAD is being built */ +/* only included once, when QUAD is being built */ /* ------------------------------------------------------------------ */ static const uInt DECCOMBEXP[64]={ 0, 0, 0, 0, 0, 0, 0, 0, @@ -161,7 +161,7 @@ static const uInt DECCOMBWEXP[64]={ #if QUAD const uInt DECCOMBMSD[64]={ 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 9, 8, 9, 0, 1, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 9, 8, 9, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 9, 8, 9, 0, 0}; @@ -223,7 +223,7 @@ static Flag decBiStr(const char *targ, const char *str1, const char *str2) { /* returns df */ /* */ /* The num descriptor may point to a bcd8 string of any length; this */ -/* string may have leading insignificant zeros. If it has more than */ +/* string may have leading insignificant zeros. If it has more than */ /* DECPMAX digits then the final digit can be a round-for-reround */ /* digit (i.e., it may include a sticky bit residue). */ /* */ @@ -248,8 +248,9 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num, decContext *set) { uByte *ub; /* work */ uInt dpd; /* .. */ - uByte *umsd=num->msd; /* local copy */ - uByte *ulsd=num->lsd; /* .. */ + uInt uiwork; /* for macros */ + uByte *umsd=num->msd; /* local copy */ + uByte *ulsd=num->lsd; /* .. */ uInt encode; /* encoding accumulator */ Int length; /* coefficient length */ @@ -275,11 +276,11 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num, length=(uInt)(ulsd-umsd+1); /* coefficient length */ if (!NUMISSPECIAL(num)) { - Int drop; /* digits to be dropped */ + Int drop; /* digits to be dropped */ /* skip leading insignificant zeros to calculate an exact length */ /* [this is quite expensive] */ if (*umsd==0) { - for (; UINTAT(umsd)==0 && umsd+3<ulsd;) umsd+=4; + for (; umsd+3<ulsd && UBTOUI(umsd)==0;) umsd+=4; for (; *umsd==0 && umsd<ulsd;) umsd++; length=ulsd-umsd+1; /* recalculate */ } @@ -305,12 +306,12 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num, roundat=umsd+length-drop; reround=*roundat; for (ub=roundat+1; ub<=ulsd; ub++) { - if (*ub!=0) { /* non-zero to be discarded */ + if (*ub!=0) { /* non-zero to be discarded */ reround=DECSTICKYTAB[reround]; /* apply sticky bit */ break; /* [remainder don't-care] */ } } /* check stickies */ - ulsd=roundat-1; /* new LSD */ + ulsd=roundat-1; /* new LSD */ } else { /* edge case */ if (drop==length) { @@ -322,7 +323,7 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num, reround=0; } for (ub=roundat+1; ub<=ulsd; ub++) { - if (*ub!=0) { /* non-zero to be discarded */ + if (*ub!=0) { /* non-zero to be discarded */ reround=DECSTICKYTAB[reround]; /* apply sticky bit */ break; /* [remainder don't-care] */ } @@ -331,7 +332,7 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num, ulsd=umsd; /* .. */ } - if (reround!=0) { /* discarding non-zero */ + if (reround!=0) { /* discarding non-zero */ uInt bump=0; set->status|=DEC_Inexact; /* if adjusted exponent [exp+digits-1] is < EMIN then num is */ @@ -342,7 +343,7 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num, /* next decide whether increment of the coefficient is needed */ if (set->round==DEC_ROUND_HALF_EVEN) { /* fastpath slowest case */ if (reround>5) bump=1; /* >0.5 goes up */ - else if (reround==5) /* exactly 0.5000 .. */ + else if (reround==5) /* exactly 0.5000 .. */ bump=*ulsd & 0x01; /* .. up iff [new] lsd is odd */ } /* r-h-e */ else switch (set->round) { @@ -382,13 +383,15 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num, #endif break;} } /* switch (not r-h-e) */ - /* printf("ReRound: %ld bump: %ld\n", (LI)reround, (LI)bump); */ + /* printf("ReRound: %ld bump: %ld\n", (LI)reround, (LI)bump); */ if (bump!=0) { /* need increment */ /* increment the coefficient; this might end up with 1000... */ /* (after the all nines case) */ ub=ulsd; - for(; ub-3>=umsd && UINTAT(ub-3)==0x09090909; ub-=4) UINTAT(ub-3)=0; + for(; ub-3>=umsd && UBTOUI(ub-3)==0x09090909; ub-=4) { + UBFROMUI(ub-3, 0); /* to 00000000 */ + } /* [note ub could now be to left of msd, and it is not safe */ /* to write to the the left of the msd] */ /* now at most 3 digits left to non-9 (usually just the one) */ @@ -436,7 +439,7 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num, else if ((num->exponent+length-1)>DECEMAX) { /* > Nmax */ /* Overflow -- these could go straight to encoding, here, but */ /* instead num is adjusted to keep the code cleaner */ - Flag needmax=0; /* 1 for finite result */ + Flag needmax=0; /* 1 for finite result */ set->status|=(DEC_Overflow | DEC_Inexact); switch (set->round) { case DEC_ROUND_DOWN: { @@ -453,12 +456,12 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num, break;} /* r-f */ default: break; /* Infinity in all other cases */ } - if (!needmax) { /* easy .. set Infinity */ + if (!needmax) { /* easy .. set Infinity */ num->exponent=DECFLOAT_Inf; *umsd=0; /* be clean: coefficient to 0 */ ulsd=umsd; /* .. */ } - else { /* return Nmax */ + else { /* return Nmax */ umsd=allnines; /* use constant array */ ulsd=allnines+DECPMAX-1; num->exponent=DECEMAX-(DECPMAX-1); @@ -475,8 +478,8 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num, uByte *t=buffer; /* safe target */ uByte *tlsd=buffer+(ulsd-umsd)+shift; /* target LSD */ /* printf("folddown shift=%ld\n", (LI)shift); */ - for (; s<=ulsd; s+=4, t+=4) UINTAT(t)=UINTAT(s); - for (t=tlsd-shift+1; t<=tlsd; t+=4) UINTAT(t)=0; /* pad */ + for (; s<=ulsd; s+=4, t+=4) UBFROMUI(t, UBTOUI(s)); + for (t=tlsd-shift+1; t<=tlsd; t+=4) UBFROMUI(t, 0); /* pad 0s */ num->exponent-=shift; umsd=buffer; ulsd=tlsd; @@ -492,23 +495,23 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num, /*------------------------------------------------------------------*/ /* Following code does not alter coefficient (could be allnines array) */ + /* fast path possible when DECPMAX digits */ if (length==DECPMAX) { return decFloatFromBCD(df, num->exponent, umsd, num->sign); - } + } /* full-length */ - /* Here when length is short */ + /* slower path when not a full-length number; must care about length */ + /* [coefficient length here will be < DECPMAX] */ if (!NUMISSPECIAL(num)) { /* is still finite */ /* encode the combination field and exponent continuation */ uInt uexp=(uInt)(num->exponent+DECBIAS); /* biased exponent */ uInt code=(uexp>>DECECONL)<<4; /* top two bits of exp */ - /* [msd=0] */ + /* [msd==0] */ /* look up the combination field and make high word */ encode=DECCOMBFROM[code]; /* indexed by (0-2)*16+msd */ encode|=(uexp<<(32-6-DECECONL)) & 0x03ffffff; /* exponent continuation */ } else encode=num->exponent; /* special [already in word] */ - /* [coefficient length here will be < DECPMAX] */ - encode|=num->sign; /* add sign */ /* private macro to extract a declet, n (where 0<=n<DECLETS and 0 */ @@ -519,7 +522,7 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num, /* working pointer, uInt *ub. */ /* As not full-length then chances are there are many leading zeros */ /* [and there may be a partial triad] */ - #define getDPD(dpd, n) ub=ulsd-(3*(n))-2; \ + #define getDPDt(dpd, n) ub=ulsd-(3*(n))-2; \ if (ub<umsd-2) dpd=0; \ else if (ub>=umsd) dpd=BCD2DPD[(*ub*256)+(*(ub+1)*16)+*(ub+2)]; \ else {dpd=*(ub+2); if (ub+1==umsd) dpd+=*(ub+1)*16; dpd=BCD2DPD[dpd];} @@ -528,48 +531,48 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num, /* according to endianness; in all cases complete the sign word */ /* first */ #if DECPMAX==7 - getDPD(dpd, 1); + getDPDt(dpd, 1); encode|=dpd<<10; - getDPD(dpd, 0); + getDPDt(dpd, 0); encode|=dpd; DFWORD(df, 0)=encode; /* just the one word */ #elif DECPMAX==16 - getDPD(dpd, 4); encode|=dpd<<8; - getDPD(dpd, 3); encode|=dpd>>2; + getDPDt(dpd, 4); encode|=dpd<<8; + getDPDt(dpd, 3); encode|=dpd>>2; DFWORD(df, 0)=encode; encode=dpd<<30; - getDPD(dpd, 2); encode|=dpd<<20; - getDPD(dpd, 1); encode|=dpd<<10; - getDPD(dpd, 0); encode|=dpd; + getDPDt(dpd, 2); encode|=dpd<<20; + getDPDt(dpd, 1); encode|=dpd<<10; + getDPDt(dpd, 0); encode|=dpd; DFWORD(df, 1)=encode; #elif DECPMAX==34 - getDPD(dpd,10); encode|=dpd<<4; - getDPD(dpd, 9); encode|=dpd>>6; + getDPDt(dpd,10); encode|=dpd<<4; + getDPDt(dpd, 9); encode|=dpd>>6; DFWORD(df, 0)=encode; encode=dpd<<26; - getDPD(dpd, 8); encode|=dpd<<16; - getDPD(dpd, 7); encode|=dpd<<6; - getDPD(dpd, 6); encode|=dpd>>4; + getDPDt(dpd, 8); encode|=dpd<<16; + getDPDt(dpd, 7); encode|=dpd<<6; + getDPDt(dpd, 6); encode|=dpd>>4; DFWORD(df, 1)=encode; encode=dpd<<28; - getDPD(dpd, 5); encode|=dpd<<18; - getDPD(dpd, 4); encode|=dpd<<8; - getDPD(dpd, 3); encode|=dpd>>2; + getDPDt(dpd, 5); encode|=dpd<<18; + getDPDt(dpd, 4); encode|=dpd<<8; + getDPDt(dpd, 3); encode|=dpd>>2; DFWORD(df, 2)=encode; encode=dpd<<30; - getDPD(dpd, 2); encode|=dpd<<20; - getDPD(dpd, 1); encode|=dpd<<10; - getDPD(dpd, 0); encode|=dpd; + getDPDt(dpd, 2); encode|=dpd<<20; + getDPDt(dpd, 1); encode|=dpd<<10; + getDPDt(dpd, 0); encode|=dpd; DFWORD(df, 3)=encode; #endif /* printf("Status: %08lx\n", (LI)set->status); */ - /* decFloatShow(df, "final"); */ + /* decFloatShow(df, "final2"); */ return df; } /* decFinalize */ @@ -579,12 +582,12 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num, /* df is the target decFloat */ /* exp is the in-range unbiased exponent, q, or a special value in */ /* the form returned by decFloatGetExponent */ -/* bcdar holds DECPMAX digits to set the coefficient from, one */ +/* bcdar holds DECPMAX digits to set the coefficient from, one */ /* digit in each byte (BCD8 encoding); the first (MSD) is ignored */ /* if df is a NaN; all are ignored if df is infinite. */ -/* All bytes must be in 0-9; results undefined otherwise. */ +/* All bytes must be in 0-9; results are undefined otherwise. */ /* sig is DECFLOAT_Sign to set the sign bit, 0 otherwise */ -/* returns df, which will be canonical */ +/* returns df, which will be canonical */ /* */ /* No error is possible, and no status will be set. */ /* ------------------------------------------------------------------ */ @@ -609,53 +612,53 @@ decFloat * decFloatFromBCD(decFloat *df, Int exp, const uByte *bcdar, /* and put the corresponding DPD code into dpd. */ /* Use of a working pointer, uInt *ub, is assumed. */ - #define getDPDf(dpd, n) ub=bcdar+DECPMAX-1-(3*(n))-2; \ + #define getDPDb(dpd, n) ub=bcdar+DECPMAX-1-(3*(n))-2; \ dpd=BCD2DPD[(*ub*256)+(*(ub+1)*16)+*(ub+2)]; /* place the declets in the encoding words and copy to result (df), */ /* according to endianness; in all cases complete the sign word */ /* first */ #if DECPMAX==7 - getDPDf(dpd, 1); + getDPDb(dpd, 1); encode|=dpd<<10; - getDPDf(dpd, 0); + getDPDb(dpd, 0); encode|=dpd; DFWORD(df, 0)=encode; /* just the one word */ #elif DECPMAX==16 - getDPDf(dpd, 4); encode|=dpd<<8; - getDPDf(dpd, 3); encode|=dpd>>2; + getDPDb(dpd, 4); encode|=dpd<<8; + getDPDb(dpd, 3); encode|=dpd>>2; DFWORD(df, 0)=encode; encode=dpd<<30; - getDPDf(dpd, 2); encode|=dpd<<20; - getDPDf(dpd, 1); encode|=dpd<<10; - getDPDf(dpd, 0); encode|=dpd; + getDPDb(dpd, 2); encode|=dpd<<20; + getDPDb(dpd, 1); encode|=dpd<<10; + getDPDb(dpd, 0); encode|=dpd; DFWORD(df, 1)=encode; #elif DECPMAX==34 - getDPDf(dpd,10); encode|=dpd<<4; - getDPDf(dpd, 9); encode|=dpd>>6; + getDPDb(dpd,10); encode|=dpd<<4; + getDPDb(dpd, 9); encode|=dpd>>6; DFWORD(df, 0)=encode; encode=dpd<<26; - getDPDf(dpd, 8); encode|=dpd<<16; - getDPDf(dpd, 7); encode|=dpd<<6; - getDPDf(dpd, 6); encode|=dpd>>4; + getDPDb(dpd, 8); encode|=dpd<<16; + getDPDb(dpd, 7); encode|=dpd<<6; + getDPDb(dpd, 6); encode|=dpd>>4; DFWORD(df, 1)=encode; encode=dpd<<28; - getDPDf(dpd, 5); encode|=dpd<<18; - getDPDf(dpd, 4); encode|=dpd<<8; - getDPDf(dpd, 3); encode|=dpd>>2; + getDPDb(dpd, 5); encode|=dpd<<18; + getDPDb(dpd, 4); encode|=dpd<<8; + getDPDb(dpd, 3); encode|=dpd>>2; DFWORD(df, 2)=encode; encode=dpd<<30; - getDPDf(dpd, 2); encode|=dpd<<20; - getDPDf(dpd, 1); encode|=dpd<<10; - getDPDf(dpd, 0); encode|=dpd; + getDPDb(dpd, 2); encode|=dpd<<20; + getDPDb(dpd, 1); encode|=dpd<<10; + getDPDb(dpd, 0); encode|=dpd; DFWORD(df, 3)=encode; #endif - /* decFloatShow(df, "final"); */ + /* decFloatShow(df, "fromB"); */ return df; } /* decFloatFromBCD */ @@ -671,7 +674,7 @@ decFloat * decFloatFromBCD(decFloat *df, Int exp, const uByte *bcdar, /* and QUAD the first (pad) nibble is also ignored in all cases. */ /* All coefficient nibbles must be in 0-9 and sign in A-F; results */ /* are undefined otherwise. */ -/* returns df, which will be canonical */ +/* returns df, which will be canonical */ /* */ /* No error is possible, and no status will be set. */ /* ------------------------------------------------------------------ */ @@ -691,7 +694,7 @@ decFloat * decFloatFromPacked(decFloat *df, Int exp, const uByte *packed) { *op++=*ip>>4; *op++=(uByte)(*ip&0x0f); /* [final nibble is sign] */ } - op--; /* -> sign byte */ + op--; /* -> sign byte */ if (*op==DECPMINUS || *op==DECPMINUSALT) sig=DECFLOAT_Sign; if (EXPISSPECIAL(exp)) { /* Infinity or NaN */ @@ -702,7 +705,71 @@ decFloat * decFloatFromPacked(decFloat *df, Int exp, const uByte *packed) { } /* decFloatFromPacked */ /* ------------------------------------------------------------------ */ -/* decFloatFromString -- conversion from numeric string */ +/* decFloatFromPackedChecked -- set from exponent and packed; checked */ +/* */ +/* df is the target decFloat */ +/* exp is the in-range unbiased exponent, q, or a special value in */ +/* the form returned by decFloatGetExponent */ +/* packed holds DECPMAX packed decimal digits plus a sign nibble */ +/* (all 6 codes are OK); the first (MSD) must be 0 if df is a NaN */ +/* and all digits must be 0 if df is infinite. For DOUBLE and */ +/* QUAD the first (pad) nibble must be 0. */ +/* All coefficient nibbles must be in 0-9 and sign in A-F. */ +/* returns df, which will be canonical or NULL if any of the */ +/* requirements are not met (if this case df is unchanged); that */ +/* is, the input data must be as returned by decFloatToPacked, */ +/* except that all six sign codes are acccepted. */ +/* */ +/* No status will be set. */ +/* ------------------------------------------------------------------ */ +decFloat * decFloatFromPackedChecked(decFloat *df, Int exp, + const uByte *packed) { + uByte bcdar[DECPMAX+2]; /* work [+1 for pad, +1 for sign] */ + const uByte *ip; /* .. */ + uByte *op; /* .. */ + Int sig=0; /* sign */ + + /* expand coefficient and sign to BCDAR */ + #if SINGLE + op=bcdar+1; /* no pad digit */ + #else + op=bcdar; /* first (pad) digit here */ + #endif + for (ip=packed; ip<packed+((DECPMAX+2)/2); ip++) { + *op=*ip>>4; + if (*op>9) return NULL; + op++; + *op=(uByte)(*ip&0x0f); /* [final nibble is sign] */ + if (*op>9 && ip<packed+((DECPMAX+2)/2)-1) return NULL; + op++; + } + op--; /* -> sign byte */ + if (*op<=9) return NULL; /* bad sign */ + if (*op==DECPMINUS || *op==DECPMINUSALT) sig=DECFLOAT_Sign; + + #if !SINGLE + if (bcdar[0]!=0) return NULL; /* bad pad nibble */ + #endif + + if (EXPISNAN(exp)) { /* a NaN */ + if (bcdar[1]!=0) return NULL; /* bad msd */ + } /* NaN */ + else if (EXPISINF(exp)) { /* is infinite */ + Int i; + for (i=0; i<DECPMAX; i++) { + if (bcdar[i+1]!=0) return NULL; /* should be all zeros */ + } + } /* infinity */ + else { /* finite */ + /* check the exponent is in range */ + if (exp>DECEMAX-DECPMAX+1) return NULL; + if (exp<DECEMIN-DECPMAX+1) return NULL; + } + return decFloatFromBCD(df, exp, bcdar+1, sig); + } /* decFloatFromPacked */ + +/* ------------------------------------------------------------------ */ +/* decFloatFromString -- conversion from numeric string */ /* */ /* result is the decFloat format number which gets the result of */ /* the conversion */ @@ -710,12 +777,12 @@ decFloat * decFloatFromPacked(decFloat *df, Int exp, const uByte *packed) { /* number (which may be a special value), \0-terminated */ /* If there are too many significant digits in the */ /* coefficient it will be rounded. */ -/* set is the context */ +/* set is the context */ /* returns result */ /* */ /* The length of the coefficient and the size of the exponent are */ /* checked by this routine, so the correct error (Underflow or */ -/* Overflow) can be reported or rounding applied, as necessary. */ +/* Overflow) can be reported or rounding applied, as necessary. */ /* */ /* There is no limit to the coefficient length for finite inputs; */ /* NaN payloads must be integers with no more than DECPMAX-1 digits. */ @@ -726,20 +793,21 @@ decFloat * decFloatFromPacked(decFloat *df, Int exp, const uByte *packed) { decFloat * decFloatFromString(decFloat *result, const char *string, decContext *set) { Int digits; /* count of digits in coefficient */ - const char *dotchar=NULL; /* where dot was found [NULL if none] */ - const char *cfirst=string; /* -> first character of decimal part */ - const char *c; /* work */ + const char *dotchar=NULL; /* where dot was found [NULL if none] */ + const char *cfirst=string; /* -> first character of decimal part */ + const char *c; /* work */ uByte *ub; /* .. */ + uInt uiwork; /* for macros */ bcdnum num; /* collects data for finishing */ uInt error=DEC_Conversion_syntax; /* assume the worst */ - uByte buffer[ROUNDUP(DECSTRING+11, 8)]; /* room for most coefficents, */ + uByte buffer[ROUNDUP(DECSTRING+11, 8)]; /* room for most coefficents, */ /* some common rounding, +3, & pad */ #if DECTRACE /* printf("FromString %s ...\n", string); */ #endif for(;;) { /* once-only 'loop' */ - num.sign=0; /* assume non-negative */ + num.sign=0; /* assume non-negative */ num.msd=buffer; /* MSD is here always */ /* detect and validate the coefficient, including any leading, */ @@ -810,7 +878,7 @@ decFloat * decFloatFromString(decFloat *result, const char *string, exp-=(Int)(clast-dotchar); /* adjust exponent */ /* [the '.' can now be ignored] */ } - num.exponent=exp; /* exponent is good; store it */ + num.exponent=exp; /* exponent is good; store it */ /* Here when whole string has been inspected and syntax is good */ /* cfirst->first digit or dot, clast->last digit or dot */ @@ -832,8 +900,8 @@ decFloat * decFloatFromString(decFloat *result, const char *string, /* as usual, go by fours when safe; NB it has been asserted */ /* that a '.' does not have the same mask as a digit */ if (c<=clast-3 /* safe for four */ - && (UINTAT(c)&0xf0f0f0f0)==CHARMASK) { /* test four */ - UINTAT(ub)=UINTAT(c)&0x0f0f0f0f; /* to BCD8 */ + && (UBTOUI(c)&0xf0f0f0f0)==CHARMASK) { /* test four */ + UBFROMUI(ub, UBTOUI(c)&0x0f0f0f0f); /* to BCD8 */ ub+=4; c+=4; continue; @@ -846,7 +914,7 @@ decFloat * decFloatFromString(decFloat *result, const char *string, } } /* had dot */ /* Now no dot; do this by fours (where safe) */ - for (; c<=clast-3; c+=4, ub+=4) UINTAT(ub)=UINTAT(c)&0x0f0f0f0f; + for (; c<=clast-3; c+=4, ub+=4) UBFROMUI(ub, UBTOUI(c)&0x0f0f0f0f); for (; c<=clast; c++, ub++) *ub=(uByte)(*c-'0'); num.lsd=buffer+digits-1; /* record new LSD */ } /* fits */ @@ -857,7 +925,7 @@ decFloat * decFloatFromString(decFloat *result, const char *string, if (*cfirst=='.') cfirst++; /* step past dot at start */ if (*cfirst=='0') { /* [cfirst always -> digit] */ for (; cfirst<clast; cfirst++) { - if (*cfirst!='0') { /* non-zero found */ + if (*cfirst!='0') { /* non-zero found */ if (*cfirst=='.') continue; /* [ignore] */ break; /* done */ } @@ -871,8 +939,8 @@ decFloat * decFloatFromString(decFloat *result, const char *string, for (c=cfirst; c<=clast && ub<=buffer+DECPMAX; c++) { /* (see commentary just above) */ if (c<=clast-3 /* safe for four */ - && (UINTAT(c)&0xf0f0f0f0)==CHARMASK) { /* four digits */ - UINTAT(ub)=UINTAT(c)&0x0f0f0f0f; /* to BCD8 */ + && (UBTOUI(c)&0xf0f0f0f0)==CHARMASK) { /* four digits */ + UBFROMUI(ub, UBTOUI(c)&0x0f0f0f0f); /* to BCD8 */ ub+=4; c+=3; /* [will become 4] */ continue; @@ -881,7 +949,7 @@ decFloat * decFloatFromString(decFloat *result, const char *string, *ub++=(uByte)(*c-'0'); } ub--; /* -> LSD */ - for (; c<=clast; c++) { /* inspect remaining chars */ + for (; c<=clast; c++) { /* inspect remaining chars */ if (*c!='0') { /* sticky bit needed */ if (*c=='.') continue; /* [ignore] */ *ub=DECSTICKYTAB[*ub]; /* update round-for-reround */ @@ -925,7 +993,7 @@ decFloat * decFloatFromString(decFloat *result, const char *string, *ub=(uByte)(*c-'0'); /* good bcd8 */ } if (*c!='\0') break; /* not all digits, or too many */ - num.lsd=ub-1; /* record new LSD */ + num.lsd=ub-1; /* record new LSD */ } } /* NaN or sNaN */ error=0; /* syntax is OK */ @@ -938,8 +1006,8 @@ decFloat * decFloatFromString(decFloat *result, const char *string, if (error!=0) { set->status|=error; - num.exponent=DECFLOAT_qNaN; /* set up quiet NaN */ - num.sign=0; /* .. with 0 sign */ + num.exponent=DECFLOAT_qNaN; /* set up quiet NaN */ + num.sign=0; /* .. with 0 sign */ buffer[0]=0; /* .. and coefficient */ num.lsd=buffer; /* .. */ /* decShowNum(&num, "oops"); */ @@ -957,7 +1025,7 @@ decFloat * decFloatFromString(decFloat *result, const char *string, /* result is the decFloat format number which gets the result of */ /* the conversion */ /* wider is the decFloatWider format number which will be narrowed */ -/* set is the context */ +/* set is the context */ /* returns result */ /* */ /* Narrowing can cause rounding, overflow, etc., but not Invalid */ @@ -968,7 +1036,7 @@ decFloat * decFloatFromString(decFloat *result, const char *string, decFloat * decFloatFromWider(decFloat *result, const decFloatWider *wider, decContext *set) { bcdnum num; /* collects data for finishing */ - uByte bcdar[DECWPMAX]; /* room for wider coefficient */ + uByte bcdar[DECWPMAX]; /* room for wider coefficient */ uInt widerhi=DFWWORD(wider, 0); /* top word */ Int exp; @@ -979,7 +1047,7 @@ decFloat * decFloatFromWider(decFloat *result, const decFloatWider *wider, num.sign=widerhi&0x80000000; /* extract sign [DECFLOAT_Sign=Neg] */ /* decode the wider combination field to exponent */ - exp=DECCOMBWEXP[widerhi>>26]; /* decode from wider combination field */ + exp=DECCOMBWEXP[widerhi>>26]; /* decode from wider combination field */ /* if it is a special there's nothing to do unless sNaN; if it's */ /* finite then add the (wider) exponent continuation and unbias */ if (EXPISSPECIAL(exp)) exp=widerhi&0x7e000000; /* include sNaN selector */ @@ -1001,7 +1069,7 @@ decFloat * decFloatFromWider(decFloat *result, const decFloatWider *wider, /* returns the sign of the coefficient (DECFLOAT_Sign if negative, */ /* 0 otherwise) */ /* */ -/* No error is possible, and no status will be set. If df is a */ +/* No error is possible, and no status will be set. If df is a */ /* special value the array is set to zeros (for Infinity) or to the */ /* payload of a qNaN or sNaN. */ /* ------------------------------------------------------------------ */ @@ -1015,12 +1083,12 @@ Int decFloatGetCoefficient(const decFloat *df, uByte *bcdar) { } /* decFloatGetCoefficient */ /* ------------------------------------------------------------------ */ -/* decFloatGetExponent -- get unbiased exponent */ +/* decFloatGetExponent -- get unbiased exponent */ /* */ /* df is the decFloat from which to extract the exponent */ /* returns the exponent, q. */ /* */ -/* No error is possible, and no status will be set. If df is a */ +/* No error is possible, and no status will be set. If df is a */ /* special value the first seven bits of the decFloat are returned, */ /* left adjusted and with the first (sign) bit set to 0 (followed by */ /* 25 0 bits). e.g., -sNaN would return 0x7e000000 (DECFLOAT_sNaN). */ @@ -1034,11 +1102,11 @@ Int decFloatGetExponent(const decFloat *df) { /* decFloatSetCoefficient -- set coefficient from BCD8 */ /* */ /* df is the target decFloat (and source of exponent/special value) */ -/* bcdar holds DECPMAX digits to set the coefficient from, one */ +/* bcdar holds DECPMAX digits to set the coefficient from, one */ /* digit in each byte (BCD8 encoding); the first (MSD) is ignored */ /* if df is a NaN; all are ignored if df is infinite. */ /* sig is DECFLOAT_Sign to set the sign bit, 0 otherwise */ -/* returns df, which will be canonical */ +/* returns df, which will be canonical */ /* */ /* No error is possible, and no status will be set. */ /* ------------------------------------------------------------------ */ @@ -1060,18 +1128,18 @@ decFloat * decFloatSetCoefficient(decFloat *df, const uByte *bcdar, } /* decFloatSetCoefficient */ /* ------------------------------------------------------------------ */ -/* decFloatSetExponent -- set exponent or special value */ +/* decFloatSetExponent -- set exponent or special value */ /* */ /* df is the target decFloat (and source of coefficient/payload) */ /* set is the context for reporting status */ /* exp is the unbiased exponent, q, or a special value in the form */ /* returned by decFloatGetExponent */ -/* returns df, which will be canonical */ +/* returns df, which will be canonical */ /* */ -/* No error is possible, but Overflow or Underflow might occur. */ +/* No error is possible, but Overflow or Underflow might occur. */ /* ------------------------------------------------------------------ */ decFloat * decFloatSetExponent(decFloat *df, decContext *set, Int exp) { - uByte bcdcopy[DECPMAX]; /* for coefficient */ + uByte bcdcopy[DECPMAX]; /* for coefficient */ bcdnum num; /* work */ num.exponent=exp; num.sign=decFloatGetCoefficient(df, bcdcopy); /* extract coefficient */ @@ -1095,15 +1163,15 @@ uInt decFloatRadix(const decFloat *df) { } /* decFloatRadix */ /* ------------------------------------------------------------------ */ -/* decFloatShow -- printf a decFloat in hexadecimal and decimal */ -/* df is the decFloat to show */ +/* decFloatShow -- printf a decFloat in hexadecimal and decimal */ +/* df is the decFloat to show */ /* tag is a tag string displayed with the number */ /* */ /* This is a debug aid; the precise format of the string may change. */ /* ------------------------------------------------------------------ */ void decFloatShow(const decFloat *df, const char *tag) { char hexbuf[DECBYTES*2+DECBYTES/4+1]; /* NB blank after every fourth */ - char buff[DECSTRING]; /* for value in decimal */ + char buff[DECSTRING]; /* for value in decimal */ Int i, j=0; for (i=0; i<DECBYTES; i++) { @@ -1126,7 +1194,7 @@ void decFloatShow(const decFloat *df, const char *tag) { /* */ /* df is the source decFloat */ /* exp will be set to the unbiased exponent, q, or to a special */ -/* value in the form returned by decFloatGetExponent */ +/* value in the form returned by decFloatGetExponent */ /* bcdar is where DECPMAX bytes will be written, one BCD digit in */ /* each byte (BCD8 encoding); if df is a NaN the first byte will */ /* be zero, and if it is infinite they will all be zero */ @@ -1156,7 +1224,7 @@ Int decFloatToBCD(const decFloat *df, Int *exp, uByte *bcdar) { /* ------------------------------------------------------------------ */ /* decFloatToEngString -- conversion to numeric string, engineering */ /* */ -/* df is the decFloat format number to convert */ +/* df is the decFloat format number to convert */ /* string is the string where the result will be laid out */ /* */ /* string must be at least DECPMAX+9 characters (the worst case is */ @@ -1169,11 +1237,14 @@ char * decFloatToEngString(const decFloat *df, char *string){ uInt msd; /* coefficient MSD */ Int exp; /* exponent top two bits or full */ uInt comb; /* combination field */ - char *cstart; /* coefficient start */ + char *cstart; /* coefficient start */ char *c; /* output pointer in string */ char *s, *t; /* .. (source, target) */ Int pre, e; /* work */ const uByte *u; /* .. */ + uInt uiwork; /* for macros [one compiler needs */ + /* volatile here to avoid bug, but */ + /* that doubles execution time] */ /* Source words; macro handles endianness */ uInt sourhi=DFWORD(df, 0); /* word with sign */ @@ -1188,12 +1259,12 @@ char * decFloatToEngString(const decFloat *df, char *string){ c=string; /* where result will go */ if (((Int)sourhi)<0) *c++='-'; /* handle sign */ comb=sourhi>>26; /* sign+combination field */ - msd=DECCOMBMSD[comb]; /* decode the combination field */ - exp=DECCOMBEXP[comb]; /* .. */ + msd=DECCOMBMSD[comb]; /* decode the combination field */ + exp=DECCOMBEXP[comb]; /* .. */ if (EXPISSPECIAL(exp)) { /* special */ if (exp==DECFLOAT_Inf) { /* infinity */ - strcpy(c, "Inf"); + strcpy(c, "Inf"); strcpy(c+3, "inity"); return string; /* easy */ } @@ -1225,44 +1296,44 @@ char * decFloatToEngString(const decFloat *df, char *string){ /* are the three encoded BCD8 digits followed by a 1-byte length */ /* (significant digits, except that 000 has length 0). This allows */ /* us to left-align the first declet with non-zero content, then */ - /* the remaining ones are full 3-char length. Fixed-length copies */ + /* the remaining ones are full 3-char length. Fixed-length copies */ /* are used because variable-length memcpy causes a subroutine call */ - /* in at least two compilers. (The copies are length 4 for speed */ + /* in at least two compilers. (The copies are length 4 for speed */ /* and are safe because the last item in the array is of length */ /* three and has the length byte following.) */ #define dpd2char(dpdin) u=&DPD2BCD8[((dpdin)&0x3ff)*4]; \ - if (c!=cstart) {UINTAT(c)=UINTAT(u)|CHARMASK; c+=3;} \ + if (c!=cstart) {UBFROMUI(c, UBTOUI(u)|CHARMASK); c+=3;} \ else if (*(u+3)) { \ - UINTAT(c)=UINTAT(u+3-*(u+3))|CHARMASK; c+=*(u+3);} + UBFROMUI(c, UBTOUI(u+3-*(u+3))|CHARMASK); c+=*(u+3);} #if DECPMAX==7 - dpd2char(sourhi>>10); /* declet 1 */ + dpd2char(sourhi>>10); /* declet 1 */ dpd2char(sourhi); /* declet 2 */ #elif DECPMAX==16 dpd2char(sourhi>>8); /* declet 1 */ dpd2char((sourhi<<2) | (sourlo>>30)); /* declet 2 */ - dpd2char(sourlo>>20); /* declet 3 */ - dpd2char(sourlo>>10); /* declet 4 */ + dpd2char(sourlo>>20); /* declet 3 */ + dpd2char(sourlo>>10); /* declet 4 */ dpd2char(sourlo); /* declet 5 */ #elif DECPMAX==34 dpd2char(sourhi>>4); /* declet 1 */ dpd2char((sourhi<<6) | (sourmh>>26)); /* declet 2 */ - dpd2char(sourmh>>16); /* declet 3 */ + dpd2char(sourmh>>16); /* declet 3 */ dpd2char(sourmh>>6); /* declet 4 */ dpd2char((sourmh<<4) | (sourml>>28)); /* declet 5 */ - dpd2char(sourml>>18); /* declet 6 */ + dpd2char(sourml>>18); /* declet 6 */ dpd2char(sourml>>8); /* declet 7 */ dpd2char((sourml<<2) | (sourlo>>30)); /* declet 8 */ - dpd2char(sourlo>>20); /* declet 9 */ - dpd2char(sourlo>>10); /* declet 10 */ + dpd2char(sourlo>>20); /* declet 9 */ + dpd2char(sourlo>>10); /* declet 10 */ dpd2char(sourlo); /* declet 11 */ #endif if (c==cstart) *c++='0'; /* all zeros, empty -- make "0" */ - if (exp==0) { /* integer or NaN case -- easy */ + if (exp==0) { /* integer or NaN case -- easy */ *c='\0'; /* terminate */ return string; } @@ -1275,7 +1346,7 @@ char * decFloatToEngString(const decFloat *df, char *string){ if (exp>0 || pre<-5) { /* need exponential form */ e=pre-1; /* calculate E value */ pre=1; /* assume one digit before '.' */ - if (e!=0) { /* engineering: may need to adjust */ + if (e!=0) { /* engineering: may need to adjust */ Int adj; /* adjustment */ /* The C remainder operator is undefined for negative numbers, so */ /* a positive remainder calculation must be used here */ @@ -1310,8 +1381,8 @@ char * decFloatToEngString(const decFloat *df, char *string){ /* because there is still space for exponent */ s=dotat+ROUNDDOWN4(c-dotat); /* source */ t=s+1; /* target */ - /* open the gap */ - for (; s>=dotat; s-=4, t-=4) UINTAT(t)=UINTAT(s); + /* open the gap [cannot use memcpy] */ + for (; s>=dotat; s-=4, t-=4) UBFROMUI(t, UBTOUI(s)); *dotat='.'; c++; /* length increased by one */ } /* need dot? */ @@ -1321,24 +1392,24 @@ char * decFloatToEngString(const decFloat *df, char *string){ /* -5<=pre<=0: here for plain 0.ddd or 0.000ddd forms (may have E, but only for 0.00E+3 kind of case -- with plenty of spare space in this case */ - pre=-pre+2; /* gap width, including "0." */ + pre=-pre+2; /* gap width, including "0." */ t=cstart+ROUNDDOWN4(c-cstart)+pre; /* preferred first target point */ /* backoff if too far to the right */ if (t>string+DECSTRING-5) t=string+DECSTRING-5; /* adjust to fit */ /* now shift the entire coefficient to the right, being careful not */ - /* to access to the left of string */ - for (s=t-pre; s>=string; s-=4, t-=4) UINTAT(t)=UINTAT(s); + /* to access to the left of string [cannot use memcpy] */ + for (s=t-pre; s>=string; s-=4, t-=4) UBFROMUI(t, UBTOUI(s)); /* for Quads and Singles there may be a character or two left... */ s+=3; /* where next would come from */ for(; s>=cstart; s--, t--) *(t+3)=*(s); /* now have fill 0. through 0.00000; use overlaps to avoid tests */ if (pre>=4) { - UINTAT(cstart+pre-4)=UINTAT("0000"); - UINTAT(cstart)=UINTAT("0.00"); + memcpy(cstart+pre-4, "0000", 4); + memcpy(cstart, "0.00", 4); } else { /* 2 or 3 */ *(cstart+pre-1)='0'; - USHORTAT(cstart)=USHORTAT("0."); + memcpy(cstart, "0.", 2); } c+=pre; /* to end */ } @@ -1346,7 +1417,7 @@ char * decFloatToEngString(const decFloat *df, char *string){ /* finally add the E-part, if needed; it will never be 0, and has */ /* a maximum length of 3 or 4 digits (asserted above) */ if (e!=0) { - USHORTAT(c)=USHORTAT("E+"); /* starts with E, assume + */ + memcpy(c, "E+", 2); /* starts with E, assume + */ c++; if (e<0) { *c='-'; /* oops, need '-' */ @@ -1355,15 +1426,15 @@ char * decFloatToEngString(const decFloat *df, char *string){ c++; /* Three-character exponents are easy; 4-character a little trickier */ #if DECEMAXD<=3 - u=&BIN2BCD8[e*4]; /* -> 3 digits + length byte */ + u=&BIN2BCD8[e*4]; /* -> 3 digits + length byte */ /* copy fixed 4 characters [is safe], starting at non-zero */ /* and with character mask to convert BCD to char */ - UINTAT(c)=UINTAT(u+3-*(u+3))|CHARMASK; + UBFROMUI(c, UBTOUI(u+3-*(u+3))|CHARMASK); c+=*(u+3); /* bump pointer appropriately */ #elif DECEMAXD==4 if (e<1000) { /* 3 (or fewer) digits case */ u=&BIN2BCD8[e*4]; /* -> 3 digits + length byte */ - UINTAT(c)=UINTAT(u+3-*(u+3))|CHARMASK; /* [as above] */ + UBFROMUI(c, UBTOUI(u+3-*(u+3))|CHARMASK); /* [as above] */ c+=*(u+3); /* bump pointer appropriately */ } else { /* 4-digits */ @@ -1371,7 +1442,7 @@ char * decFloatToEngString(const decFloat *df, char *string){ Int rem=e-(1000*thou); /* e%1000 */ *c++=(char)('0'+(char)thou); /* the thousands digit */ u=&BIN2BCD8[rem*4]; /* -> 3 digits + length byte */ - UINTAT(c)=UINTAT(u)|CHARMASK; /* copy fixed 3+1 characters [is safe] */ + UBFROMUI(c, UBTOUI(u)|CHARMASK);/* copy fixed 3+1 characters [is safe] */ c+=3; /* bump pointer, always 3 digits */ } #endif @@ -1386,7 +1457,7 @@ char * decFloatToEngString(const decFloat *df, char *string){ /* */ /* df is the source decFloat */ /* exp will be set to the unbiased exponent, q, or to a special */ -/* value in the form returned by decFloatGetExponent */ +/* value in the form returned by decFloatGetExponent */ /* packed is where DECPMAX nibbles will be written with the sign as */ /* final nibble (0x0c for +, 0x0d for -); a NaN has a first nibble */ /* of zero, and an infinity is all zeros. decDouble and decQuad */ @@ -1432,7 +1503,7 @@ Int decFloatToPacked(const decFloat *df, Int *exp, uByte *packed) { /* ------------------------------------------------------------------ */ /* decFloatToString -- conversion to numeric string */ /* */ -/* df is the decFloat format number to convert */ +/* df is the decFloat format number to convert */ /* string is the string where the result will be laid out */ /* */ /* string must be at least DECPMAX+9 characters (the worst case is */ @@ -1445,11 +1516,14 @@ char * decFloatToString(const decFloat *df, char *string){ uInt msd; /* coefficient MSD */ Int exp; /* exponent top two bits or full */ uInt comb; /* combination field */ - char *cstart; /* coefficient start */ + char *cstart; /* coefficient start */ char *c; /* output pointer in string */ char *s, *t; /* .. (source, target) */ Int pre, e; /* work */ const uByte *u; /* .. */ + uInt uiwork; /* for macros [one compiler needs */ + /* volatile here to avoid bug, but */ + /* that doubles execution time] */ /* Source words; macro handles endianness */ uInt sourhi=DFWORD(df, 0); /* word with sign */ @@ -1464,10 +1538,14 @@ char * decFloatToString(const decFloat *df, char *string){ c=string; /* where result will go */ if (((Int)sourhi)<0) *c++='-'; /* handle sign */ comb=sourhi>>26; /* sign+combination field */ - msd=DECCOMBMSD[comb]; /* decode the combination field */ - exp=DECCOMBEXP[comb]; /* .. */ + msd=DECCOMBMSD[comb]; /* decode the combination field */ + exp=DECCOMBEXP[comb]; /* .. */ - if (EXPISSPECIAL(exp)) { /* special */ + if (!EXPISSPECIAL(exp)) { /* finite */ + /* complete exponent; top two bits are in place */ + exp+=GETECON(df)-DECBIAS; /* .. + continuation and unbias */ + } + else { /* IS special */ if (exp==DECFLOAT_Inf) { /* infinity */ strcpy(c, "Infinity"); return string; /* easy */ @@ -1487,9 +1565,6 @@ char * decFloatToString(const decFloat *df, char *string){ /* otherwise drop through to add integer; set correct exp etc. */ exp=0; msd=0; /* setup for following code */ } - else { /* complete exponent; top two bits are in place */ - exp+=GETECON(df)-DECBIAS; /* .. + continuation and unbias */ - } /* convert the digits of the significand to characters */ cstart=c; /* save start of coefficient */ @@ -1500,38 +1575,38 @@ char * decFloatToString(const decFloat *df, char *string){ /* are the three encoded BCD8 digits followed by a 1-byte length */ /* (significant digits, except that 000 has length 0). This allows */ /* us to left-align the first declet with non-zero content, then */ - /* the remaining ones are full 3-char length. Fixed-length copies */ + /* the remaining ones are full 3-char length. Fixed-length copies */ /* are used because variable-length memcpy causes a subroutine call */ - /* in at least two compilers. (The copies are length 4 for speed */ + /* in at least two compilers. (The copies are length 4 for speed */ /* and are safe because the last item in the array is of length */ /* three and has the length byte following.) */ #define dpd2char(dpdin) u=&DPD2BCD8[((dpdin)&0x3ff)*4]; \ - if (c!=cstart) {UINTAT(c)=UINTAT(u)|CHARMASK; c+=3;} \ + if (c!=cstart) {UBFROMUI(c, UBTOUI(u)|CHARMASK); c+=3;} \ else if (*(u+3)) { \ - UINTAT(c)=UINTAT(u+3-*(u+3))|CHARMASK; c+=*(u+3);} + UBFROMUI(c, UBTOUI(u+3-*(u+3))|CHARMASK); c+=*(u+3);} #if DECPMAX==7 - dpd2char(sourhi>>10); /* declet 1 */ + dpd2char(sourhi>>10); /* declet 1 */ dpd2char(sourhi); /* declet 2 */ #elif DECPMAX==16 dpd2char(sourhi>>8); /* declet 1 */ dpd2char((sourhi<<2) | (sourlo>>30)); /* declet 2 */ - dpd2char(sourlo>>20); /* declet 3 */ - dpd2char(sourlo>>10); /* declet 4 */ + dpd2char(sourlo>>20); /* declet 3 */ + dpd2char(sourlo>>10); /* declet 4 */ dpd2char(sourlo); /* declet 5 */ #elif DECPMAX==34 dpd2char(sourhi>>4); /* declet 1 */ dpd2char((sourhi<<6) | (sourmh>>26)); /* declet 2 */ - dpd2char(sourmh>>16); /* declet 3 */ + dpd2char(sourmh>>16); /* declet 3 */ dpd2char(sourmh>>6); /* declet 4 */ dpd2char((sourmh<<4) | (sourml>>28)); /* declet 5 */ - dpd2char(sourml>>18); /* declet 6 */ + dpd2char(sourml>>18); /* declet 6 */ dpd2char(sourml>>8); /* declet 7 */ dpd2char((sourml<<2) | (sourlo>>30)); /* declet 8 */ - dpd2char(sourlo>>20); /* declet 9 */ - dpd2char(sourlo>>10); /* declet 10 */ + dpd2char(sourlo>>20); /* declet 9 */ + dpd2char(sourlo>>10); /* declet 10 */ dpd2char(sourlo); /* declet 11 */ #endif @@ -1556,12 +1631,13 @@ char * decFloatToString(const decFloat *df, char *string){ if (pre>0) { /* ddd.ddd (plain), perhaps with E */ char *dotat=cstart+pre; if (dotat<c) { /* if embedded dot needed... */ + /* [memmove is a disaster, here] */ /* move by fours; there must be space for junk at the end */ - /* because there is still space for exponent */ + /* because exponent is still possible */ s=dotat+ROUNDDOWN4(c-dotat); /* source */ t=s+1; /* target */ - /* open the gap */ - for (; s>=dotat; s-=4, t-=4) UINTAT(t)=UINTAT(s); + /* open the gap [cannot use memcpy] */ + for (; s>=dotat; s-=4, t-=4) UBFROMUI(t, UBTOUI(s)); *dotat='.'; c++; /* length increased by one */ } /* need dot? */ @@ -1569,10 +1645,10 @@ char * decFloatToString(const decFloat *df, char *string){ /* finally add the E-part, if needed; it will never be 0, and has */ /* a maximum length of 3 or 4 digits (asserted above) */ if (e!=0) { - USHORTAT(c)=USHORTAT("E+"); /* starts with E, assume + */ + memcpy(c, "E+", 2); /* starts with E, assume + */ c++; if (e<0) { - *c='-'; /* oops, need '-' */ + *c='-'; /* oops, need '-' */ e=-e; /* uInt, please */ } c++; @@ -1581,21 +1657,21 @@ char * decFloatToString(const decFloat *df, char *string){ u=&BIN2BCD8[e*4]; /* -> 3 digits + length byte */ /* copy fixed 4 characters [is safe], starting at non-zero */ /* and with character mask to convert BCD to char */ - UINTAT(c)=UINTAT(u+3-*(u+3))|CHARMASK; + UBFROMUI(c, UBTOUI(u+3-*(u+3))|CHARMASK); c+=*(u+3); /* bump pointer appropriately */ #elif DECEMAXD==4 if (e<1000) { /* 3 (or fewer) digits case */ u=&BIN2BCD8[e*4]; /* -> 3 digits + length byte */ - UINTAT(c)=UINTAT(u+3-*(u+3))|CHARMASK; /* [as above] */ + UBFROMUI(c, UBTOUI(u+3-*(u+3))|CHARMASK); /* [as above] */ c+=*(u+3); /* bump pointer appropriately */ } - else { /* 4-digits */ + else { /* 4-digits */ Int thou=((e>>3)*1049)>>17; /* e/1000 */ Int rem=e-(1000*thou); /* e%1000 */ *c++=(char)('0'+(char)thou); /* the thousands digit */ u=&BIN2BCD8[rem*4]; /* -> 3 digits + length byte */ - UINTAT(c)=UINTAT(u)|CHARMASK; /* copy fixed 3+1 characters [is safe] */ - c+=3; /* bump pointer, always 3 digits */ + UBFROMUI(c, UBTOUI(u)|CHARMASK); /* copy fixed 3+1 characters [is safe] */ + c+=3; /* bump pointer, always 3 digits */ } #endif } @@ -1618,19 +1694,19 @@ char * decFloatToString(const decFloat *df, char *string){ /* backoff if too far to the right */ if (t>string+DECSTRING-5) t=string+DECSTRING-5; /* adjust to fit */ /* now shift the entire coefficient to the right, being careful not */ - /* to access to the left of string */ - for (s=t-pre; s>=string; s-=4, t-=4) UINTAT(t)=UINTAT(s); + /* to access to the left of string [cannot use memcpy] */ + for (s=t-pre; s>=string; s-=4, t-=4) UBFROMUI(t, UBTOUI(s)); /* for Quads and Singles there may be a character or two left... */ - s+=3; /* where next would come from */ + s+=3; /* where next would come from */ for(; s>=cstart; s--, t--) *(t+3)=*(s); /* now have fill 0. through 0.00000; use overlaps to avoid tests */ if (pre>=4) { - UINTAT(cstart+pre-4)=UINTAT("0000"); - UINTAT(cstart)=UINTAT("0.00"); + memcpy(cstart+pre-4, "0000", 4); + memcpy(cstart, "0.00", 4); } else { /* 2 or 3 */ *(cstart+pre-1)='0'; - USHORTAT(cstart)=USHORTAT("0."); + memcpy(cstart, "0.", 2); } *(c+pre)='\0'; /* terminate */ return string; @@ -1665,7 +1741,7 @@ decFloatWider * decFloatToWider(const decFloat *source, decFloatWider *wider) { code|=(exp<<(32-6-DECWECONL)) & 0x03ffffff; /* add exponent continuation */ code|=DFWORD(source, 0)&0x80000000; /* add sign */ DFWWORD(wider, 0)=code; /* .. and place top word in wider */ - msd=GETMSD(source); /* get source coefficient MSD [0-9] */ + msd=GETMSD(source); /* get source coefficient MSD [0-9] */ } /* Copy the coefficient and clear any 'unused' words to left */ #if SINGLE @@ -1723,6 +1799,7 @@ decFloat * decFloatZero(decFloat *df){ void decShowNum(const bcdnum *num, const char *tag) { const char *csign="+"; /* sign character */ uByte *ub; /* work */ + uInt uiwork; /* for macros */ if (num->sign==DECFLOAT_Sign) csign="-"; printf(">%s> ", tag); @@ -1747,7 +1824,7 @@ decFloat * decFloatZero(decFloat *df){ if (e==0) *c++='0'; /* 0-length case */ else if (e<1000) { /* 3 (or fewer) digits case */ u=&BIN2BCD8[e*4]; /* -> 3 digits + length byte */ - UINTAT(c)=UINTAT(u+3-*(u+3))|CHARMASK; /* [as above] */ + UBFROMUI(c, UBTOUI(u+3-*(u+3))|CHARMASK); /* [as above] */ c+=*(u+3); /* bump pointer appropriately */ } else { /* 4-digits */ @@ -1755,7 +1832,7 @@ decFloat * decFloatZero(decFloat *df){ Int rem=e-(1000*thou); /* e%1000 */ *c++=(char)('0'+(char)thou); /* the thousands digit */ u=&BIN2BCD8[rem*4]; /* -> 3 digits + length byte */ - UINTAT(c)=UINTAT(u)|CHARMASK; /* copy fixed 3+1 characters [is safe] */ + UBFROMUI(c, UBTOUI(u)|CHARMASK); /* copy fixed 3+1 characters [is safe] */ c+=3; /* bump pointer, always 3 digits */ } *c='\0'; /* add terminator */ diff --git a/libdecnumber/decContext.c b/libdecnumber/decContext.c index d2e3bed4397..b1d1cc4e47b 100644 --- a/libdecnumber/decContext.c +++ b/libdecnumber/decContext.c @@ -38,15 +38,13 @@ #include <string.h> /* for strcmp */ #include <stdio.h> /* for printf if DECCHECK */ #include "dconfig.h" /* for GCC definitions */ -#include "decContext.h" /* context and base types */ +#include "decContext.h" /* context and base types */ #include "decNumberLocal.h" /* decNumber local types, etc. */ -#if DECCHECK /* compile-time endian tester [assumes sizeof(Int)>1] */ static const Int mfcone=1; /* constant 1 */ -static const Flag *mfctop=(Flag *)&mfcone; /* -> top byte */ +static const Flag *mfctop=(const Flag *)&mfcone; /* -> top byte */ #define LITEND *mfctop /* named flag; 1=little-endian */ -#endif /* ------------------------------------------------------------------ */ /* round-for-reround digits */ @@ -64,7 +62,7 @@ const uInt DECPOWERS[10]={1, 10, 100, 1000, 10000, 100000, 1000000, /* */ /* context is the context structure to be queried */ /* mask indicates the bits to be cleared (the status bit that */ -/* corresponds to each 1 bit in the mask is cleared) */ +/* corresponds to each 1 bit in the mask is cleared) */ /* returns context */ /* */ /* No error is possible. */ @@ -80,9 +78,9 @@ decContext *decContextClearStatus(decContext *context, uInt mask) { /* context is the structure to be initialized */ /* kind selects the required set of default values, one of: */ /* DEC_INIT_BASE -- select ANSI X3-274 defaults */ -/* DEC_INIT_DECIMAL32 -- select IEEE 754r defaults, 32-bit */ -/* DEC_INIT_DECIMAL64 -- select IEEE 754r defaults, 64-bit */ -/* DEC_INIT_DECIMAL128 -- select IEEE 754r defaults, 128-bit */ +/* DEC_INIT_DECIMAL32 -- select IEEE 754 defaults, 32-bit */ +/* DEC_INIT_DECIMAL64 -- select IEEE 754 defaults, 64-bit */ +/* DEC_INIT_DECIMAL128 -- select IEEE 754 defaults, 128-bit */ /* For any other value a valid context is returned, but with */ /* Invalid_operation set in the status field. */ /* returns a context structure with the appropriate initial values. */ @@ -105,11 +103,11 @@ decContext * decContextDefault(decContext *context, Int kind) { break; case DEC_INIT_DECIMAL32: context->digits=7; /* digits */ - context->emax=96; /* Emax */ + context->emax=96; /* Emax */ context->emin=-95; /* Emin */ context->round=DEC_ROUND_HALF_EVEN; /* 0.5 to nearest even */ - context->traps=0; /* no traps set */ - context->clamp=1; /* clamp exponents */ + context->traps=0; /* no traps set */ + context->clamp=1; /* clamp exponents */ #if DECSUBSET context->extended=1; /* set */ #endif @@ -119,8 +117,8 @@ decContext * decContextDefault(decContext *context, Int kind) { context->emax=384; /* Emax */ context->emin=-383; /* Emin */ context->round=DEC_ROUND_HALF_EVEN; /* 0.5 to nearest even */ - context->traps=0; /* no traps set */ - context->clamp=1; /* clamp exponents */ + context->traps=0; /* no traps set */ + context->clamp=1; /* clamp exponents */ #if DECSUBSET context->extended=1; /* set */ #endif @@ -130,8 +128,8 @@ decContext * decContextDefault(decContext *context, Int kind) { context->emax=6144; /* Emax */ context->emin=-6143; /* Emin */ context->round=DEC_ROUND_HALF_EVEN; /* 0.5 to nearest even */ - context->traps=0; /* no traps set */ - context->clamp=1; /* clamp exponents */ + context->traps=0; /* no traps set */ + context->clamp=1; /* clamp exponents */ #if DECSUBSET context->extended=1; /* set */ #endif @@ -142,15 +140,6 @@ decContext * decContextDefault(decContext *context, Int kind) { decContextSetStatus(context, DEC_Invalid_operation); /* trap */ } - #if DECCHECK - if (LITEND!=DECLITEND) { - const char *adj; - if (LITEND) adj="little"; - else adj="big"; - printf("Warning: DECLITEND is set to %d, but this computer appears to be %s-endian\n", - DECLITEND, adj); - } - #endif return context;} /* decContextDefault */ /* ------------------------------------------------------------------ */ @@ -166,7 +155,7 @@ enum rounding decContextGetRounding(decContext *context) { } /* decContextGetRounding */ /* ------------------------------------------------------------------ */ -/* decContextGetStatus -- return current status */ +/* decContextGetStatus -- return current status */ /* */ /* context is the context structure to be queried */ /* returns status */ @@ -181,8 +170,8 @@ uInt decContextGetStatus(decContext *context) { /* decContextRestoreStatus -- restore bits in current status */ /* */ /* context is the context structure to be updated */ -/* newstatus is the source for the bits to be restored */ -/* mask indicates the bits to be restored (the status bit that */ +/* newstatus is the source for the bits to be restored */ +/* mask indicates the bits to be restored (the status bit that */ /* corresponds to each 1 bit in the mask is set to the value of */ /* the correspnding bit in newstatus) */ /* returns context */ @@ -252,7 +241,7 @@ decContext * decContextSetStatus(decContext *context, uInt status) { /* */ /* returns the context structure, unless the string is equal to */ /* DEC_Condition_MU or is not recognized. In these cases NULL is */ -/* returned. */ +/* returned. */ /* ------------------------------------------------------------------ */ decContext * decContextSetStatusFromString(decContext *context, const char *string) { @@ -303,7 +292,7 @@ decContext * decContextSetStatusFromString(decContext *context, /* */ /* returns the context structure, unless the string is equal to */ /* DEC_Condition_MU or is not recognized. In these cases NULL is */ -/* returned. */ +/* returned. */ /* ------------------------------------------------------------------ */ decContext * decContextSetStatusFromStringQuiet(decContext *context, const char *string) { @@ -356,11 +345,11 @@ decContext * decContextSetStatusQuiet(decContext *context, uInt status) { return context;} /* decContextSetStatusQuiet */ /* ------------------------------------------------------------------ */ -/* decContextStatusToString -- convert status flags to a string */ +/* decContextStatusToString -- convert status flags to a string */ /* */ /* context is a context with valid status field */ /* */ -/* returns a constant string describing the condition. If multiple */ +/* returns a constant string describing the condition. If multiple */ /* (or no) flags are set, a generic constant message is returned. */ /* ------------------------------------------------------------------ */ const char *decContextStatusToString(const decContext *context) { @@ -385,11 +374,41 @@ const char *decContextStatusToString(const decContext *context) { #if DECSUBSET if (status==DEC_Lost_digits ) return DEC_Condition_LD; #endif - if (status==0 ) return DEC_Condition_ZE; + if (status==0 ) return DEC_Condition_ZE; return DEC_Condition_MU; /* Multiple errors */ } /* decContextStatusToString */ /* ------------------------------------------------------------------ */ +/* decContextTestEndian -- test whether DECLITEND is set correctly */ +/* */ +/* quiet is 1 to suppress message; 0 otherwise */ +/* returns 0 if DECLITEND is correct */ +/* 1 if DECLITEND is incorrect and should be 1 */ +/* -1 if DECLITEND is incorrect and should be 0 */ +/* */ +/* A message is displayed if the return value is not 0 and quiet==0. */ +/* */ +/* No error is possible. */ +/* ------------------------------------------------------------------ */ +Int decContextTestEndian(Flag quiet) { + Int res=0; /* optimist */ + uInt dle=(uInt)DECLITEND; /* unsign */ + if (dle>1) dle=1; /* ensure 0 or 1 */ + + if (LITEND!=DECLITEND) { + const char *adj; + if (!quiet) { + if (LITEND) adj="little"; + else adj="big"; + printf("Warning: DECLITEND is set to %d, but this computer appears to be %s-endian\n", + DECLITEND, adj); + } + res=(Int)LITEND-dle; + } + return res; + } /* decContextTestEndian */ + +/* ------------------------------------------------------------------ */ /* decContextTestSavedStatus -- test bits in saved status */ /* */ /* oldstatus is the status word to be tested */ diff --git a/libdecnumber/decContext.h b/libdecnumber/decContext.h index f80d03c50cf..70effd80083 100644 --- a/libdecnumber/decContext.h +++ b/libdecnumber/decContext.h @@ -34,7 +34,7 @@ /* */ /* Context variables must always have valid values: */ /* */ -/* status -- [any bits may be cleared, but not set, by user] */ +/* status -- [any bits may be cleared, but not set, by user] */ /* round -- must be one of the enumerated rounding modes */ /* */ /* The following variables are implied for fixed size formats (i.e., */ @@ -54,36 +54,42 @@ #define DECCONTEXT #define DECCNAME "decContext" /* Short name */ #define DECCFULLNAME "Decimal Context Descriptor" /* Verbose name */ - #define DECCAUTHOR "Mike Cowlishaw" /* Who to blame */ + #define DECCAUTHOR "Mike Cowlishaw" /* Who to blame */ - #include "gstdint.h" /* C99 standard integers */ + #if !defined(int32_t) + #include <stdint.h> /* C99 standard integers */ + #endif #include <stdio.h> /* for printf, etc. */ - #include <signal.h> /* for traps */ + #include <signal.h> /* for traps */ /* Extended flags setting -- set this to 0 to use only IEEE flags */ + #if !defined(DECEXTFLAG) #define DECEXTFLAG 1 /* 1=enable extended flags */ + #endif /* Conditional code flag -- set this to 0 for best performance */ + #if !defined(DECSUBSET) #define DECSUBSET 0 /* 1=enable subset arithmetic */ + #endif /* Context for operations, with associated constants */ enum rounding { DEC_ROUND_CEILING, /* round towards +infinity */ - DEC_ROUND_UP, /* round away from 0 */ + DEC_ROUND_UP, /* round away from 0 */ DEC_ROUND_HALF_UP, /* 0.5 rounds up */ DEC_ROUND_HALF_EVEN, /* 0.5 rounds to nearest even */ DEC_ROUND_HALF_DOWN, /* 0.5 rounds down */ DEC_ROUND_DOWN, /* round towards 0 (truncate) */ DEC_ROUND_FLOOR, /* round towards -infinity */ - DEC_ROUND_05UP, /* round for reround */ + DEC_ROUND_05UP, /* round for reround */ DEC_ROUND_MAX /* enum must be less than this */ }; #define DEC_ROUND_DEFAULT DEC_ROUND_HALF_EVEN; typedef struct { - int32_t digits; /* working precision */ - int32_t emax; /* maximum positive exponent */ - int32_t emin; /* minimum negative exponent */ + int32_t digits; /* working precision */ + int32_t emax; /* maximum positive exponent */ + int32_t emin; /* minimum negative exponent */ enum rounding round; /* rounding mode */ uint32_t traps; /* trap-enabler flags */ uint32_t status; /* status flags */ @@ -102,9 +108,9 @@ #define DEC_MIN_EMIN -999999999 #define DEC_MAX_MATH 999999 /* max emax, etc., for math funcs. */ - /* Classifications for decimal numbers, aligned with 754r (note */ - /* that 'normal' and 'subnormal' are meaningful only with a */ - /* decContext or a fixed size format). */ + /* Classifications for decimal numbers, aligned with 754 (note that */ + /* 'normal' and 'subnormal' are meaningful only with a decContext */ + /* or a fixed size format). */ enum decClass { DEC_CLASS_SNAN, DEC_CLASS_QNAN, @@ -139,15 +145,15 @@ #define DEC_Division_impossible 0x00000004 #define DEC_Division_undefined 0x00000008 #define DEC_Insufficient_storage 0x00000010 /* [when malloc fails] */ - #define DEC_Inexact 0x00000020 - #define DEC_Invalid_context 0x00000040 + #define DEC_Inexact 0x00000020 + #define DEC_Invalid_context 0x00000040 #define DEC_Invalid_operation 0x00000080 #if DECSUBSET #define DEC_Lost_digits 0x00000100 #endif #define DEC_Overflow 0x00000200 - #define DEC_Clamped 0x00000400 - #define DEC_Rounded 0x00000800 + #define DEC_Clamped 0x00000400 + #define DEC_Rounded 0x00000800 #define DEC_Subnormal 0x00001000 #define DEC_Underflow 0x00002000 #else @@ -157,43 +163,43 @@ #define DEC_Division_impossible 0x00000010 #define DEC_Division_undefined 0x00000010 #define DEC_Insufficient_storage 0x00000010 /* [when malloc fails] */ - #define DEC_Inexact 0x00000001 - #define DEC_Invalid_context 0x00000010 + #define DEC_Inexact 0x00000001 + #define DEC_Invalid_context 0x00000010 #define DEC_Invalid_operation 0x00000010 #if DECSUBSET #define DEC_Lost_digits 0x00000000 #endif #define DEC_Overflow 0x00000008 - #define DEC_Clamped 0x00000000 - #define DEC_Rounded 0x00000000 + #define DEC_Clamped 0x00000000 + #define DEC_Rounded 0x00000000 #define DEC_Subnormal 0x00000000 #define DEC_Underflow 0x00000004 #endif - /* IEEE 854 groupings for the flags */ + /* IEEE 754 groupings for the flags */ /* [DEC_Clamped, DEC_Lost_digits, DEC_Rounded, and DEC_Subnormal */ - /* are not in IEEE 854] */ - #define DEC_IEEE_854_Division_by_zero (DEC_Division_by_zero) + /* are not in IEEE 754] */ + #define DEC_IEEE_754_Division_by_zero (DEC_Division_by_zero) #if DECSUBSET - #define DEC_IEEE_854_Inexact (DEC_Inexact | DEC_Lost_digits) + #define DEC_IEEE_754_Inexact (DEC_Inexact | DEC_Lost_digits) #else - #define DEC_IEEE_854_Inexact (DEC_Inexact) + #define DEC_IEEE_754_Inexact (DEC_Inexact) #endif - #define DEC_IEEE_854_Invalid_operation (DEC_Conversion_syntax | \ + #define DEC_IEEE_754_Invalid_operation (DEC_Conversion_syntax | \ DEC_Division_impossible | \ DEC_Division_undefined | \ DEC_Insufficient_storage | \ - DEC_Invalid_context | \ + DEC_Invalid_context | \ DEC_Invalid_operation) - #define DEC_IEEE_854_Overflow (DEC_Overflow) - #define DEC_IEEE_854_Underflow (DEC_Underflow) + #define DEC_IEEE_754_Overflow (DEC_Overflow) + #define DEC_IEEE_754_Underflow (DEC_Underflow) /* flags which are normally errors (result is qNaN, infinite, or 0) */ - #define DEC_Errors (DEC_IEEE_854_Division_by_zero | \ - DEC_IEEE_854_Invalid_operation | \ - DEC_IEEE_854_Overflow | DEC_IEEE_854_Underflow) + #define DEC_Errors (DEC_IEEE_754_Division_by_zero | \ + DEC_IEEE_754_Invalid_operation | \ + DEC_IEEE_754_Overflow | DEC_IEEE_754_Underflow) /* flags which cause a result to become qNaN */ - #define DEC_NaNs DEC_IEEE_854_Invalid_operation + #define DEC_NaNs DEC_IEEE_754_Invalid_operation /* flags which are normally for information only (finite results) */ #if DECSUBSET @@ -203,6 +209,13 @@ #define DEC_Information (DEC_Clamped | DEC_Rounded | DEC_Inexact) #endif + /* IEEE 854 names (for compatibility with older decNumber versions) */ + #define DEC_IEEE_854_Division_by_zero DEC_IEEE_754_Division_by_zero + #define DEC_IEEE_854_Inexact DEC_IEEE_754_Inexact + #define DEC_IEEE_854_Invalid_operation DEC_IEEE_754_Invalid_operation + #define DEC_IEEE_854_Overflow DEC_IEEE_754_Overflow + #define DEC_IEEE_854_Underflow DEC_IEEE_754_Underflow + /* Name strings for the exceptional conditions */ #define DEC_Condition_CS "Conversion syntax" #define DEC_Condition_DZ "Division by zero" @@ -226,7 +239,7 @@ /* including terminator */ /* Initialization descriptors, used by decContextDefault */ - #define DEC_INIT_BASE 0 + #define DEC_INIT_BASE 0 #define DEC_INIT_DECIMAL32 32 #define DEC_INIT_DECIMAL64 64 #define DEC_INIT_DECIMAL128 128 @@ -251,6 +264,7 @@ extern decContext * decContextSetStatusFromStringQuiet(decContext *, const char *); extern decContext * decContextSetStatusQuiet(decContext *, uint32_t); extern const char * decContextStatusToString(const decContext *); + extern int32_t decContextTestEndian(uint8_t); extern uint32_t decContextTestSavedStatus(uint32_t, uint32_t); extern uint32_t decContextTestStatus(decContext *, uint32_t); extern decContext * decContextZeroStatus(decContext *); diff --git a/libdecnumber/decDPD.h b/libdecnumber/decDPD.h index a4710d64391..87b35d038b8 100644 --- a/libdecnumber/decDPD.h +++ b/libdecnumber/decDPD.h @@ -30,10 +30,9 @@ /* ------------------------------------------------------------------------ */ /* Binary Coded Decimal and Densely Packed Decimal conversion lookup tables */ -/* [Automatically generated -- do not edit. 2007.05.05] */ +/* [Automatically generated -- do not edit. 2008.06.21] */ /* ------------------------------------------------------------------------ */ -/* ------------------------------------------------------------------------ */ -/* For details, see: http://www2.hursley.ibm.com/decimal/DPDecimal.html */ +/* For details, see DPDecimal.html on the General Decimal Arithmetic page. */ #include "decDPDSymbols.h" @@ -43,9 +42,9 @@ /* uint16_t BIN2DPD[1000]; -- Bin -> DPD (999 => 2457) */ /* uint8_t BIN2CHAR[4001]; -- Bin -> CHAR (999 => '\3' '9' '9' '9') */ /* uint8_t BIN2BCD8[4000]; -- Bin -> bytes (999 => 9 9 9 3) */ -/* uint16_t DPD2BCD[1024]; -- DPD -> BCD (0x3FF => 0x999) */ +/* uint16_t DPD2BCD[1024]; -- DPD -> BCD (0x3FF => 0x999) */ /* uint16_t DPD2BIN[1024]; -- DPD -> BIN (0x3FF => 999) */ -/* uint32_t DPD2BINK[1024]; -- DPD -> BIN * 1000 (0x3FF => 999000) */ +/* uint32_t DPD2BINK[1024]; -- DPD -> BIN * 1000 (0x3FF => 999000) */ /* uint32_t DPD2BINM[1024]; -- DPD -> BIN * 1E+6 (0x3FF => 999000000) */ /* uint8_t DPD2BCD8[4096]; -- DPD -> bytes (x3FF => 9 9 9 3) */ /* */ @@ -53,10 +52,10 @@ /* in the table entry. BIN2CHAR entries are a single byte length (0 for */ /* value 0) followed by three digit characters; a trailing terminator is */ /* included to allow 4-char moves always. BIN2BCD8 and DPD2BCD8 entries */ -/* are similar with the three BCD8 digits followed by a one-byte length */ +/* are similar with the three BCD8 digits followed by a one-byte length */ /* (again, length=0 for value 0). */ /* */ -/* To use a table, its name, prefixed with DEC_, must be defined with a */ +/* To use a table, its name, prefixed with DEC_, must be defined with a */ /* value of 1 before this header file is included. For example: */ /* #define DEC_BCD2DPD 1 */ /* This mechanism allows software to only include tables that are needed. */ @@ -513,7 +512,7 @@ const uint16_t DPD2BIN[1024]={ 0, 1, 2, 3, 4, 5, 6, 7, #if defined(DEC_DPD2BINK) && DEC_DPD2BINK==1 && !defined(DECDPD2BINK) #define DECDPD2BINK -const uint32_t DPD2BINK[1024]={ 0, 1000, 2000, 3000, 4000, 5000, +const uint32_t DPD2BINK[1024]={ 0, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 80000, 81000, 800000, 801000, 880000, 881000, 10000, 11000, 12000, 13000, 14000, 15000, 16000, 17000, 18000, 19000, 90000, 91000, 810000, 811000, 890000, 891000, 20000, 21000, 22000, 23000, @@ -621,24 +620,24 @@ const uint32_t DPD2BINK[1024]={ 0, 1000, 2000, 3000, 4000, 5000, #if defined(DEC_DPD2BINM) && DEC_DPD2BINM==1 && !defined(DECDPD2BINM) #define DECDPD2BINM -const uint32_t DPD2BINM[1024]={0, 1000000, 2000000, 3000000, 4000000, - 5000000, 6000000, 7000000, 8000000, 9000000, 80000000, 81000000, - 800000000, 801000000, 880000000, 881000000, 10000000, 11000000, 12000000, - 13000000, 14000000, 15000000, 16000000, 17000000, 18000000, 19000000, +const uint32_t DPD2BINM[1024]={0, 1000000, 2000000, 3000000, 4000000, + 5000000, 6000000, 7000000, 8000000, 9000000, 80000000, 81000000, + 800000000, 801000000, 880000000, 881000000, 10000000, 11000000, 12000000, + 13000000, 14000000, 15000000, 16000000, 17000000, 18000000, 19000000, 90000000, 91000000, 810000000, 811000000, 890000000, 891000000, 20000000, - 21000000, 22000000, 23000000, 24000000, 25000000, 26000000, 27000000, + 21000000, 22000000, 23000000, 24000000, 25000000, 26000000, 27000000, 28000000, 29000000, 82000000, 83000000, 820000000, 821000000, 808000000, - 809000000, 30000000, 31000000, 32000000, 33000000, 34000000, 35000000, - 36000000, 37000000, 38000000, 39000000, 92000000, 93000000, 830000000, - 831000000, 818000000, 819000000, 40000000, 41000000, 42000000, 43000000, - 44000000, 45000000, 46000000, 47000000, 48000000, 49000000, 84000000, - 85000000, 840000000, 841000000, 88000000, 89000000, 50000000, 51000000, - 52000000, 53000000, 54000000, 55000000, 56000000, 57000000, 58000000, - 59000000, 94000000, 95000000, 850000000, 851000000, 98000000, 99000000, - 60000000, 61000000, 62000000, 63000000, 64000000, 65000000, 66000000, + 809000000, 30000000, 31000000, 32000000, 33000000, 34000000, 35000000, + 36000000, 37000000, 38000000, 39000000, 92000000, 93000000, 830000000, + 831000000, 818000000, 819000000, 40000000, 41000000, 42000000, 43000000, + 44000000, 45000000, 46000000, 47000000, 48000000, 49000000, 84000000, + 85000000, 840000000, 841000000, 88000000, 89000000, 50000000, 51000000, + 52000000, 53000000, 54000000, 55000000, 56000000, 57000000, 58000000, + 59000000, 94000000, 95000000, 850000000, 851000000, 98000000, 99000000, + 60000000, 61000000, 62000000, 63000000, 64000000, 65000000, 66000000, 67000000, 68000000, 69000000, 86000000, 87000000, 860000000, 861000000, - 888000000, 889000000, 70000000, 71000000, 72000000, 73000000, 74000000, - 75000000, 76000000, 77000000, 78000000, 79000000, 96000000, 97000000, + 888000000, 889000000, 70000000, 71000000, 72000000, 73000000, 74000000, + 75000000, 76000000, 77000000, 78000000, 79000000, 96000000, 97000000, 870000000, 871000000, 898000000, 899000000, 100000000, 101000000, 102000000, 103000000, 104000000, 105000000, 106000000, 107000000, 108000000, 109000000, 180000000, 181000000, 900000000, 901000000, 980000000, 981000000, 110000000, diff --git a/libdecnumber/decDouble.c b/libdecnumber/decDouble.c index ba6a0af893b..030cc2b86cd 100644 --- a/libdecnumber/decDouble.c +++ b/libdecnumber/decDouble.c @@ -34,19 +34,19 @@ /* This module comprises decDouble operations (including conversions) */ /* ------------------------------------------------------------------ */ -#include "decContext.h" /* public includes */ +#include "decContext.h" /* public includes */ #include "decDouble.h" /* .. */ /* Constant mappings for shared code */ -#define DECPMAX DECDOUBLE_Pmax -#define DECEMIN DECDOUBLE_Emin -#define DECEMAX DECDOUBLE_Emax +#define DECPMAX DECDOUBLE_Pmax +#define DECEMIN DECDOUBLE_Emin +#define DECEMAX DECDOUBLE_Emax #define DECEMAXD DECDOUBLE_EmaxD #define DECBYTES DECDOUBLE_Bytes #define DECSTRING DECDOUBLE_String #define DECECONL DECDOUBLE_EconL -#define DECBIAS DECDOUBLE_Bias -#define DECLETS DECDOUBLE_Declets +#define DECBIAS DECDOUBLE_Bias +#define DECLETS DECDOUBLE_Declets #define DECQTINY (-DECDOUBLE_Bias) /* parameters of next-wider format */ #define DECWBYTES DECQUAD_Bytes @@ -55,100 +55,98 @@ #define DECWBIAS DECQUAD_Bias /* Type and function mappings for shared code */ -#define decFloat decDouble /* Type name */ -#define decFloatWider decQuad /* Type name */ +#define decFloat decDouble /* Type name */ +#define decFloatWider decQuad /* Type name */ /* Utilities and conversions (binary results, extractors, etc.) */ -#define decFloatFromBCD decDoubleFromBCD -#define decFloatFromInt32 decDoubleFromInt32 -#define decFloatFromPacked decDoubleFromPacked -#define decFloatFromString decDoubleFromString -#define decFloatFromUInt32 decDoubleFromUInt32 -#define decFloatFromWider decDoubleFromWider -#define decFloatGetCoefficient decDoubleGetCoefficient -#define decFloatGetExponent decDoubleGetExponent -#define decFloatSetCoefficient decDoubleSetCoefficient -#define decFloatSetExponent decDoubleSetExponent -#define decFloatShow decDoubleShow -#define decFloatToBCD decDoubleToBCD -#define decFloatToEngString decDoubleToEngString -#define decFloatToInt32 decDoubleToInt32 -#define decFloatToInt32Exact decDoubleToInt32Exact -#define decFloatToPacked decDoubleToPacked -#define decFloatToString decDoubleToString -#define decFloatToUInt32 decDoubleToUInt32 -#define decFloatToUInt32Exact decDoubleToUInt32Exact -#define decFloatToWider decDoubleToWider -#define decFloatZero decDoubleZero +#define decFloatFromBCD decDoubleFromBCD +#define decFloatFromInt32 decDoubleFromInt32 +#define decFloatFromPacked decDoubleFromPacked +#define decFloatFromPackedChecked decDoubleFromPackedChecked +#define decFloatFromString decDoubleFromString +#define decFloatFromUInt32 decDoubleFromUInt32 +#define decFloatFromWider decDoubleFromWider +#define decFloatGetCoefficient decDoubleGetCoefficient +#define decFloatGetExponent decDoubleGetExponent +#define decFloatSetCoefficient decDoubleSetCoefficient +#define decFloatSetExponent decDoubleSetExponent +#define decFloatShow decDoubleShow +#define decFloatToBCD decDoubleToBCD +#define decFloatToEngString decDoubleToEngString +#define decFloatToInt32 decDoubleToInt32 +#define decFloatToInt32Exact decDoubleToInt32Exact +#define decFloatToPacked decDoubleToPacked +#define decFloatToString decDoubleToString +#define decFloatToUInt32 decDoubleToUInt32 +#define decFloatToUInt32Exact decDoubleToUInt32Exact +#define decFloatToWider decDoubleToWider +#define decFloatZero decDoubleZero /* Computational (result is a decFloat) */ -#define decFloatAbs decDoubleAbs -#define decFloatAdd decDoubleAdd -#define decFloatAnd decDoubleAnd -#define decFloatDivide decDoubleDivide -#define decFloatDivideInteger decDoubleDivideInteger -#define decFloatFMA decDoubleFMA -#define decFloatInvert decDoubleInvert -#define decFloatLogB decDoubleLogB -#define decFloatMax decDoubleMax -#define decFloatMaxMag decDoubleMaxMag -#define decFloatMin decDoubleMin -#define decFloatMinMag decDoubleMinMag -#define decFloatMinus decDoubleMinus -#define decFloatMultiply decDoubleMultiply -#define decFloatNextMinus decDoubleNextMinus -#define decFloatNextPlus decDoubleNextPlus -#define decFloatNextToward decDoubleNextToward -#define decFloatOr decDoubleOr -#define decFloatPlus decDoublePlus -#define decFloatQuantize decDoubleQuantize -#define decFloatReduce decDoubleReduce -#define decFloatRemainder decDoubleRemainder -#define decFloatRemainderNear decDoubleRemainderNear -#define decFloatRotate decDoubleRotate -#define decFloatScaleB decDoubleScaleB -#define decFloatShift decDoubleShift -#define decFloatSubtract decDoubleSubtract -#define decFloatToIntegralValue decDoubleToIntegralValue -#define decFloatToIntegralExact decDoubleToIntegralExact -#define decFloatXor decDoubleXor +#define decFloatAbs decDoubleAbs +#define decFloatAdd decDoubleAdd +#define decFloatAnd decDoubleAnd +#define decFloatDivide decDoubleDivide +#define decFloatDivideInteger decDoubleDivideInteger +#define decFloatFMA decDoubleFMA +#define decFloatInvert decDoubleInvert +#define decFloatLogB decDoubleLogB +#define decFloatMax decDoubleMax +#define decFloatMaxMag decDoubleMaxMag +#define decFloatMin decDoubleMin +#define decFloatMinMag decDoubleMinMag +#define decFloatMinus decDoubleMinus +#define decFloatMultiply decDoubleMultiply +#define decFloatNextMinus decDoubleNextMinus +#define decFloatNextPlus decDoubleNextPlus +#define decFloatNextToward decDoubleNextToward +#define decFloatOr decDoubleOr +#define decFloatPlus decDoublePlus +#define decFloatQuantize decDoubleQuantize +#define decFloatReduce decDoubleReduce +#define decFloatRemainder decDoubleRemainder +#define decFloatRemainderNear decDoubleRemainderNear +#define decFloatRotate decDoubleRotate +#define decFloatScaleB decDoubleScaleB +#define decFloatShift decDoubleShift +#define decFloatSubtract decDoubleSubtract +#define decFloatToIntegralValue decDoubleToIntegralValue +#define decFloatToIntegralExact decDoubleToIntegralExact +#define decFloatXor decDoubleXor /* Comparisons */ -#define decFloatCompare decDoubleCompare -#define decFloatCompareSignal decDoubleCompareSignal -#define decFloatCompareTotal decDoubleCompareTotal -#define decFloatCompareTotalMag decDoubleCompareTotalMag +#define decFloatCompare decDoubleCompare +#define decFloatCompareSignal decDoubleCompareSignal +#define decFloatCompareTotal decDoubleCompareTotal +#define decFloatCompareTotalMag decDoubleCompareTotalMag /* Copies */ -#define decFloatCanonical decDoubleCanonical -#define decFloatCopy decDoubleCopy -#define decFloatCopyAbs decDoubleCopyAbs -#define decFloatCopyNegate decDoubleCopyNegate -#define decFloatCopySign decDoubleCopySign +#define decFloatCanonical decDoubleCanonical +#define decFloatCopy decDoubleCopy +#define decFloatCopyAbs decDoubleCopyAbs +#define decFloatCopyNegate decDoubleCopyNegate +#define decFloatCopySign decDoubleCopySign /* Non-computational */ -#define decFloatClass decDoubleClass -#define decFloatClassString decDoubleClassString -#define decFloatDigits decDoubleDigits -#define decFloatIsCanonical decDoubleIsCanonical -#define decFloatIsFinite decDoubleIsFinite -#define decFloatIsInfinite decDoubleIsInfinite -#define decFloatIsInteger decDoubleIsInteger -#define decFloatIsNaN decDoubleIsNaN -#define decFloatIsNormal decDoubleIsNormal -#define decFloatIsSignaling decDoubleIsSignaling -#define decFloatIsSignalling decDoubleIsSignalling -#define decFloatIsSigned decDoubleIsSigned -#define decFloatIsSubnormal decDoubleIsSubnormal -#define decFloatIsZero decDoubleIsZero -#define decFloatRadix decDoubleRadix -#define decFloatSameQuantum decDoubleSameQuantum -#define decFloatVersion decDoubleVersion - +#define decFloatClass decDoubleClass +#define decFloatClassString decDoubleClassString +#define decFloatDigits decDoubleDigits +#define decFloatIsCanonical decDoubleIsCanonical +#define decFloatIsFinite decDoubleIsFinite +#define decFloatIsInfinite decDoubleIsInfinite +#define decFloatIsInteger decDoubleIsInteger +#define decFloatIsNaN decDoubleIsNaN +#define decFloatIsNormal decDoubleIsNormal +#define decFloatIsSignaling decDoubleIsSignaling +#define decFloatIsSignalling decDoubleIsSignalling +#define decFloatIsSigned decDoubleIsSigned +#define decFloatIsSubnormal decDoubleIsSubnormal +#define decFloatIsZero decDoubleIsZero +#define decFloatRadix decDoubleRadix +#define decFloatSameQuantum decDoubleSameQuantum +#define decFloatVersion decDoubleVersion #include "decNumberLocal.h" /* local includes (need DECPMAX) */ #include "decCommon.c" /* non-arithmetic decFloat routines */ #include "decBasic.c" /* basic formats routines */ -/* Below here will move to shared file as completed */ - diff --git a/libdecnumber/decDouble.h b/libdecnumber/decDouble.h index 53fcf406bec..aa8d77d4b73 100644 --- a/libdecnumber/decDouble.h +++ b/libdecnumber/decDouble.h @@ -31,24 +31,22 @@ /* ------------------------------------------------------------------ */ /* decDouble.h -- Decimal 64-bit format module header */ /* ------------------------------------------------------------------ */ -/* Please see decFloats.h for an overview and documentation details. */ -/* ------------------------------------------------------------------ */ #if !defined(DECDOUBLE) #define DECDOUBLE - #define DECDOUBLENAME "decimalDouble" /* Short name */ + #define DECDOUBLENAME "decimalDouble" /* Short name */ #define DECDOUBLETITLE "Decimal 64-bit datum" /* Verbose name */ #define DECDOUBLEAUTHOR "Mike Cowlishaw" /* Who to blame */ /* parameters for decDoubles */ #define DECDOUBLE_Bytes 8 /* length */ #define DECDOUBLE_Pmax 16 /* maximum precision (digits) */ - #define DECDOUBLE_Emin -383 /* minimum adjusted exponent */ - #define DECDOUBLE_Emax 384 /* maximum adjusted exponent */ + #define DECDOUBLE_Emin -383 /* minimum adjusted exponent */ + #define DECDOUBLE_Emax 384 /* maximum adjusted exponent */ #define DECDOUBLE_EmaxD 3 /* maximum exponent digits */ - #define DECDOUBLE_Bias 398 /* bias for the exponent */ - #define DECDOUBLE_String 25 /* maximum string length, +1 */ + #define DECDOUBLE_Bias 398 /* bias for the exponent */ + #define DECDOUBLE_String 25 /* maximum string length, +1 */ #define DECDOUBLE_EconL 8 /* exponent continuation length */ #define DECDOUBLE_Declets 5 /* count of declets */ /* highest biased exponent (Elimit-1) */ @@ -58,11 +56,14 @@ #include "decContext.h" #include "decQuad.h" - /* The decDouble decimal 64-bit type, accessible by various types */ + /* The decDouble decimal 64-bit type, accessible by all sizes */ typedef union { - uint8_t bytes[DECDOUBLE_Bytes]; /* fields: 1, 5, 8, 50 bits */ + uint8_t bytes[DECDOUBLE_Bytes]; /* fields: 1, 5, 8, 50 bits */ uint16_t shorts[DECDOUBLE_Bytes/2]; - uint32_t words[DECDOUBLE_Bytes/4]; + uint32_t words[DECDOUBLE_Bytes/4]; + #if DECUSE64 + uint64_t longs[DECDOUBLE_Bytes/8]; + #endif } decDouble; /* ---------------------------------------------------------------- */ @@ -75,6 +76,7 @@ extern decDouble * decDoubleFromBCD(decDouble *, int32_t, const uint8_t *, int32_t); extern decDouble * decDoubleFromInt32(decDouble *, int32_t); extern decDouble * decDoubleFromPacked(decDouble *, int32_t, const uint8_t *); + extern decDouble * decDoubleFromPackedChecked(decDouble *, int32_t, const uint8_t *); extern decDouble * decDoubleFromString(decDouble *, const char *, decContext *); extern decDouble * decDoubleFromUInt32(decDouble *, uint32_t); extern decDouble * decDoubleFromWider(decDouble *, const decQuad *, decContext *); @@ -160,7 +162,8 @@ /* decNumber conversions; these are implemented as macros so as not */ /* to force a dependency on decimal64 and decNumber in decDouble. */ + /* decDoubleFromNumber returns a decimal64 * to avoid warnings. */ #define decDoubleToNumber(dq, dn) decimal64ToNumber((decimal64 *)(dq), dn) - #define decDoubleFromNumber(dq, dn, set) (decDouble *)decimal64FromNumber((decimal64 *)(dq), dn, set) + #define decDoubleFromNumber(dq, dn, set) decimal64FromNumber((decimal64 *)(dq), dn, set) #endif diff --git a/libdecnumber/decNumber.c b/libdecnumber/decNumber.c index f9a624a1afa..ebc7cf0fb50 100644 --- a/libdecnumber/decNumber.c +++ b/libdecnumber/decNumber.c @@ -31,24 +31,35 @@ /* ------------------------------------------------------------------ */ /* Decimal Number arithmetic module */ /* ------------------------------------------------------------------ */ -/* This module comprises the routines for General Decimal Arithmetic */ -/* as defined in the specification which may be found on the */ -/* http://www2.hursley.ibm.com/decimal web pages. It implements both */ +/* This module comprises the routines for arbitrary-precision General */ +/* Decimal Arithmetic as defined in the specification which may be */ +/* found on the General Decimal Arithmetic pages. It implements both */ /* the full ('extended') arithmetic and the simpler ('subset') */ /* arithmetic. */ /* */ -/* Usage notes: */ +/* Usage notes: */ /* */ /* 1. This code is ANSI C89 except: */ /* */ -/* If DECDPUN>4 or DECUSE64=1, the C99 64-bit int64_t and */ +/* a) C99 line comments (double forward slash) are used. (Most C */ +/* compilers accept these. If yours does not, a simple script */ +/* can be used to convert them to ANSI C comments.) */ +/* */ +/* b) Types from C99 stdint.h are used. If you do not have this */ +/* header file, see the User's Guide section of the decNumber */ +/* documentation; this lists the necessary definitions. */ +/* */ +/* c) If DECDPUN>4 or DECUSE64=1, the C99 64-bit int64_t and */ /* uint64_t types may be used. To avoid these, set DECUSE64=0 */ /* and DECDPUN<=4 (see documentation). */ /* */ +/* The code also conforms to C99 restrictions; in particular, */ +/* strict aliasing rules are observed. */ +/* */ /* 2. The decNumber format which this library uses is optimized for */ /* efficient processing of relatively short numbers; in particular */ /* it allows the use of fixed sized structures and minimizes copy */ -/* and move operations. It does, however, support arbitrary */ +/* and move operations. It does, however, support arbitrary */ /* precision (up to 999,999,999 digits) and arbitrary exponent */ /* range (Emax in the range 0 through 999,999,999 and Emin in the */ /* range -999,999,999 through 0). Mathematical functions (for */ @@ -67,7 +78,7 @@ /* permitted). Other than that case, operands must not overlap. */ /* */ /* 5. Error handling: the type of the error is ORed into the status */ -/* flags in the current context (decContext structure). The */ +/* flags in the current context (decContext structure). The */ /* SIGFPE signal is then raised if the corresponding trap-enabler */ /* flag in the decContext is set (is 1). */ /* */ @@ -76,7 +87,7 @@ /* */ /* The result of any routine which returns a number will always */ /* be a valid number (which may be a special value, such as an */ -/* Infinity or NaN). */ +/* Infinity or NaN). */ /* */ /* 6. The decNumber format is not an exchangeable concrete */ /* representation as it comprises fields which may be machine- */ @@ -84,10 +95,10 @@ /* Canonical conversions to and from strings are provided; other */ /* conversions are available in separate modules. */ /* */ -/* 7. Normally, input operands are assumed to be valid. Set DECCHECK */ +/* 7. Normally, input operands are assumed to be valid. Set DECCHECK */ /* to 1 for extended operand checking (including NULL operands). */ /* Results are undefined if a badly-formed structure (or a NULL */ -/* pointer to a structure) is provided, though with DECCHECK */ +/* pointer to a structure) is provided, though with DECCHECK */ /* enabled the operator routines are protected against exceptions. */ /* (Except if the result pointer is NULL, which is unrecoverable.) */ /* */ @@ -98,7 +109,7 @@ /* */ /* 8. Subset arithmetic is available only if DECSUBSET is set to 1. */ /* ------------------------------------------------------------------ */ -/* Implementation notes for maintenance of this module: */ +/* Implementation notes for maintenance of this module: */ /* */ /* 1. Storage leak protection: Routines which use malloc are not */ /* permitted to use return for fastpath or error exits (i.e., */ @@ -115,7 +126,7 @@ /* 3. Setting status in the context must always be the very last */ /* action in a routine, as non-0 status may raise a trap and hence */ /* the call to set status may not return (if the handler uses long */ -/* jump). Therefore all cleanup must be done first. In general, */ +/* jump). Therefore all cleanup must be done first. In general, */ /* to achieve this status is accumulated and is only applied just */ /* before return by calling decContextSetStatus (via decStatus). */ /* */ @@ -127,9 +138,9 @@ /* */ /* 4. Exponent checking is minimized by allowing the exponent to */ /* grow outside its limits during calculations, provided that */ -/* the decFinalize function is called later. Multiplication and */ +/* the decFinalize function is called later. Multiplication and */ /* division, and intermediate calculations in exponentiation, */ -/* require more careful checks because of the risk of 31-bit */ +/* require more careful checks because of the risk of 31-bit */ /* overflow (the most negative valid exponent is -1999999997, for */ /* a 999999999-digit number with adjusted exponent of -999999999). */ /* */ @@ -151,18 +162,18 @@ /* is not useful for longer numbers because overflow of 32 bits */ /* would lead to 4 multiplies, which is almost as expensive as */ /* a divide (unless a floating-point or 64-bit multiply is */ -/* assumed to be available). */ +/* assumed to be available). */ /* */ -/* 8. Unusual abbreviations that may be used in the commentary: */ +/* 8. Unusual abbreviations that may be used in the commentary: */ /* lhs -- left hand side (operand, of an operation) */ -/* lsd -- least significant digit (of coefficient) */ +/* lsd -- least significant digit (of coefficient) */ /* lsu -- least significant Unit (of coefficient) */ /* msd -- most significant digit (of coefficient) */ /* msi -- most significant item (in an array) */ /* msu -- most significant Unit (of coefficient) */ /* rhs -- right hand side (operand, of an operation) */ -/* +ve -- positive */ -/* -ve -- negative */ +/* +ve -- positive */ +/* -ve -- negative */ /* ** -- raise to the power */ /* ------------------------------------------------------------------ */ @@ -178,25 +189,25 @@ /* Public lookup table used by the D2U macro */ const uByte d2utable[DECMAXD2U+1]=D2UTABLE; -#define DECVERB 1 /* set to 1 for verbose DECCHECK */ +#define DECVERB 1 /* set to 1 for verbose DECCHECK */ #define powers DECPOWERS /* old internal name */ /* Local constants */ #define DIVIDE 0x80 /* Divide operators */ #define REMAINDER 0x40 /* .. */ #define DIVIDEINT 0x20 /* .. */ -#define REMNEAR 0x10 /* .. */ -#define COMPARE 0x01 /* Compare operators */ -#define COMPMAX 0x02 /* .. */ -#define COMPMIN 0x03 /* .. */ +#define REMNEAR 0x10 /* .. */ +#define COMPARE 0x01 /* Compare operators */ +#define COMPMAX 0x02 /* .. */ +#define COMPMIN 0x03 /* .. */ #define COMPTOTAL 0x04 /* .. */ -#define COMPNAN 0x05 /* .. [NaN processing] */ -#define COMPSIG 0x06 /* .. [signaling COMPARE] */ +#define COMPNAN 0x05 /* .. [NaN processing] */ +#define COMPSIG 0x06 /* .. [signaling COMPARE] */ #define COMPMAXMAG 0x07 /* .. */ #define COMPMINMAG 0x08 /* .. */ -#define DEC_sNaN 0x40000000 /* local status: sNaN signal */ -#define BADINT (Int)0x80000000 /* most-negative Int; error indicator */ +#define DEC_sNaN 0x40000000 /* local status: sNaN signal */ +#define BADINT (Int)0x80000000 /* most-negative Int; error indicator */ /* Next two indicate an integer >= 10**6, and its parity (bottom bit) */ #define BIGEVEN (Int)0x80000002 #define BIGODD (Int)0x80000003 @@ -262,7 +273,7 @@ static Int decShiftToLeast(Unit *, Int, Int); static Int decShiftToMost(Unit *, Int, Int); static void decStatus(decNumber *, uInt, decContext *); static void decToString(const decNumber *, char[], Flag); -static decNumber * decTrim(decNumber *, decContext *, Flag, Int *); +static decNumber * decTrim(decNumber *, decContext *, Flag, Flag, Int *); static Int decUnitAddSub(const Unit *, Int, const Unit *, Int, Int, Unit *, Int); static Int decUnitCompare(const Unit *, Int, const Unit *, Int, Int); @@ -302,7 +313,7 @@ uInt decAllocBytes=0; /* count of bytes allocated */ #if DECCHECK /* Optional checking routines. Enabling these means that decNumber */ /* and decContext operands to operator routines are checked for */ -/* correctness. This roughly doubles the execution time of the */ +/* correctness. This roughly doubles the execution time of the */ /* fastest routines (and adds 600+ bytes), so should not normally be */ /* used in 'production'. */ /* decCheckInexact is used to check that inexact results have a full */ @@ -382,7 +393,7 @@ Int decNumberToInt32(const decNumber *dn, decContext *set) { Int d; /* work */ const Unit *up; /* .. */ uInt hi=0, lo; /* .. */ - up=dn->lsu; /* -> lsu */ + up=dn->lsu; /* -> lsu */ lo=*up; /* get 1 to 9 digits */ #if DECDPUN>1 /* split to higher */ hi=lo/10; @@ -418,7 +429,7 @@ uInt decNumberToUInt32(const decNumber *dn, decContext *set) { Int d; /* work */ const Unit *up; /* .. */ uInt hi=0, lo; /* .. */ - up=dn->lsu; /* -> lsu */ + up=dn->lsu; /* -> lsu */ lo=*up; /* get 1 to 9 digits */ #if DECDPUN>1 /* split to higher */ hi=lo/10; @@ -437,7 +448,7 @@ uInt decNumberToUInt32(const decNumber *dn, decContext *set) { } /* decNumberToUInt32 */ /* ------------------------------------------------------------------ */ -/* to-scientific-string -- conversion to numeric string */ +/* to-scientific-string -- conversion to numeric string */ /* to-engineering-string -- conversion to numeric string */ /* */ /* decNumberToString(dn, string); */ @@ -464,30 +475,30 @@ char * decNumberToEngString(const decNumber *dn, char *string){ /* to-number -- conversion from numeric string */ /* */ /* decNumberFromString -- convert string to decNumber */ -/* dn -- the number structure to fill */ +/* dn -- the number structure to fill */ /* chars[] -- the string to convert ('\0' terminated) */ /* set -- the context used for processing any error, */ /* determining the maximum precision available */ /* (set.digits), determining the maximum and minimum */ /* exponent (set.emax and set.emin), determining if */ -/* extended values are allowed, and checking the */ +/* extended values are allowed, and checking the */ /* rounding mode if overflow occurs or rounding is */ /* needed. */ /* */ /* The length of the coefficient and the size of the exponent are */ /* checked by this routine, so the correct error (Underflow or */ -/* Overflow) can be reported or rounding applied, as necessary. */ +/* Overflow) can be reported or rounding applied, as necessary. */ /* */ /* If bad syntax is detected, the result will be a quiet NaN. */ /* ------------------------------------------------------------------ */ decNumber * decNumberFromString(decNumber *dn, const char chars[], decContext *set) { Int exponent=0; /* working exponent [assume 0] */ - uByte bits=0; /* working flags [assume +ve] */ + uByte bits=0; /* working flags [assume +ve] */ Unit *res; /* where result will be built */ Unit resbuff[SD2U(DECBUFFER+9)];/* local buffer in case need temporary */ /* [+9 allows for ln() constants] */ - Unit *allocres=NULL; /* -> allocated result, iff allocated */ + Unit *allocres=NULL; /* -> allocated result, iff allocated */ Int d=0; /* count of digits found in decimal part */ const char *dotchar=NULL; /* where dot was found */ const char *cfirst=chars; /* -> first character of decimal part */ @@ -507,7 +518,7 @@ decNumber * decNumberFromString(decNumber *dn, const char chars[], do { /* status & malloc protection */ for (c=chars;; c++) { /* -> input character */ - if (*c>='0' && *c<='9') { /* test for Arabic digit */ + if (*c>='0' && *c<='9') { /* test for Arabic digit */ last=c; d++; /* count of real digits */ continue; /* still in decimal part */ @@ -537,7 +548,7 @@ decNumber * decNumberFromString(decNumber *dn, const char chars[], if (!set->extended) break; /* hopeless */ #endif /* Infinities and NaNs are possible, here */ - if (dotchar!=NULL) break; /* .. unless had a dot */ + if (dotchar!=NULL) break; /* .. unless had a dot */ decNumberZero(dn); /* be optimistic */ if (decBiStr(c, "infinity", "INFINITY") || decBiStr(c, "inf", "INF")) { @@ -548,7 +559,7 @@ decNumber * decNumberFromString(decNumber *dn, const char chars[], /* a NaN expected */ /* 2003.09.10 NaNs are now permitted to have a sign */ dn->bits=bits | DECNAN; /* assume simple NaN */ - if (*c=='s' || *c=='S') { /* looks like an sNaN */ + if (*c=='s' || *c=='S') { /* looks like an sNaN */ c++; dn->bits=bits | DECSNAN; } @@ -578,7 +589,7 @@ decNumber * decNumberFromString(decNumber *dn, const char chars[], if (d>set->digits) break; } /* too many digits? */ /* good; drop through to convert the integer to coefficient */ - status=0; /* syntax is OK */ + status=0; /* syntax is OK */ bits=dn->bits; /* for copy-back */ } /* last==NULL */ @@ -613,14 +624,14 @@ decNumber * decNumberFromString(decNumber *dn, const char chars[], /* [up to 1999999999 is OK, for example 1E-1000000998] */ } if (nege) exponent=-exponent; /* was negative */ - status=0; /* is OK */ + status=0; /* is OK */ } /* stuff after digits */ /* Here when whole string has been inspected; syntax is good */ /* cfirst->first digit (never dot), last->last digit (ditto) */ /* strip leading zeros/dot [leave final 0 if all 0's] */ - if (*cfirst=='0') { /* [cfirst has stepped over .] */ + if (*cfirst=='0') { /* [cfirst has stepped over .] */ for (c=cfirst; c<last; c++, cfirst++) { if (*c=='.') continue; /* ignore dots */ if (*c!='0') break; /* non-zero found */ @@ -637,7 +648,7 @@ decNumber * decNumberFromString(decNumber *dn, const char chars[], /* Handle decimal point... */ if (dotchar!=NULL && dotchar<last) /* non-trailing '.' found? */ - exponent-=(last-dotchar); /* adjust exponent */ + exponent-=(last-dotchar); /* adjust exponent */ /* [we can now ignore the .] */ /* OK, the digits string is good. Assemble in the decNumber, or in */ @@ -703,7 +714,7 @@ decNumber * decNumberFromString(decNumber *dn, const char chars[], } } /* decNumberShow(dn); */ - } while(0); /* [for break] */ + } while(0); /* [for break] */ if (allocres!=NULL) free(allocres); /* drop any storage used */ if (status!=0) decStatus(dn, status, set); @@ -721,7 +732,7 @@ decNumber * decNumberFromString(decNumber *dn, const char chars[], /* */ /* res is C, the result. C may be A */ /* rhs is A */ -/* set is the context */ +/* set is the context */ /* */ /* See also decNumberCopyAbs for a quiet bitwise version of this. */ /* C must have space for set->digits digits. */ @@ -739,7 +750,7 @@ decNumber * decNumberAbs(decNumber *res, const decNumber *rhs, #endif decNumberZero(&dzero); /* set 0 */ - dzero.exponent=rhs->exponent; /* [no coefficient expansion] */ + dzero.exponent=rhs->exponent; /* [no coefficient expansion] */ decAddOp(res, &dzero, rhs, set, (uByte)(rhs->bits & DECNEG), &status); if (status!=0) decStatus(res, status, set); #if DECCHECK @@ -756,7 +767,7 @@ decNumber * decNumberAbs(decNumber *res, const decNumber *rhs, /* res is C, the result. C may be A and/or B (e.g., X=X+X) */ /* lhs is A */ /* rhs is B */ -/* set is the context */ +/* set is the context */ /* */ /* C must have space for set->digits digits. */ /* ------------------------------------------------------------------ */ @@ -851,7 +862,7 @@ decNumber * decNumberAnd(decNumber *res, const decNumber *lhs, /* res is C, the result. C may be A and/or B (e.g., X=X?X) */ /* lhs is A */ /* rhs is B */ -/* set is the context */ +/* set is the context */ /* */ /* C must have space for one digit (or NaN). */ /* ------------------------------------------------------------------ */ @@ -871,7 +882,7 @@ decNumber * decNumberCompare(decNumber *res, const decNumber *lhs, /* res is C, the result. C may be A and/or B (e.g., X=X?X) */ /* lhs is A */ /* rhs is B */ -/* set is the context */ +/* set is the context */ /* */ /* C must have space for one digit (or NaN). */ /* ------------------------------------------------------------------ */ @@ -891,10 +902,10 @@ decNumber * decNumberCompareSignal(decNumber *res, const decNumber *lhs, /* res is C, the result. C may be A and/or B (e.g., X=X?X) */ /* lhs is A */ /* rhs is B */ -/* set is the context */ +/* set is the context */ /* */ /* C must have space for one digit; the result will always be one of */ -/* -1, 0, or 1. */ +/* -1, 0, or 1. */ /* ------------------------------------------------------------------ */ decNumber * decNumberCompareTotal(decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set) { @@ -912,10 +923,10 @@ decNumber * decNumberCompareTotal(decNumber *res, const decNumber *lhs, /* res is C, the result. C may be A and/or B (e.g., X=X?X) */ /* lhs is A */ /* rhs is B */ -/* set is the context */ +/* set is the context */ /* */ /* C must have space for one digit; the result will always be one of */ -/* -1, 0, or 1. */ +/* -1, 0, or 1. */ /* ------------------------------------------------------------------ */ decNumber * decNumberCompareTotalMag(decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set) { @@ -944,7 +955,7 @@ decNumber * decNumberCompareTotalMag(decNumber *res, const decNumber *lhs, a=allocbufa; /* use the allocated space */ } decNumberCopy(a, lhs); /* copy content */ - a->bits&=~DECNEG; /* .. and clear the sign */ + a->bits&=~DECNEG; /* .. and clear the sign */ lhs=a; /* use copy from here on */ } if (decNumberIsNegative(rhs)) { /* rhs<0 */ @@ -958,11 +969,11 @@ decNumber * decNumberCompareTotalMag(decNumber *res, const decNumber *lhs, b=allocbufb; /* use the allocated space */ } decNumberCopy(b, rhs); /* copy content */ - b->bits&=~DECNEG; /* .. and clear the sign */ + b->bits&=~DECNEG; /* .. and clear the sign */ rhs=b; /* use copy from here on */ } decCompareOp(res, lhs, rhs, set, COMPTOTAL, &status); - } while(0); /* end protected */ + } while(0); /* end protected */ if (allocbufa!=NULL) free(allocbufa); /* drop any storage used */ if (allocbufb!=NULL) free(allocbufb); /* .. */ @@ -978,7 +989,7 @@ decNumber * decNumberCompareTotalMag(decNumber *res, const decNumber *lhs, /* res is C, the result. C may be A and/or B (e.g., X=X/X) */ /* lhs is A */ /* rhs is B */ -/* set is the context */ +/* set is the context */ /* */ /* C must have space for set->digits digits. */ /* ------------------------------------------------------------------ */ @@ -994,14 +1005,14 @@ decNumber * decNumberDivide(decNumber *res, const decNumber *lhs, } /* decNumberDivide */ /* ------------------------------------------------------------------ */ -/* decNumberDivideInteger -- divide and return integer quotient */ +/* decNumberDivideInteger -- divide and return integer quotient */ /* */ /* This computes C = A # B, where # is the integer divide operator */ /* */ /* res is C, the result. C may be A and/or B (e.g., X=X#X) */ /* lhs is A */ /* rhs is B */ -/* set is the context */ +/* set is the context */ /* */ /* C must have space for set->digits digits. */ /* ------------------------------------------------------------------ */ @@ -1032,7 +1043,7 @@ decNumber * decNumberDivideInteger(decNumber *res, const decNumber *lhs, /* */ /* An Inexact result is rounded using DEC_ROUND_HALF_EVEN; it will */ /* almost always be correctly rounded, but may be up to 1 ulp in */ -/* error in rare cases. */ +/* error in rare cases. */ /* ------------------------------------------------------------------ */ /* This is a wrapper for decExpOp which can handle the slightly wider */ /* (double) range needed by Ln (which has to be able to calculate */ @@ -1065,7 +1076,7 @@ decNumber * decNumberExp(decNumber *res, const decNumber *rhs, } #endif decExpOp(res, rhs, set, &status); - } while(0); /* end protected */ + } while(0); /* end protected */ #if DECSUBSET if (allocrhs !=NULL) free(allocrhs); /* drop any storage used */ @@ -1087,7 +1098,7 @@ decNumber * decNumberExp(decNumber *res, const decNumber *rhs, /* lhs is A */ /* rhs is B */ /* fhs is C [far hand side] */ -/* set is the context */ +/* set is the context */ /* */ /* Mathematical function restrictions apply (see above); a NaN is */ /* returned with Invalid_operation if a restriction is violated. */ @@ -1146,7 +1157,7 @@ decNumber * decNumberFMA(decNumber *res, const decNumber *lhs, /* Note sNaN has to go through addOp to shorten payload if */ /* necessary */ if ((status&DEC_Invalid_operation)!=0) { - if (!(status&DEC_sNaN)) { /* but be true invalid */ + if (!(status&DEC_sNaN)) { /* but be true invalid */ decNumberZero(res); /* acc not yet set */ res->bits=DECNAN; break; @@ -1156,12 +1167,12 @@ decNumber * decNumberFMA(decNumber *res, const decNumber *lhs, } #if DECCHECK else { /* multiply was OK */ - if (status!=0) printf("Status=%08lx after FMA multiply\n", status); + if (status!=0) printf("Status=%08lx after FMA multiply\n", (LI)status); } #endif /* add the third operand and result -> res, and all is done */ decAddOp(res, acc, fhs, set, 0, &status); - } while(0); /* end protected */ + } while(0); /* end protected */ if (allocbufa!=NULL) free(allocbufa); /* drop any storage used */ if (status!=0) decStatus(res, status, set); @@ -1206,7 +1217,7 @@ decNumber * decNumberInvert(decNumber *res, const decNumber *rhs, msudigs=MSUDIGITS(set->digits); /* [faster than remainder] */ for (; uc<=msuc; ua++, uc++) { /* Unit loop */ Unit a; /* extract unit */ - Int i, j; /* work */ + Int i, j; /* work */ if (ua>msua) a=0; else a=*ua; *uc=0; /* can now write back */ @@ -1252,7 +1263,7 @@ decNumber * decNumberInvert(decNumber *res, const decNumber *rhs, /* */ /* An Inexact result is rounded using DEC_ROUND_HALF_EVEN; it will */ /* almost always be correctly rounded, but may be up to 1 ulp in */ -/* error in rare cases. */ +/* error in rare cases. */ /* ------------------------------------------------------------------ */ /* This is a wrapper for decLnOp which can handle the slightly wider */ /* (+11) range needed by Ln, Log10, etc. (which may have to be able */ @@ -1287,7 +1298,7 @@ decNumber * decNumberLn(decNumber *res, const decNumber *rhs, } /* extended=0 */ #endif decLnOp(res, rhs, set, &status); - } while(0); /* end protected */ + } while(0); /* end protected */ #if DECSUBSET if (allocrhs !=NULL) free(allocrhs); /* drop any storage used */ @@ -1301,7 +1312,7 @@ decNumber * decNumberLn(decNumber *res, const decNumber *rhs, } /* decNumberLn */ /* ------------------------------------------------------------------ */ -/* decNumberLogB - get adjusted exponent, by 754r rules */ +/* decNumberLogB - get adjusted exponent, by 754 rules */ /* */ /* This computes C = adjustedexponent(A) */ /* */ @@ -1336,9 +1347,9 @@ decNumber * decNumberLogB(decNumber *res, const decNumber *rhs, if (decNumberIsNaN(rhs)) decNaNs(res, rhs, NULL, set, &status); else if (decNumberIsInfinite(rhs)) decNumberCopyAbs(res, rhs); else if (decNumberIsZero(rhs)) { - decNumberZero(res); /* prepare for Infinity */ + decNumberZero(res); /* prepare for Infinity */ res->bits=DECNEG|DECINF; /* -Infinity */ - status|=DEC_Division_by_zero; /* as per 754r */ + status|=DEC_Division_by_zero; /* as per 754 */ } else { /* finite non-zero */ Int ae=rhs->exponent+rhs->digits-1; /* adjusted exponent */ @@ -1352,7 +1363,7 @@ decNumber * decNumberLogB(decNumber *res, const decNumber *rhs, /* ------------------------------------------------------------------ */ /* decNumberLog10 -- logarithm in base 10 */ /* */ -/* This computes C = log10(A) */ +/* This computes C = log10(A) */ /* */ /* res is C, the result. C may be A */ /* rhs is A */ @@ -1371,13 +1382,13 @@ decNumber * decNumberLogB(decNumber *res, const decNumber *rhs, /* */ /* An Inexact result is rounded using DEC_ROUND_HALF_EVEN; it will */ /* almost always be correctly rounded, but may be up to 1 ulp in */ -/* error in rare cases. */ +/* error in rare cases. */ /* ------------------------------------------------------------------ */ /* This calculates ln(A)/ln(10) using appropriate precision. For */ /* ln(A) this is the max(p, rhs->digits + t) + 3, where p is the */ /* requested digits and t is the number of digits in the exponent */ -/* (maximum 6). For ln(10) it is p + 3; this is often handled by the */ -/* fastpath in decLnOp. The final division is done to the requested */ +/* (maximum 6). For ln(10) it is p + 3; this is often handled by the */ +/* fastpath in decLnOp. The final division is done to the requested */ /* precision. */ /* ------------------------------------------------------------------ */ decNumber * decNumberLog10(decNumber *res, const decNumber *rhs, @@ -1444,7 +1455,7 @@ decNumber * decNumberLog10(decNumber *res, const decNumber *rhs, decNumberFromInt32(w, w->exponent); residue=0; decCopyFit(res, w, set, &residue, &status); /* copy & round */ - decFinish(res, set, &residue, &status); /* cleanup/set flags */ + decFinish(res, set, &residue, &status); /* cleanup/set flags */ break; } /* not a power of 10 */ } /* not a candidate for exact */ @@ -1501,7 +1512,7 @@ decNumber * decNumberLog10(decNumber *res, const decNumber *rhs, aset.digits=set->digits; /* for final divide */ decDivideOp(res, a, b, &aset, DIVIDE, &status); /* into result */ - } while(0); /* [for break] */ + } while(0); /* [for break] */ if (allocbufa!=NULL) free(allocbufa); /* drop any storage used */ if (allocbufb!=NULL) free(allocbufb); /* .. */ @@ -1519,12 +1530,12 @@ decNumber * decNumberLog10(decNumber *res, const decNumber *rhs, /* ------------------------------------------------------------------ */ /* decNumberMax -- compare two Numbers and return the maximum */ /* */ -/* This computes C = A ? B, returning the maximum by 754R rules */ +/* This computes C = A ? B, returning the maximum by 754 rules */ /* */ /* res is C, the result. C may be A and/or B (e.g., X=X?X) */ /* lhs is A */ /* rhs is B */ -/* set is the context */ +/* set is the context */ /* */ /* C must have space for set->digits digits. */ /* ------------------------------------------------------------------ */ @@ -1542,12 +1553,12 @@ decNumber * decNumberMax(decNumber *res, const decNumber *lhs, /* ------------------------------------------------------------------ */ /* decNumberMaxMag -- compare and return the maximum by magnitude */ /* */ -/* This computes C = A ? B, returning the maximum by 754R rules */ +/* This computes C = A ? B, returning the maximum by 754 rules */ /* */ /* res is C, the result. C may be A and/or B (e.g., X=X?X) */ /* lhs is A */ /* rhs is B */ -/* set is the context */ +/* set is the context */ /* */ /* C must have space for set->digits digits. */ /* ------------------------------------------------------------------ */ @@ -1565,12 +1576,12 @@ decNumber * decNumberMaxMag(decNumber *res, const decNumber *lhs, /* ------------------------------------------------------------------ */ /* decNumberMin -- compare two Numbers and return the minimum */ /* */ -/* This computes C = A ? B, returning the minimum by 754R rules */ +/* This computes C = A ? B, returning the minimum by 754 rules */ /* */ /* res is C, the result. C may be A and/or B (e.g., X=X?X) */ /* lhs is A */ /* rhs is B */ -/* set is the context */ +/* set is the context */ /* */ /* C must have space for set->digits digits. */ /* ------------------------------------------------------------------ */ @@ -1588,12 +1599,12 @@ decNumber * decNumberMin(decNumber *res, const decNumber *lhs, /* ------------------------------------------------------------------ */ /* decNumberMinMag -- compare and return the minimum by magnitude */ /* */ -/* This computes C = A ? B, returning the minimum by 754R rules */ +/* This computes C = A ? B, returning the minimum by 754 rules */ /* */ /* res is C, the result. C may be A and/or B (e.g., X=X?X) */ /* lhs is A */ /* rhs is B */ -/* set is the context */ +/* set is the context */ /* */ /* C must have space for set->digits digits. */ /* ------------------------------------------------------------------ */ @@ -1615,7 +1626,7 @@ decNumber * decNumberMinMag(decNumber *res, const decNumber *lhs, /* */ /* res is C, the result. C may be A */ /* rhs is A */ -/* set is the context */ +/* set is the context */ /* */ /* See also decNumberCopyNegate for a quiet bitwise version of this. */ /* C must have space for set->digits digits. */ @@ -1632,7 +1643,7 @@ decNumber * decNumberMinus(decNumber *res, const decNumber *rhs, #endif decNumberZero(&dzero); /* make 0 */ - dzero.exponent=rhs->exponent; /* [no coefficient expansion] */ + dzero.exponent=rhs->exponent; /* [no coefficient expansion] */ decAddOp(res, &dzero, rhs, set, DECNEG, &status); if (status!=0) decStatus(res, status, set); #if DECCHECK @@ -1642,15 +1653,15 @@ decNumber * decNumberMinus(decNumber *res, const decNumber *rhs, } /* decNumberMinus */ /* ------------------------------------------------------------------ */ -/* decNumberNextMinus -- next towards -Infinity */ +/* decNumberNextMinus -- next towards -Infinity */ /* */ /* This computes C = A - infinitesimal, rounded towards -Infinity */ /* */ /* res is C, the result. C may be A */ /* rhs is A */ -/* set is the context */ +/* set is the context */ /* */ -/* This is a generalization of 754r NextDown. */ +/* This is a generalization of 754 NextDown. */ /* ------------------------------------------------------------------ */ decNumber * decNumberNextMinus(decNumber *res, const decNumber *rhs, decContext *set) { @@ -1684,9 +1695,9 @@ decNumber * decNumberNextMinus(decNumber *res, const decNumber *rhs, /* */ /* res is C, the result. C may be A */ /* rhs is A */ -/* set is the context */ +/* set is the context */ /* */ -/* This is a generalization of 754r NextUp. */ +/* This is a generalization of 754 NextUp. */ /* ------------------------------------------------------------------ */ decNumber * decNumberNextPlus(decNumber *res, const decNumber *rhs, decContext *set) { @@ -1718,14 +1729,15 @@ decNumber * decNumberNextPlus(decNumber *res, const decNumber *rhs, /* decNumberNextToward -- next towards rhs */ /* */ /* This computes C = A +/- infinitesimal, rounded towards */ -/* +/-Infinity in the direction of B, as per 754r nextafter rules */ +/* +/-Infinity in the direction of B, as per 754-1985 nextafter */ +/* modified during revision but dropped from 754-2008. */ /* */ /* res is C, the result. C may be A or B. */ /* lhs is A */ /* rhs is B */ -/* set is the context */ +/* set is the context */ /* */ -/* This is a generalization of 754r NextAfter. */ +/* This is a generalization of 754-1985 NextAfter. */ /* ------------------------------------------------------------------ */ decNumber * decNumberNextToward(decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set) { @@ -1747,27 +1759,27 @@ decNumber * decNumberNextToward(decNumber *res, const decNumber *lhs, if (result==0) decNumberCopySign(res, lhs, rhs); /* easy */ else { /* differ: need NextPlus or NextMinus */ uByte sub; /* add or subtract */ - if (result<0) { /* lhs<rhs, do nextplus */ + if (result<0) { /* lhs<rhs, do nextplus */ /* -Infinity is the special case */ if ((lhs->bits&(DECINF|DECNEG))==(DECINF|DECNEG)) { decSetMaxValue(res, set); res->bits=DECNEG; /* negative */ - return res; /* there is no status to set */ + return res; /* there is no status to set */ } workset.round=DEC_ROUND_CEILING; sub=0; /* add, please */ } /* plus */ - else { /* lhs>rhs, do nextminus */ + else { /* lhs>rhs, do nextminus */ /* +Infinity is the special case */ if ((lhs->bits&(DECINF|DECNEG))==DECINF) { decSetMaxValue(res, set); - return res; /* there is no status to set */ + return res; /* there is no status to set */ } workset.round=DEC_ROUND_FLOOR; sub=DECNEG; /* subtract, please */ } /* minus */ decNumberZero(&dtiny); /* start with 0 */ - dtiny.lsu[0]=1; /* make number that is .. */ + dtiny.lsu[0]=1; /* make number that is .. */ dtiny.exponent=DEC_MIN_EMIN-1; /* .. smaller than tiniest */ decAddOp(res, lhs, &dtiny, &workset, sub, &status); /* + or - */ /* turn off exceptions if the result is a normal number */ @@ -1856,7 +1868,7 @@ decNumber * decNumberOr(decNumber *res, const decNumber *lhs, /* */ /* res is C, the result. C may be A */ /* rhs is A */ -/* set is the context */ +/* set is the context */ /* */ /* See also decNumberCopy for a quiet bitwise version of this. */ /* C must have space for set->digits digits. */ @@ -1874,7 +1886,7 @@ decNumber * decNumberPlus(decNumber *res, const decNumber *rhs, #endif decNumberZero(&dzero); /* make 0 */ - dzero.exponent=rhs->exponent; /* [no coefficient expansion] */ + dzero.exponent=rhs->exponent; /* [no coefficient expansion] */ decAddOp(res, &dzero, rhs, set, 0, &status); if (status!=0) decStatus(res, status, set); #if DECCHECK @@ -1891,7 +1903,7 @@ decNumber * decNumberPlus(decNumber *res, const decNumber *rhs, /* res is C, the result. C may be A and/or B (e.g., X=X+X) */ /* lhs is A */ /* rhs is B */ -/* set is the context */ +/* set is the context */ /* */ /* C must have space for set->digits digits. */ /* ------------------------------------------------------------------ */ @@ -1914,7 +1926,7 @@ decNumber * decNumberMultiply(decNumber *res, const decNumber *lhs, /* res is C, the result. C may be A and/or B (e.g., X=X**X) */ /* lhs is A */ /* rhs is B */ -/* set is the context */ +/* set is the context */ /* */ /* C must have space for set->digits digits. */ /* */ @@ -1930,7 +1942,7 @@ decNumber * decNumberMultiply(decNumber *res, const decNumber *lhs, /* */ /* The final result is rounded according to the context; it will */ /* almost always be correctly rounded, but may be up to 1 ulp in */ -/* error in rare cases. */ +/* error in rare cases. */ /* ------------------------------------------------------------------ */ decNumber * decNumberPower(decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set) { @@ -1953,7 +1965,7 @@ decNumber * decNumberPower(decNumber *res, const decNumber *lhs, Flag seenbit; /* seen a bit while powering */ Int residue=0; /* rounding residue */ uInt status=0; /* accumulators */ - uByte bits=0; /* result sign if errors */ + uByte bits=0; /* result sign if errors */ decContext aset; /* working context */ decNumber dnOne; /* work value 1... */ /* local accumulator buffer [a decNumber, with digits+elength+1 digits] */ @@ -1993,7 +2005,7 @@ decNumber * decNumberPower(decNumber *res, const decNumber *lhs, if (decNumberIsNegative(lhs) /* lhs<0 */ && !decNumberIsZero(lhs)) /* .. */ status|=DEC_Invalid_operation; - else { /* lhs >=0 */ + else { /* lhs >=0 */ decNumberZero(&dnOne); /* set up 1 */ dnOne.lsu[0]=1; decNumberCompare(dac, lhs, &dnOne, set); /* lhs ? 1 */ @@ -2020,14 +2032,14 @@ decNumber * decNumberPower(decNumber *res, const decNumber *lhs, /* Original rhs may be an integer that fits and is in range */ n=decGetInt(rhs); if (n!=BADINT) { /* it is an integer */ - rhsint=1; /* record the fact for 1**n */ + rhsint=1; /* record the fact for 1**n */ isoddint=(Flag)n&1; /* [works even if big] */ if (n!=BIGEVEN && n!=BIGODD) /* can use integer path? */ useint=1; /* looks good */ } if (decNumberIsNegative(lhs) /* -x .. */ - && isoddint) bits=DECNEG; /* .. to an odd power */ + && isoddint) bits=DECNEG; /* .. to an odd power */ /* handle LHS infinity */ if (decNumberIsInfinite(lhs)) { /* [NaNs already handled] */ @@ -2060,7 +2072,7 @@ decNumber * decNumberPower(decNumber *res, const decNumber *lhs, uByte rbits=rhs->bits; /* save */ if (rbits & DECNEG) { /* was a 0**(-n) */ #if DECSUBSET - if (!set->extended) { /* [bad if subset] */ + if (!set->extended) { /* [bad if subset] */ status|=DEC_Invalid_operation; break;} #endif @@ -2089,7 +2101,7 @@ decNumber * decNumberPower(decNumber *res, const decNumber *lhs, aset.clamp=0; /* and no concrete format */ /* calculate the result using exp(ln(lhs)*rhs), which can */ - /* all be done into the accumulator, dac. The precision needed */ + /* all be done into the accumulator, dac. The precision needed */ /* is enough to contain the full information in the lhs (which */ /* is the total digits, including exponent), or the requested */ /* precision, if larger, + 4; 6 is used for the exponent */ @@ -2146,7 +2158,7 @@ decNumber * decNumberPower(decNumber *res, const decNumber *lhs, if (!rhsint) { /* add padding */ Int shift=set->digits-1; dac->digits=decShiftToMost(dac->lsu, 1, shift); - dac->exponent=-shift; /* make 1.0000... */ + dac->exponent=-shift; /* make 1.0000... */ status|=DEC_Inexact|DEC_Rounded; /* deemed inexact */ } } @@ -2164,7 +2176,7 @@ decNumber * decNumberPower(decNumber *res, const decNumber *lhs, /* if a negative power the constant 1 is needed, and if not subset */ /* invert the lhs now rather than inverting the result later */ if (decNumberIsNegative(rhs)) { /* was a **-n [hence digits>0] */ - decNumber *inv=invbuff; /* asssume use fixed buffer */ + decNumber *inv=invbuff; /* asssume use fixed buffer */ decNumberCopy(&dnOne, dac); /* dnOne=1; [needed now or later] */ #if DECSUBSET if (set->extended) { /* need to calculate 1/lhs */ @@ -2197,13 +2209,13 @@ decNumber * decNumberPower(decNumber *res, const decNumber *lhs, } /* [the following two lines revealed an optimizer bug in a C++ */ /* compiler, with symptom: 5**3 -> 25, when n=n+n was used] */ - n=n<<1; /* move next bit to testable position */ + n=n<<1; /* move next bit to testable position */ if (n<0) { /* top bit is set */ seenbit=1; /* OK, significant bit seen */ decMultiplyOp(dac, dac, lhs, &aset, &status); /* dac=dac*x */ } if (i==31) break; /* that was the last bit */ - if (!seenbit) continue; /* no need to square 1 */ + if (!seenbit) continue; /* no need to square 1 */ decMultiplyOp(dac, dac, dac, &aset, &status); /* dac=dac*dac [square] */ } /*i*/ /* 32 bits */ @@ -2242,9 +2254,9 @@ decNumber * decNumberPower(decNumber *res, const decNumber *lhs, decCopyFit(res, dac, set, &residue, &status); decFinish(res, set, &residue, &status); /* final cleanup */ #if DECSUBSET - if (!set->extended) decTrim(res, set, 0, &dropped); /* trailing zeros */ + if (!set->extended) decTrim(res, set, 0, 1, &dropped); /* trailing zeros */ #endif - } while(0); /* end protected */ + } while(0); /* end protected */ if (allocdac!=NULL) free(allocdac); /* drop any storage used */ if (allocinv!=NULL) free(allocinv); /* .. */ @@ -2270,7 +2282,7 @@ decNumber * decNumberPower(decNumber *res, const decNumber *lhs, /* res is C, the result. C may be A or B */ /* lhs is A, the number to adjust */ /* rhs is B, the number with exponent to match */ -/* set is the context */ +/* set is the context */ /* */ /* C must have space for set->digits digits. */ /* */ @@ -2288,11 +2300,11 @@ decNumber * decNumberQuantize(decNumber *res, const decNumber *lhs, /* ------------------------------------------------------------------ */ /* decNumberReduce -- remove trailing zeros */ /* */ -/* This computes C = 0 + A, and normalizes the result */ +/* This computes C = 0 + A, and normalizes the result */ /* */ /* res is C, the result. C may be A */ /* rhs is A */ -/* set is the context */ +/* set is the context */ /* */ /* C must have space for set->digits digits. */ /* ------------------------------------------------------------------ */ @@ -2309,7 +2321,7 @@ decNumber * decNumberReduce(decNumber *res, const decNumber *rhs, #endif uInt status=0; /* as usual */ Int residue=0; /* as usual */ - Int dropped; /* work */ + Int dropped; /* work */ #if DECCHECK if (decCheckOperands(res, DECUNUSED, rhs, set)) return res; @@ -2337,8 +2349,9 @@ decNumber * decNumberReduce(decNumber *res, const decNumber *rhs, /* reduce result to the requested length and copy to result */ decCopyFit(res, rhs, set, &residue, &status); /* copy & round */ decFinish(res, set, &residue, &status); /* cleanup/set flags */ - decTrim(res, set, 1, &dropped); /* normalize in place */ - } while(0); /* end protected */ + decTrim(res, set, 1, 0, &dropped); /* normalize in place */ + /* [may clamp] */ + } while(0); /* end protected */ #if DECSUBSET if (allocrhs !=NULL) free(allocrhs); /* .. */ @@ -2358,7 +2371,7 @@ decNumber * decNumberReduce(decNumber *res, const decNumber *rhs, /* res is C, the result. C may be A or B */ /* lhs is A, the number to adjust */ /* rhs is B, the requested exponent */ -/* set is the context */ +/* set is the context */ /* */ /* C must have space for set->digits digits. */ /* */ @@ -2381,7 +2394,7 @@ decNumber * decNumberRescale(decNumber *res, const decNumber *lhs, /* res is C, the result. C may be A and/or B (e.g., X=X%X) */ /* lhs is A */ /* rhs is B */ -/* set is the context */ +/* set is the context */ /* */ /* C must have space for set->digits digits. */ /* ------------------------------------------------------------------ */ @@ -2404,7 +2417,7 @@ decNumber * decNumberRemainder(decNumber *res, const decNumber *lhs, /* res is C, the result. C may be A and/or B (e.g., X=X%X) */ /* lhs is A */ /* rhs is B */ -/* set is the context */ +/* set is the context */ /* */ /* C must have space for set->digits digits. */ /* ------------------------------------------------------------------ */ @@ -2425,15 +2438,15 @@ decNumber * decNumberRemainderNear(decNumber *res, const decNumber *lhs, /* This computes C = A rot B (in base ten and rotating set->digits */ /* digits). */ /* */ -/* res is C, the result. C may be A and/or B (e.g., X=XrotX) */ +/* res is C, the result. C may be A and/or B (e.g., X=XrotX) */ /* lhs is A */ /* rhs is B, the number of digits to rotate (-ve to right) */ -/* set is the context */ +/* set is the context */ /* */ /* The digits of the coefficient of A are rotated to the left (if B */ /* is positive) or to the right (if B is negative) without adjusting */ /* the exponent or the sign of A. If lhs->digits is less than */ -/* set->digits the coefficient is padded with zeros on the left */ +/* set->digits the coefficient is padded with zeros on the left */ /* before the rotate. Any leading zeros in the result are removed */ /* as usual. */ /* */ @@ -2473,10 +2486,10 @@ decNumber * decNumberRotate(decNumber *res, const decNumber *lhs, && !decNumberIsInfinite(res)) { /* lhs was infinite */ /* left-rotate to do; 0 < rotate < set->digits */ uInt units, shift; /* work */ - uInt msudigits; /* digits in result msu */ + uInt msudigits; /* digits in result msu */ Unit *msu=res->lsu+D2U(res->digits)-1; /* current msu */ Unit *msumax=res->lsu+D2U(set->digits)-1; /* rotation msu */ - for (msu++; msu<=msumax; msu++) *msu=0; /* ensure high units=0 */ + for (msu++; msu<=msumax; msu++) *msu=0; /* ensure high units=0 */ res->digits=set->digits; /* now full-length */ msudigits=MSUDIGITS(res->digits); /* actual digits in msu */ @@ -2544,7 +2557,7 @@ decNumber * decNumberRotate(decNumber *res, const decNumber *lhs, /* (reversing is easy and fast) */ decReverse(res->lsu+units, msumax); /* left part */ decReverse(res->lsu, res->lsu+units-1); /* right part */ - decReverse(res->lsu, msumax); /* whole */ + decReverse(res->lsu, msumax); /* whole */ } /* whole units to rotate */ /* the rotation may have left an undetermined number of zeros */ /* on the left, so true length needs to be calculated */ @@ -2559,7 +2572,7 @@ decNumber * decNumberRotate(decNumber *res, const decNumber *lhs, /* ------------------------------------------------------------------ */ /* decNumberSameQuantum -- test for equal exponents */ /* */ -/* res is the result number, which will contain either 0 or 1 */ +/* res is the result number, which will contain either 0 or 1 */ /* lhs is a number to test */ /* rhs is the second (usually a pattern) */ /* */ @@ -2586,15 +2599,15 @@ decNumber * decNumberSameQuantum(decNumber *res, const decNumber *lhs, } /* decNumberSameQuantum */ /* ------------------------------------------------------------------ */ -/* decNumberScaleB -- multiply by a power of 10 */ +/* decNumberScaleB -- multiply by a power of 10 */ /* */ -/* This computes C = A x 10**B where B is an integer (q=0) with */ +/* This computes C = A x 10**B where B is an integer (q=0) with */ /* maximum magnitude 2*(emax+digits) */ /* */ /* res is C, the result. C may be A or B */ /* lhs is A, the number to adjust */ /* rhs is B, the requested power of ten to use */ -/* set is the context */ +/* set is the context */ /* */ /* C must have space for set->digits digits. */ /* */ @@ -2604,7 +2617,7 @@ decNumber * decNumberScaleB(decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set) { Int reqexp; /* requested exponent change [B] */ uInt status=0; /* accumulator */ - Int residue; /* work */ + Int residue; /* work */ #if DECCHECK if (decCheckOperands(res, lhs, rhs, set)) return res; @@ -2644,7 +2657,7 @@ decNumber * decNumberScaleB(decNumber *res, const decNumber *lhs, /* res is C, the result. C may be A and/or B (e.g., X=X<<X) */ /* lhs is A */ /* rhs is B, the number of digits to shift (-ve to right) */ -/* set is the context */ +/* set is the context */ /* */ /* The digits of the coefficient of A are shifted to the left (if B */ /* is positive) or to the right (if B is negative) without adjusting */ @@ -2675,8 +2688,8 @@ decNumber * decNumberShift(decNumber *res, const decNumber *lhs, else { /* both numeric, rhs is an integer */ shift=decGetInt(rhs); /* [cannot fail] */ if (shift==BADINT /* something bad .. */ - || shift==BIGODD || shift==BIGEVEN /* .. very big .. */ - || abs(shift)>set->digits) /* .. or out of range */ + || shift==BIGODD || shift==BIGEVEN /* .. very big .. */ + || abs(shift)>set->digits) /* .. or out of range */ status=DEC_Invalid_operation; else { /* rhs is OK */ decNumberCopy(res, lhs); @@ -2744,27 +2757,27 @@ decNumber * decNumberShift(decNumber *res, const decNumber *lhs, /* if x < 0 then */ /* assert false */ /* else */ -/* result 0 */ +/* result 0 */ /* end if */ /* end if */ -/* var f := setexp(x, 0) % fraction part of x [0.1 <= x < 1] */ +/* var f := setexp(x, 0) % fraction part of x [0.1 <= x < 1] */ /* var e := getexp(x) % exponent part of x */ /* var approx : real */ -/* if e mod 2 = 0 then */ +/* if e mod 2 = 0 then */ /* approx := .259 + .819 * f % approx to root of f */ -/* else */ +/* else */ /* f := f/l0 % adjustments */ -/* e := e + 1 % for odd */ -/* approx := .0819 + 2.59 * f % exponent */ +/* e := e + 1 % for odd */ +/* approx := .0819 + 2.59 * f % exponent */ /* end if */ /* */ /* var p:= 3 */ /* const maxp := currentprecision + 2 */ -/* loop */ +/* loop */ /* p := min(2*p - 2, maxp) % p = 4,6,10, . . . , maxp */ /* precision p */ -/* approx := .5 * (approx + f/approx) */ -/* exit when p = maxp */ +/* approx := .5 * (approx + f/approx) */ +/* exit when p = maxp */ /* end loop */ /* */ /* % approx is now within 1 ulp of the properly rounded square root */ @@ -2794,11 +2807,11 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs, Int workp; /* working precision */ Int residue=0; /* rounding residue */ uInt status=0, ignore=0; /* status accumulators */ - uInt rstatus; /* .. */ + uInt rstatus; /* .. */ Int exp; /* working exponent */ Int ideal; /* ideal (preferred) exponent */ Int needbytes; /* work */ - Int dropped; /* .. */ + Int dropped; /* .. */ #if DECSUBSET decNumber *allocrhs=NULL; /* non-NULL if rounded rhs allocated */ @@ -2849,9 +2862,9 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs, } /* calculate the ideal (preferred) exponent [floor(exp/2)] */ - /* [We would like to write: ideal=rhs->exponent>>1, but this */ + /* [It would be nicer to write: ideal=rhs->exponent>>1, but this */ /* generates a compiler warning. Generated code is the same.] */ - ideal=(rhs->exponent&~1)/2; /* target */ + ideal=(rhs->exponent&~1)/2; /* target */ /* handle zeros */ if (ISZERO(rhs)) { @@ -2876,6 +2889,7 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs, /* b -- intermediate temporary result (same size as a) */ /* if any is too long for local storage, then allocate */ workp=MAXI(set->digits+1, rhs->digits); /* actual rounding precision */ + workp=MAXI(workp, 7); /* at least 7 for low cases */ maxp=workp+2; /* largest working precision */ needbytes=sizeof(decNumber)+(D2U(rhs->digits)-1)*sizeof(Unit); @@ -2891,7 +2905,7 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs, if (needbytes>(Int)sizeof(bufa)) { /* [same applies to b] */ allocbufa=(decNumber *)malloc(needbytes); allocbufb=(decNumber *)malloc(needbytes); - if (allocbufa==NULL || allocbufb==NULL) { /* hopeless */ + if (allocbufa==NULL || allocbufb==NULL) { /* hopeless */ status|=DEC_Insufficient_storage; break;} a=allocbufa; /* use the allocated spaces */ @@ -2905,6 +2919,8 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs, /* set up working context */ decContextDefault(&workset, DEC_INIT_DECIMAL64); + workset.emax=DEC_MAX_EMAX; + workset.emin=DEC_MIN_EMIN; /* [Until further notice, no error is possible and status bits */ /* (Rounded, etc.) should be ignored, not accumulated.] */ @@ -2913,7 +2929,7 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs, workset.digits=workp; /* p for initial calculation */ t->bits=0; t->digits=3; a->bits=0; a->digits=3; - if ((exp & 1)==0) { /* even exponent */ + if ((exp & 1)==0) { /* even exponent */ /* Set t=0.259, a=0.819 */ t->exponent=-3; a->exponent=-3; @@ -2945,6 +2961,7 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs, a->lsu[0]=9; a->lsu[1]=5; a->lsu[2]=2; #endif } + decMultiplyOp(a, a, f, &workset, &ignore); /* a=a*f */ decAddOp(a, a, t, &workset, 0, &ignore); /* ..+t */ /* [a is now the initial approximation for sqrt(f), calculated with */ @@ -2956,16 +2973,14 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs, t->lsu[0]=5; /* .. */ t->exponent=-1; /* .. */ workset.digits=3; /* initial p */ - for (;;) { + for (; workset.digits<maxp;) { /* set p to min(2*p - 2, maxp) [hence 3; or: 4, 6, 10, ... , maxp] */ - workset.digits=workset.digits*2-2; - if (workset.digits>maxp) workset.digits=maxp; + workset.digits=MINI(workset.digits*2-2, maxp); /* a = 0.5 * (a + f/a) */ /* [calculated at p then rounded to currentprecision] */ decDivideOp(b, f, a, &workset, DIVIDE, &ignore); /* b=f/a */ - decAddOp(b, b, a, &workset, 0, &ignore); /* b=b+a */ - decMultiplyOp(a, b, t, &workset, &ignore); /* a=b*0.5 */ - if (a->digits==maxp) break; /* have required digits */ + decAddOp(b, b, a, &workset, 0, &ignore); /* b=b+a */ + decMultiplyOp(a, b, t, &workset, &ignore); /* a=b*0.5 */ } /* loop */ /* Here, 0.1 <= a < 1 [Hull], and a has maxp digits */ @@ -2974,8 +2989,7 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs, /* correctly */ approxset=*set; /* get emin, emax, etc. */ approxset.round=DEC_ROUND_HALF_EVEN; - a->exponent+=exp/2; /* set correct exponent */ - + a->exponent+=exp/2; /* set correct exponent */ rstatus=0; /* clear status */ residue=0; /* .. and accumulator */ decCopyFit(a, a, &approxset, &residue, &rstatus); /* reduce (if needed) */ @@ -2993,7 +3007,7 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs, status|=(rstatus & ~(DEC_Rounded|DEC_Inexact)); /* Carry out the Hull correction */ - a->exponent-=exp/2; /* back to 0.1->1 */ + a->exponent-=exp/2; /* back to 0.1->1 */ /* a is now at final precision and within 1 ulp of the properly */ /* rounded square root of f; to ensure proper rounding, compare */ @@ -3035,18 +3049,18 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs, /* estimation are irrelevant, so status was not accumulated] */ /* Here, 0.1 <= a < 1 (still), so adjust back */ - a->exponent+=exp/2; /* set correct exponent */ + a->exponent+=exp/2; /* set correct exponent */ /* count droppable zeros [after any subnormal rounding] by */ /* trimming a copy */ decNumberCopy(b, a); - decTrim(b, set, 1, &dropped); /* [drops trailing zeros] */ + decTrim(b, set, 1, 1, &dropped); /* [drops trailing zeros] */ - /* Set Inexact and Rounded. The answer can only be exact if */ - /* it is short enough so that squaring it could fit in workp digits, */ - /* and it cannot have trailing zeros due to clamping, so these are */ - /* the only (relatively rare) conditions a careful check is needed */ - if (b->digits*2-1 > workp && !set->clamp) { /* cannot fit */ + /* Set Inexact and Rounded. The answer can only be exact if */ + /* it is short enough so that squaring it could fit in workp */ + /* digits, so this is the only (relatively rare) condition that */ + /* a careful check is needed */ + if (b->digits*2-1 > workp) { /* cannot fit */ status|=DEC_Inexact|DEC_Rounded; } else { /* could be exact/unrounded */ @@ -3058,12 +3072,19 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs, else { /* plausible */ decCompareOp(t, b, rhs, &workset, COMPARE, &mstatus); /* b ? rhs */ if (!ISZERO(t)) status|=DEC_Inexact|DEC_Rounded; /* not equal */ - else { /* is Exact */ + else { /* is Exact */ /* here, dropped is the count of trailing zeros in 'a' */ /* use closest exponent to ideal... */ - Int todrop=ideal-a->exponent; /* most that can be dropped */ + Int todrop=ideal-a->exponent; /* most that can be dropped */ if (todrop<0) status|=DEC_Rounded; /* ideally would add 0s */ else { /* unrounded */ + /* there are some to drop, but emax may not allow all */ + Int maxexp=set->emax-set->digits+1; + Int maxdrop=maxexp-a->exponent; + if (todrop>maxdrop && set->clamp) { /* apply clamping */ + todrop=maxdrop; + status|=DEC_Clamped; + } if (dropped<todrop) { /* clamp to those available */ todrop=dropped; status|=DEC_Clamped; @@ -3093,11 +3114,11 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs, } decNumberCopy(res, a); /* a is now the result */ - } while(0); /* end protected */ + } while(0); /* end protected */ - if (allocbuff!=NULL) free(allocbuff); /* drop any storage used */ - if (allocbufa!=NULL) free(allocbufa); /* .. */ - if (allocbufb!=NULL) free(allocbufb); /* .. */ + if (allocbuff!=NULL) free(allocbuff); /* drop any storage used */ + if (allocbufa!=NULL) free(allocbufa); /* .. */ + if (allocbufb!=NULL) free(allocbufb); /* .. */ #if DECSUBSET if (allocrhs !=NULL) free(allocrhs); /* .. */ #endif @@ -3116,7 +3137,7 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs, /* res is C, the result. C may be A and/or B (e.g., X=X-X) */ /* lhs is A */ /* rhs is B */ -/* set is the context */ +/* set is the context */ /* */ /* C must have space for set->digits digits. */ /* ------------------------------------------------------------------ */ @@ -3138,7 +3159,7 @@ decNumber * decNumberSubtract(decNumber *res, const decNumber *lhs, /* */ /* res is the result */ /* rhs is input number */ -/* set is the context */ +/* set is the context */ /* */ /* res must have space for any value of rhs. */ /* */ @@ -3173,9 +3194,9 @@ decNumber * decNumberToIntegralExact(decNumber *res, const decNumber *rhs, if (rhs->exponent>=0) return decNumberCopy(res, rhs); /* that was easy, but if negative exponent there is work to do... */ workset=*set; /* clone rounding, etc. */ - workset.digits=rhs->digits; /* no length rounding */ + workset.digits=rhs->digits; /* no length rounding */ workset.traps=0; /* no traps */ - decNumberZero(&dn); /* make a number with exponent 0 */ + decNumberZero(&dn); /* make a number with exponent 0 */ decNumberQuantize(res, rhs, &dn, &workset); status|=workset.status; } @@ -3269,9 +3290,9 @@ decNumber * decNumberXor(decNumber *res, const decNumber *lhs, /* ================================================================== */ /* ------------------------------------------------------------------ */ -/* decNumberClass -- return the decClass of a decNumber */ +/* decNumberClass -- return the decClass of a decNumber */ /* dn -- the decNumber to test */ -/* set -- the context to use for Emin */ +/* set -- the context to use for Emin */ /* returns the decClass enum */ /* ------------------------------------------------------------------ */ enum decClass decNumberClass(const decNumber *dn, decContext *set) { @@ -3347,7 +3368,7 @@ decNumber * decNumberCopy(decNumber *dest, const decNumber *src) { const Unit *smsup, *s; /* work */ Unit *d; /* .. */ /* memcpy for the remaining Units would be safe as they cannot */ - /* overlap. However, this explicit loop is faster in short cases. */ + /* overlap. However, this explicit loop is faster in short cases. */ d=dest->lsu+1; /* -> first destination */ smsup=src->lsu+D2U(src->digits); /* -> source msu+1 */ for (s=src->lsu+1; s<smsup; s++, d++) *d=*s; @@ -3400,7 +3421,7 @@ decNumber * decNumberCopyNegate(decNumber *res, const decNumber *rhs) { /* ------------------------------------------------------------------ */ /* decNumberCopySign -- quiet copy and set sign operator */ /* */ -/* This sets C = A with the sign of B */ +/* This sets C = A with the sign of B */ /* */ /* res is C, the result. C may be A */ /* lhs is A */ @@ -3424,7 +3445,7 @@ decNumber * decNumberCopySign(decNumber *res, const decNumber *lhs, /* ------------------------------------------------------------------ */ /* decNumberGetBCD -- get the coefficient in BCD8 */ -/* dn is the source decNumber */ +/* dn is the source decNumber */ /* bcd is the uInt array that will receive dn->digits BCD bytes, */ /* most-significant at offset 0 */ /* returns bcd */ @@ -3432,14 +3453,14 @@ decNumber * decNumberCopySign(decNumber *res, const decNumber *lhs, /* bcd must have at least dn->digits bytes. No error is possible; if */ /* dn is a NaN or Infinite, digits must be 1 and the coefficient 0. */ /* ------------------------------------------------------------------ */ -uByte * decNumberGetBCD(const decNumber *dn, uint8_t *bcd) { +uByte * decNumberGetBCD(const decNumber *dn, uByte *bcd) { uByte *ub=bcd+dn->digits-1; /* -> lsd */ const Unit *up=dn->lsu; /* Unit pointer, -> lsu */ #if DECDPUN==1 /* trivial simple copy */ for (; ub>=bcd; ub--, up++) *ub=*up; - #else /* chopping needed */ - uInt u=*up; /* work */ + #else /* chopping needed */ + uInt u=*up; /* work */ uInt cut=DECDPUN; /* downcounter through unit */ for (; ub>=bcd; ub--) { *ub=(uByte)(u%10); /* [*6554 trick inhibits, here] */ @@ -3456,11 +3477,11 @@ uByte * decNumberGetBCD(const decNumber *dn, uint8_t *bcd) { /* ------------------------------------------------------------------ */ /* decNumberSetBCD -- set (replace) the coefficient from BCD8 */ -/* dn is the target decNumber */ +/* dn is the target decNumber */ /* bcd is the uInt array that will source n BCD bytes, most- */ /* significant at offset 0 */ /* n is the number of digits in the source BCD array (bcd) */ -/* returns dn */ +/* returns dn */ /* */ /* dn must have space for at least n digits. No error is possible; */ /* if dn is a NaN, or Infinite, or is to become a zero, n must be 1 */ @@ -3472,7 +3493,7 @@ decNumber * decNumberSetBCD(decNumber *dn, const uByte *bcd, uInt n) { #if DECDPUN==1 /* trivial simple copy */ for (; ub<bcd+n; ub++, up--) *up=*ub; - #else /* some assembly needed */ + #else /* some assembly needed */ /* calculate how many digits in msu, and hence first cut */ Int cut=MSUDIGITS(n); /* [faster than remainder] */ for (;up>=dn->lsu; up--) { /* each Unit from msu */ @@ -3481,14 +3502,14 @@ decNumber * decNumberSetBCD(decNumber *dn, const uByte *bcd, uInt n) { cut=DECDPUN; /* next Unit has all digits */ } #endif - dn->digits=n; /* set digit count */ + dn->digits=n; /* set digit count */ return dn; } /* decNumberSetBCD */ /* ------------------------------------------------------------------ */ /* decNumberIsNormal -- test normality of a decNumber */ /* dn is the decNumber to test */ -/* set is the context to use for Emin */ +/* set is the context to use for Emin */ /* returns 1 if |dn| is finite and >=Nmin, 0 otherwise */ /* ------------------------------------------------------------------ */ Int decNumberIsNormal(const decNumber *dn, decContext *set) { @@ -3500,7 +3521,7 @@ Int decNumberIsNormal(const decNumber *dn, decContext *set) { if (decNumberIsSpecial(dn)) return 0; /* not finite */ if (decNumberIsZero(dn)) return 0; /* not non-zero */ - ae=dn->exponent+dn->digits-1; /* adjusted exponent */ + ae=dn->exponent+dn->digits-1; /* adjusted exponent */ if (ae<set->emin) return 0; /* is subnormal */ return 1; } /* decNumberIsNormal */ @@ -3508,7 +3529,7 @@ Int decNumberIsNormal(const decNumber *dn, decContext *set) { /* ------------------------------------------------------------------ */ /* decNumberIsSubnormal -- test subnormality of a decNumber */ /* dn is the decNumber to test */ -/* set is the context to use for Emin */ +/* set is the context to use for Emin */ /* returns 1 if |dn| is finite, non-zero, and <Nmin, 0 otherwise */ /* ------------------------------------------------------------------ */ Int decNumberIsSubnormal(const decNumber *dn, decContext *set) { @@ -3520,7 +3541,7 @@ Int decNumberIsSubnormal(const decNumber *dn, decContext *set) { if (decNumberIsSpecial(dn)) return 0; /* not finite */ if (decNumberIsZero(dn)) return 0; /* not non-zero */ - ae=dn->exponent+dn->digits-1; /* adjusted exponent */ + ae=dn->exponent+dn->digits-1; /* adjusted exponent */ if (ae<set->emin) return 1; /* is subnormal */ return 0; } /* decNumberIsSubnormal */ @@ -3529,19 +3550,20 @@ Int decNumberIsSubnormal(const decNumber *dn, decContext *set) { /* decNumberTrim -- remove insignificant zeros */ /* */ /* dn is the number to trim */ -/* returns dn */ +/* returns dn */ /* */ /* All fields are updated as required. This is a utility operation, */ -/* so special values are unchanged and no error is possible. */ +/* so special values are unchanged and no error is possible. The */ +/* zeros are removed unconditionally. */ /* ------------------------------------------------------------------ */ decNumber * decNumberTrim(decNumber *dn) { - Int dropped; /* work */ + Int dropped; /* work */ decContext set; /* .. */ #if DECCHECK if (decCheckOperands(DECUNRESU, DECUNUSED, dn, DECUNCONT)) return dn; #endif decContextDefault(&set, DEC_INIT_BASE); /* clamp=0 */ - return decTrim(dn, &set, 0, &dropped); + return decTrim(dn, &set, 0, 1, &dropped); } /* decNumberTrim */ /* ------------------------------------------------------------------ */ @@ -3557,7 +3579,7 @@ const char * decNumberVersion(void) { /* decNumberZero -- set a number to 0 */ /* */ /* dn is the number to set, with space for one digit */ -/* returns dn */ +/* returns dn */ /* */ /* No error is possible. */ /* ------------------------------------------------------------------ */ @@ -3582,7 +3604,7 @@ decNumber * decNumberZero(decNumber *dn) { /* ------------------------------------------------------------------ */ /* decToString -- lay out a number into a string */ /* */ -/* dn is the number to lay out */ +/* dn is the number to lay out */ /* string is where to lay out the number */ /* eng is 1 if Engineering, 0 if Scientific */ /* */ @@ -3596,7 +3618,7 @@ decNumber * decNumberZero(decNumber *dn) { /* If DECCHECK is enabled the string "?" is returned if a number is */ /* invalid. */ static void decToString(const decNumber *dn, char *string, Flag eng) { - Int exp=dn->exponent; /* local copy */ + Int exp=dn->exponent; /* local copy */ Int e; /* E-part value */ Int pre; /* digits before the '.' */ Int cut; /* for counting digits in a Unit */ @@ -3616,7 +3638,7 @@ static void decToString(const decNumber *dn, char *string, Flag eng) { } if (dn->bits&DECSPECIAL) { /* Is a special value */ if (decNumberIsInfinite(dn)) { - strcpy(c, "Inf"); + strcpy(c, "Inf"); strcpy(c+3, "inity"); return;} /* a NaN */ @@ -3636,7 +3658,7 @@ static void decToString(const decNumber *dn, char *string, Flag eng) { cut=MSUDIGITS(dn->digits); /* [faster than remainder] */ cut--; /* power of ten for digit */ - if (exp==0) { /* simple integer [common fastpath] */ + if (exp==0) { /* simple integer [common fastpath] */ for (;up>=dn->lsu; up--) { /* each Unit from msu */ u=*up; /* contains DECDPUN digits to lay out */ for (; cut>=0; c++, cut--) TODIGIT(u, cut, c, pow); @@ -3649,7 +3671,7 @@ static void decToString(const decNumber *dn, char *string, Flag eng) { pre=dn->digits+exp; /* digits before '.' */ e=0; /* no E */ if ((exp>0) || (pre<-5)) { /* need exponential form */ - e=exp+dn->digits-1; /* calculate E value */ + e=exp+dn->digits-1; /* calculate E value */ pre=1; /* assume one digit before '.' */ if (eng && (e!=0)) { /* engineering: may need to adjust */ Int adj; /* adjustment */ @@ -3682,14 +3704,14 @@ static void decToString(const decNumber *dn, char *string, Flag eng) { Int n=pre; for (; pre>0; pre--, c++, cut--) { if (cut<0) { /* need new Unit */ - if (up==dn->lsu) break; /* out of input digits (pre>digits) */ + if (up==dn->lsu) break; /* out of input digits (pre>digits) */ up--; cut=DECDPUN-1; u=*up; } TODIGIT(u, cut, c, pow); } - if (n<dn->digits) { /* more to come, after '.' */ + if (n<dn->digits) { /* more to come, after '.' */ *c='.'; c++; for (;; c++, cut--) { if (cut<0) { /* need new Unit */ @@ -3709,7 +3731,7 @@ static void decToString(const decNumber *dn, char *string, Flag eng) { for (; pre<0; pre++, c++) *c='0'; /* add any 0's after '.' */ for (; ; c++, cut--) { if (cut<0) { /* need new Unit */ - if (up==dn->lsu) break; /* out of input digits */ + if (up==dn->lsu) break; /* out of input digits */ up--; cut=DECDPUN-1; u=*up; @@ -3718,11 +3740,11 @@ static void decToString(const decNumber *dn, char *string, Flag eng) { } } - /* Finally add the E-part, if needed. It will never be 0, has a + /* Finally add the E-part, if needed. It will never be 0, has a base maximum and minimum of +999999999 through -999999999, but could range down to -1999999998 for anormal numbers */ if (e!=0) { - Flag had=0; /* 1=had non-zero */ + Flag had=0; /* 1=had non-zero */ *c='E'; c++; *c='+'; c++; /* assume positive */ u=e; /* .. */ @@ -3750,7 +3772,7 @@ static void decToString(const decNumber *dn, char *string, Flag eng) { /* res is C, the result. C may be A and/or B (e.g., X=X+X) */ /* lhs is A */ /* rhs is B */ -/* set is the context */ +/* set is the context */ /* negate is DECNEG if rhs should be negated, or 0 otherwise */ /* status accumulates status for the caller */ /* */ @@ -3758,9 +3780,9 @@ static void decToString(const decNumber *dn, char *string, Flag eng) { /* Inexact in status must be 0 for correct Exact zero sign in result */ /* ------------------------------------------------------------------ */ /* If possible, the coefficient is calculated directly into C. */ -/* However, if: */ +/* However, if: */ /* -- a digits+1 calculation is needed because the numbers are */ -/* unaligned and span more than set->digits digits */ +/* unaligned and span more than set->digits digits */ /* -- a carry to digits+1 digits looks possible */ /* -- C is the same as A or B, and the result would destructively */ /* overlap the A or B coefficient */ @@ -3794,7 +3816,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs, Unit accbuff[SD2U(DECBUFFER*2+20)]; /* local buffer [*2+20 reduces many */ /* allocations when called from */ /* other operations, notable exp] */ - Unit *allocacc=NULL; /* -> allocated acc buffer, iff allocated */ + Unit *allocacc=NULL; /* -> allocated acc buffer, iff allocated */ Int reqdigits=set->digits; /* local copy; requested DIGITS */ Int padding; /* work */ @@ -3839,7 +3861,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs, else bits=(rhs->bits^negate) & DECNEG;/* RHS must be Infinity */ bits|=DECINF; decNumberZero(res); - res->bits=bits; /* set +/- infinity */ + res->bits=bits; /* set +/- infinity */ } /* an infinity */ break; } @@ -3857,7 +3879,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs, #endif /* exponent will be the lower of the two */ adjust=lexp-res->exponent; /* adjustment needed [if -ve] */ - if (ISZERO(res)) { /* both 0: special IEEE 854 rules */ + if (ISZERO(res)) { /* both 0: special IEEE 754 rules */ if (adjust<0) res->exponent=lexp; /* set exponent */ /* 0-0 gives +0 unless rounding to -infinity, and -0-0 gives -0 */ if (diffsign) { @@ -3893,7 +3915,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs, /* exponent will be the lower of the two */ /* [0-0 case handled above] */ adjust=rexp-res->exponent; /* adjustment needed [if -ve] */ - if (adjust<0) { /* 0-padding needed */ + if (adjust<0) { /* 0-padding needed */ if ((res->digits-adjust)>set->digits) { adjust=res->digits-set->digits; /* to fit exactly */ *status|=DEC_Rounded; /* [but exact] */ @@ -3954,7 +3976,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs, /* other) padding with up to DIGITS-1 trailing zeros may be */ /* needed; then apply rounding (as exotic rounding modes may be */ /* affected by the residue). */ - rhsshift=0; /* rhs shift to left (padding) in Units */ + rhsshift=0; /* rhs shift to left (padding) in Units */ bits=lhs->bits; /* assume sign is that of LHS */ mult=1; /* likely multiplier */ @@ -3980,13 +4002,13 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs, /* for residue use the relative sign indication... */ Int shift=reqdigits-rhs->digits; /* left shift needed */ residue=1; /* residue for rounding */ - if (diffsign) residue=-residue; /* signs differ */ + if (diffsign) residue=-residue; /* signs differ */ /* copy, shortening if necessary */ decCopyFit(res, rhs, set, &residue, status); /* if it was already shorter, then need to pad with zeros */ if (shift>0) { res->digits=decShiftToMost(res->lsu, res->digits, shift); - res->exponent-=shift; /* adjust the exponent. */ + res->exponent-=shift; /* adjust the exponent. */ } /* flip the result sign if unswapped and rhs was negated */ if (!swapped) res->bits^=negate; @@ -4111,7 +4133,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs, if (set->round==DEC_ROUND_FLOOR) res->bits|=DECNEG; /* sign - */ else res->bits&=~DECNEG; /* sign + */ } - } while(0); /* end protected */ + } while(0); /* end protected */ if (allocacc!=NULL) free(allocacc); /* drop any storage used */ #if DECSUBSET @@ -4132,8 +4154,8 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs, /* res is C, the result. C may be A and/or B (e.g., X=X/X) */ /* lhs is A */ /* rhs is B */ -/* set is the context */ -/* op is DIVIDE, DIVIDEINT, REMAINDER, or REMNEAR respectively. */ +/* set is the context */ +/* op is DIVIDE, DIVIDEINT, REMAINDER, or REMNEAR respectively. */ /* status is the usual accumulator */ /* */ /* C must have space for set->digits digits. */ @@ -4148,7 +4170,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs, /* */ /* Prepare operands and handle special values */ /* Test for x/0 and then 0/x */ -/* Exp =Exp1 - Exp2 */ +/* Exp =Exp1 - Exp2 */ /* Exp =Exp +len(var1) -len(var2) */ /* Sign=Sign1 * Sign2 */ /* Pad accumulator (Var1) to double-length with 0's (pad1) */ @@ -4160,7 +4182,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs, /* this_unit=0 */ /* Do forever */ /* compare numbers */ -/* if <0 then leave inner_loop */ +/* if <0 then leave inner_loop */ /* if =0 then (* quick exit without subtract *) do */ /* this_unit=this_unit+1; output this_unit */ /* leave outer_loop; end */ @@ -4168,7 +4190,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs, /* If same then tops2=msu2pair -- {units 1&2 of var2} */ /* else tops2=msu2plus -- {0, unit 1 of var2} */ /* tops1=first_unit_of_Var1*10**DECDPUN +second_unit_of_var1 */ -/* mult=tops1/tops2 -- Good and safe guess at divisor */ +/* mult=tops1/tops2 -- Good and safe guess at divisor */ /* if mult=0 then mult=1 */ /* this_unit=this_unit+mult */ /* subtract */ @@ -4180,7 +4202,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs, /* exp=exp-1 */ /* end outer_loop */ /* exp=exp+1 -- set the proper exponent */ -/* if have=0 then generate answer=0 */ +/* if have=0 then generate answer=0 */ /* Return (Result is defined by Var1) */ /* */ /* ------------------------------------------------------------------ */ @@ -4200,15 +4222,15 @@ static decNumber * decDivideOp(decNumber *res, #endif Unit accbuff[SD2U(DECBUFFER+DECDPUN+10)]; /* local buffer */ Unit *acc=accbuff; /* -> accumulator array for result */ - Unit *allocacc=NULL; /* -> allocated buffer, iff allocated */ + Unit *allocacc=NULL; /* -> allocated buffer, iff allocated */ Unit *accnext; /* -> where next digit will go */ Int acclength; /* length of acc needed [Units] */ Int accunits; /* count of units accumulated */ Int accdigits; /* count of digits accumulated */ - Unit varbuff[SD2U(DECBUFFER*2+DECDPUN)*sizeof(Unit)]; /* buffer for var1 */ + Unit varbuff[SD2U(DECBUFFER*2+DECDPUN)]; /* buffer for var1 */ Unit *var1=varbuff; /* -> var1 array for long subtraction */ - Unit *varalloc=NULL; /* -> allocated buffer, iff used */ + Unit *varalloc=NULL; /* -> allocated buffer, iff used */ Unit *msu1; /* -> msu of var1 */ const Unit *var2; /* -> var2 array */ @@ -4283,7 +4305,7 @@ static decNumber * decDivideOp(decNumber *res, /* result is [finished clone of] lhs */ decCopyFit(res, lhs, set, &residue, status); } - else { /* a division */ + else { /* a division */ decNumberZero(res); res->bits=bits; /* set +/- zero */ /* for DIVIDEINT the exponent is always 0. For DIVIDE, result */ @@ -4332,7 +4354,7 @@ static decNumber * decDivideOp(decNumber *res, decNumberZero(res); /* integer 0 */ res->bits=bits; /* sign as computed */ } - else { /* a remainder */ + else { /* a remainder */ exponent=rhs->exponent; /* [save in case overwrite] */ decNumberCopy(res, lhs); /* [zeros always fit] */ if (exponent<res->exponent) res->exponent=exponent; /* use lower */ @@ -4425,8 +4447,8 @@ static decNumber * decDivideOp(decNumber *res, for (; target>=var1; target--) *target=0; /* rhs (var2) is left-aligned with var1 at the start */ - var2ulen=var1units; /* rhs logical length (units) */ - var2units=D2U(rhs->digits); /* rhs actual length (units) */ + var2ulen=var1units; /* rhs logical length (units) */ + var2units=D2U(rhs->digits); /* rhs actual length (units) */ var2=rhs->lsu; /* -> rhs array */ msu2=var2+var2units-1; /* -> msu of var2 [never changes] */ /* now set up the variables which will be used for estimating the */ @@ -4450,7 +4472,7 @@ static decNumber * decDivideOp(decNumber *res, for (pow=&powers[1]; *msu2>=*pow; pow++) exponent++; /* Now, if doing an integer divide or remainder, ensure that */ - /* the result will be Unit-aligned. To do this, shift the var1 */ + /* the result will be Unit-aligned. To do this, shift the var1 */ /* accumulator towards least if need be. (It's much easier to */ /* do this now than to reassemble the residue afterwards, if */ /* doing a remainder.) Also ensure the exponent is not negative. */ @@ -4463,7 +4485,7 @@ static decNumber * decDivideOp(decNumber *res, else cut=DECDPUN-exponent%DECDPUN; decShiftToLeast(var1, var1units, cut); exponent+=cut; /* maintain numerical value */ - var1initpad-=cut; /* .. and reduce padding */ + var1initpad-=cut; /* .. and reduce padding */ /* clean any most-significant units which were just emptied */ for (u=msu1; cut>=DECDPUN; cut-=DECDPUN, u--) *u=0; } /* align */ @@ -4478,7 +4500,7 @@ static decNumber * decDivideOp(decNumber *res, } /* ---- start the long-division loops ------------------------------ */ - accunits=0; /* no units accumulated yet */ + accunits=0; /* no units accumulated yet */ accdigits=0; /* .. or digits */ accnext=acc+acclength-1; /* -> msu of acc [NB: allows digits+1] */ for (;;) { /* outer forever loop */ @@ -4508,7 +4530,7 @@ static decNumber * decDivideOp(decNumber *res, /* reach here if var1 and var2 are identical; subtraction */ /* would increase digit by one, and the residue will be 0 so */ /* the calculation is done; leave the loop with residue=0. */ - thisunit++; /* as though subtracted */ + thisunit++; /* as though subtracted */ *var1=0; /* set var1 to 0 */ var1units=1; /* .. */ break; /* from inner */ @@ -4525,7 +4547,7 @@ static decNumber * decDivideOp(decNumber *res, } if (mult==0) mult=1; /* must always be at least 1 */ /* subtraction needed; var1 is > var2 */ - thisunit=(Unit)(thisunit+mult); /* accumulate */ + thisunit=(Unit)(thisunit+mult); /* accumulate */ /* subtract var1-var2, into var1; only the overlap needs */ /* processing, as this is an in-place calculation */ shift=var2ulen-var2units; @@ -4546,7 +4568,7 @@ static decNumber * decDivideOp(decNumber *res, /* The next unit has been calculated in full; unless it's a */ /* leading zero, add to acc */ - if (accunits!=0 || thisunit!=0) { /* is first or non-zero */ + if (accunits!=0 || thisunit!=0) { /* is first or non-zero */ *accnext=thisunit; /* store in accumulator */ /* account exactly for the new digits */ if (accunits==0) { @@ -4556,7 +4578,7 @@ static decNumber * decDivideOp(decNumber *res, else accdigits+=DECDPUN; accunits++; /* update count */ accnext--; /* ready for next */ - if (accdigits>reqdigits) break; /* have enough digits */ + if (accdigits>reqdigits) break; /* have enough digits */ } /* if the residue is zero, the operation is done (unless divide */ @@ -4609,7 +4631,7 @@ static decNumber * decDivideOp(decNumber *res, if ((lsu-QUOT10(lsu, drop+1) *powers[drop+1])!=0) break; /* found non-0 digit */ #else - if (lsu%powers[drop+1]!=0) break; /* found non-0 digit */ + if (lsu%powers[drop+1]!=0) break; /* found non-0 digit */ #endif exponent++; } @@ -4637,11 +4659,11 @@ static decNumber * decDivideOp(decNumber *res, Unit *quotlsu; /* for save */ Int quotdigits; /* .. */ - bits=lhs->bits; /* remainder sign is always as lhs */ + bits=lhs->bits; /* remainder sign is always as lhs */ /* Fastpath when residue is truly 0 is worthwhile [and */ /* simplifies the code below] */ - if (*var1==0 && var1units==1) { /* residue is 0 */ + if (*var1==0 && var1units==1) { /* residue is 0 */ Int exp=lhs->exponent; /* save min(exponents) */ if (rhs->exponent<exp) exp=rhs->exponent; decNumberZero(res); /* 0 coefficient */ @@ -4672,7 +4694,7 @@ static decNumber * decDivideOp(decNumber *res, accdigits=decGetDigits(var1, var1units); accunits=D2U(accdigits); - exponent=lhs->exponent; /* exponent is smaller of lhs & rhs */ + exponent=lhs->exponent; /* exponent is smaller of lhs & rhs */ if (rhs->exponent<exponent) exponent=rhs->exponent; /* Now correct the result if doing remainderNear; if it */ @@ -4720,7 +4742,7 @@ static decNumber * decDivideOp(decNumber *res, if (quotdigits>DECDPUN) { if (*up!=DECDPUNMAX) break;/* non-nines */ } - else { /* this is the last Unit */ + else { /* this is the last Unit */ if (*up==powers[quotdigits]-1) allnines=1; break; } @@ -4731,9 +4753,9 @@ static decNumber * decDivideOp(decNumber *res, *status|=DEC_Division_impossible; break;} - /* rem-rhs is needed; the sign will invert. Again, var1 */ + /* rem-rhs is needed; the sign will invert. Again, var1 */ /* can safely be used for the working Units array. */ - exp=rhs->exponent-exponent; /* RHS padding needed */ + exp=rhs->exponent-exponent; /* RHS padding needed */ /* Calculate units and remainder from exponent. */ expunits=exp/DECDPUN; exprem=exp%DECDPUN; @@ -4761,9 +4783,9 @@ static decNumber * decDivideOp(decNumber *res, #if DECSUBSET /* If a divide then strip trailing zeros if subset [after round] */ - if (!set->extended && (op==DIVIDE)) decTrim(res, set, 0, &dropped); + if (!set->extended && (op==DIVIDE)) decTrim(res, set, 0, 1, &dropped); #endif - } while(0); /* end protected */ + } while(0); /* end protected */ if (varalloc!=NULL) free(varalloc); /* drop any storage used */ if (allocacc!=NULL) free(allocacc); /* .. */ @@ -4782,7 +4804,7 @@ static decNumber * decDivideOp(decNumber *res, /* res is C, the result. C may be A and/or B (e.g., X=X*X) */ /* lhs is A */ /* rhs is B */ -/* set is the context */ +/* set is the context */ /* status is the usual accumulator */ /* */ /* C must have space for set->digits digits. */ @@ -4800,13 +4822,13 @@ static decNumber * decDivideOp(decNumber *res, /* The fastpath version lumps units together into 8-digit or 9-digit */ /* chunks, and also uses a lazy carry strategy to minimise expensive */ /* 64-bit divisions. The chunks are then broken apart again into */ -/* units for continuing processing. Despite this overhead, the */ +/* units for continuing processing. Despite this overhead, the */ /* fastpath can speed up some 16-digit operations by 10x (and much */ /* more for higher-precision calculations). */ /* */ /* A buffer always has to be used for the accumulator; in the */ /* fastpath, buffers are also always needed for the chunked copies of */ -/* of the operand coefficients. */ +/* of the operand coefficients. */ /* Static buffers are larger than needed just for multiply, to allow */ /* for calls from other operations (notably exp). */ /* ------------------------------------------------------------------ */ @@ -4817,10 +4839,10 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs, Int accunits; /* Units of accumulator in use */ Int exponent; /* work */ Int residue=0; /* rounding residue */ - uByte bits; /* result sign */ + uByte bits; /* result sign */ Unit *acc; /* -> accumulator Unit array */ Int needbytes; /* size calculator */ - void *allocacc=NULL; /* -> allocated accumulator, iff allocated */ + void *allocacc=NULL; /* -> allocated accumulator, iff allocated */ Unit accbuff[SD2U(DECBUFFER*4+1)]; /* buffer (+1 for DECBUFFER==0, */ /* *4 for calls from other operations) */ const Unit *mer, *mermsup; /* work */ @@ -4852,19 +4874,19 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs, /* [allocacc is shared for both paths, as only one will run] */ uLong *zacc=zaccbuff; /* -> accumulator array for exact result */ #if DECDPUN==1 - Int zoff; /* accumulator offset */ + Int zoff; /* accumulator offset */ #endif uInt *lip, *rip; /* item pointers */ - uInt *lmsi, *rmsi; /* most significant items */ - Int ilhs, irhs, iacc; /* item counts in the arrays */ - Int lazy; /* lazy carry counter */ + uInt *lmsi, *rmsi; /* most significant items */ + Int ilhs, irhs, iacc; /* item counts in the arrays */ + Int lazy; /* lazy carry counter */ uLong lcarry; /* uLong carry */ uInt carry; /* carry (NB not uLong) */ - Int count; /* work */ + Int count; /* work */ const Unit *cup; /* .. */ Unit *up; /* .. */ uLong *lp; /* .. */ - Int p; /* .. */ + Int p; /* .. */ #endif #if DECSUBSET @@ -4921,10 +4943,10 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs, #endif /* [following code does not require input rounding] */ - #if FASTMUL /* fastpath can be used */ + #if FASTMUL /* fastpath can be used */ /* use the fast path if there are enough digits in the shorter */ /* operand to make the setup and takedown worthwhile */ - #define NEEDTWO (DECDPUN*2) /* within two decUnitAddSub calls */ + #define NEEDTWO (DECDPUN*2) /* within two decUnitAddSub calls */ if (rhs->digits>NEEDTWO) { /* use fastpath... */ /* calculate the number of elements in each array */ ilhs=(lhs->digits+FASTDIGS-1)/FASTDIGS; /* [ceiling] */ @@ -4944,7 +4966,7 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs, /* Allocating the accumulator space needs a special case when */ /* DECDPUN=1 because when converting the accumulator to Units */ /* after the multiplication each 8-byte item becomes 9 1-byte */ - /* units. Therefore iacc extra bytes are needed at the front */ + /* units. Therefore iacc extra bytes are needed at the front */ /* (rounded up to a multiple of 8 bytes), and the uLong */ /* accumulator starts offset the appropriate number of units */ /* to the right to avoid overwrite during the unchunking. */ @@ -4960,7 +4982,7 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs, *status|=DEC_Insufficient_storage; break;} - acc=(Unit *)zacc; /* -> target Unit array */ + acc=(Unit *)zacc; /* -> target Unit array */ #if DECDPUN==1 zacc+=zoff; /* start uLong accumulator to right */ #endif @@ -5022,12 +5044,12 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs, carry=(uInt)(lcarry-((uLong)FASTBASE*carry2)); /* [inline] */ } *(lp+1)+=carry; /* add to item above [inline] */ - *lp-=((uLong)FASTBASE*carry); /* [inline] */ + *lp-=((uLong)FASTBASE*carry); /* [inline] */ } /* carry resolution */ } /* rip loop */ /* The multiplication is complete; time to convert back into */ - /* units. This can be done in-place in the accumulator and in */ + /* units. This can be done in-place in the accumulator and in */ /* 32-bit operations, because carries were resolved after the */ /* final add. This needs N-1 divides and multiplies for */ /* each item in the accumulator (which will become up to N */ @@ -5096,7 +5118,7 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs, /* There can be a 31-bit wrap in calculating the exponent. */ /* This can only happen if both input exponents are negative and */ - /* both their magnitudes are large. If there was a wrap, set a */ + /* both their magnitudes are large. If there was a wrap, set a */ /* safe very negative exponent, from which decFinalize() will */ /* raise a hard underflow shortly. */ exponent=lhs->exponent+rhs->exponent; /* calculate exponent */ @@ -5108,7 +5130,7 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs, /* Set the coefficient. If any rounding, residue records */ decSetCoeff(res, set, acc, res->digits, &residue, status); decFinish(res, set, &residue, status); /* final cleanup */ - } while(0); /* end protected */ + } while(0); /* end protected */ if (allocacc!=NULL) free(allocacc); /* drop any storage used */ #if DECSUBSET @@ -5137,13 +5159,13 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs, /* Restrictions: */ /* */ /* digits, emax, and -emin in the context must be less than */ -/* 2*DEC_MAX_MATH (1999998), and the rhs must be within these */ +/* 2*DEC_MAX_MATH (1999998), and the rhs must be within these */ /* bounds or a zero. This is an internal routine, so these */ /* restrictions are contractual and not enforced. */ /* */ /* A finite result is rounded using DEC_ROUND_HALF_EVEN; it will */ /* almost always be correctly rounded, but may be up to 1 ulp in */ -/* error in rare cases. */ +/* error in rare cases. */ /* */ /* Finite results will always be full precision and Inexact, except */ /* when A is a zero or -Infinity (giving 1 or 0 respectively). */ @@ -5162,11 +5184,11 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs, /* The error analysis in Hull & Abrham's paper applies except for the */ /* round-off error accumulation during the series evaluation. This */ /* code does not precalculate the number of iterations and so cannot */ -/* use Horner's scheme. Instead, the accumulation is done at double- */ +/* use Horner's scheme. Instead, the accumulation is done at double- */ /* precision, which ensures that the additions of the terms are exact */ /* and do not accumulate round-off (and any round-off errors in the */ /* terms themselves move 'to the right' faster than they can */ -/* accumulate). This code also extends the calculation by allowing, */ +/* accumulate). This code also extends the calculation by allowing, */ /* in the spirit of other decNumber operators, the input to be more */ /* precise than the result (the precision used is based on the more */ /* precise of the input or requested result). */ @@ -5189,7 +5211,7 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs, /* more for smaller values. */ /* */ /* The leverage that can be applied in this way is severely */ -/* limited by the cost of the raise-to-the power at the end, */ +/* limited by the cost of the raise-to-the power at the end, */ /* which dominates when the number of iterations is small (less */ /* than ten) or when rhs is short. As an example, the adjustment */ /* x**10,000,000 needs 31 multiplications, all but one full-width. */ @@ -5274,7 +5296,7 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs, *d->lsu=4; /* set 4 .. */ d->exponent=-set->digits; /* * 10**(-d) */ if (decNumberIsNegative(rhs)) d->exponent--; /* negative case */ - comp=decCompare(d, rhs, 1); /* signless compare */ + comp=decCompare(d, rhs, 1); /* signless compare */ if (comp==BADINT) { *status|=DEC_Insufficient_storage; break;} @@ -5327,18 +5349,18 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs, /* front" effect. */ Int lever=MINI(8-h, maxlever); /* leverage attainable */ Int use=-rhs->digits-lever; /* exponent to use for RHS */ - h+=lever; /* apply leverage selected */ + h+=lever; /* apply leverage selected */ if (h<0) { /* clamp */ - use+=h; /* [may end up subnormal] */ + use+=h; /* [may end up subnormal] */ h=0; } /* Take a copy of RHS if it needs normalization (true whenever x>=1) */ if (rhs->exponent!=use) { - decNumber *newrhs=bufr; /* assume will fit on stack */ + decNumber *newrhs=bufr; /* assume will fit on stack */ needbytes=sizeof(decNumber)+(D2U(rhs->digits)-1)*sizeof(Unit); if (needbytes>sizeof(bufr)) { /* need malloc space */ allocrhs=(decNumber *)malloc(needbytes); - if (allocrhs==NULL) { /* hopeless -- abandon */ + if (allocrhs==NULL) { /* hopeless -- abandon */ *status|=DEC_Insufficient_storage; break;} newrhs=allocrhs; /* use the allocated space */ @@ -5354,7 +5376,7 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs, /* third term by setting the term variable t=x, the accumulator */ /* a=1, and the divisor d=2. */ - /* First determine the working precision. From Hull & Abrham */ + /* First determine the working precision. From Hull & Abrham */ /* this is set->digits+h+2. However, if x is 'over-precise' we */ /* need to allow for all its digits to potentially participate */ /* (consider an x where all the excess digits are 9s) so in */ @@ -5411,7 +5433,7 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs, /* only the status from the accumulation is interesting */ /* [but it should remain unchanged after first add] */ decAddOp(a, a, t, &aset, 0, status); /* a=a+t */ - decMultiplyOp(t, t, x, &tset, &ignore); /* t=t*x */ + decMultiplyOp(t, t, x, &tset, &ignore); /* t=t*x */ decDivideOp(t, t, d, &tset, DIVIDE, &ignore); /* t=t/d */ /* the iteration ends when the term cannot affect the result, */ /* if rounded to p digits, which is when its value is smaller */ @@ -5426,7 +5448,7 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs, /* just a sanity check; comment out test to show always */ if (iterations>p+3) printf("Exp iterations=%ld, status=%08lx, p=%ld, d=%ld\n", - iterations, *status, p, x->digits); + (LI)iterations, (LI)*status, (LI)p, (LI)x->digits); #endif } /* h<=8 */ @@ -5445,13 +5467,13 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs, /* abandon if have had overflow or terminal underflow */ if (*status & (DEC_Overflow|DEC_Underflow)) { /* interesting? */ if (*status&DEC_Overflow || ISZERO(t)) break;} - n=n<<1; /* move next bit to testable position */ + n=n<<1; /* move next bit to testable position */ if (n<0) { /* top bit is set */ seenbit=1; /* OK, have a significant bit */ decMultiplyOp(t, t, a, &aset, status); /* acc=acc*x */ } if (i==31) break; /* that was the last bit */ - if (!seenbit) continue; /* no need to square 1 */ + if (!seenbit) continue; /* no need to square 1 */ decMultiplyOp(t, t, t, &aset, status); /* acc=acc*acc [square] */ } /*i*/ /* 32 bits */ /* decNumberShow(t); */ @@ -5464,7 +5486,7 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs, aset.digits=set->digits; /* [use default rounding] */ decCopyFit(res, a, &aset, &residue, status); /* copy & shorten */ decFinish(res, set, &residue, status); /* cleanup/set flags */ - } while(0); /* end protected */ + } while(0); /* end protected */ if (allocrhs !=NULL) free(allocrhs); /* drop any storage used */ if (allocbufa!=NULL) free(allocbufa); /* .. */ @@ -5489,16 +5511,16 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs, /* where x is truncated (NB) into the range 10 through 99, */ /* and then c = k>>2 and e = k&3. */ /* ------------------------------------------------------------------ */ -const uShort LNnn[90]={9016, 8652, 8316, 8008, 7724, 7456, 7208, - 6972, 6748, 6540, 6340, 6148, 5968, 5792, 5628, 5464, 5312, - 5164, 5020, 4884, 4748, 4620, 4496, 4376, 4256, 4144, 4032, +const uShort LNnn[90]={9016, 8652, 8316, 8008, 7724, 7456, 7208, + 6972, 6748, 6540, 6340, 6148, 5968, 5792, 5628, 5464, 5312, + 5164, 5020, 4884, 4748, 4620, 4496, 4376, 4256, 4144, 4032, 39233, 38181, 37157, 36157, 35181, 34229, 33297, 32389, 31501, 30629, 29777, 28945, 28129, 27329, 26545, 25777, 25021, 24281, 23553, 22837, 22137, 21445, 20769, 20101, 19445, 18801, 18165, 17541, 16925, 16321, 15721, 15133, 14553, 13985, 13421, 12865, 12317, 11777, 11241, 10717, - 10197, 9685, 9177, 8677, 8185, 7697, 7213, 6737, 6269, 5801, - 5341, 4889, 4437, 39930, 35534, 31186, 26886, 22630, 18418, 14254, - 10130, 6046, 20055}; + 10197, 9685, 9177, 8677, 8185, 7697, 7213, 6737, 6269, 5801, + 5341, 4889, 4437, 39930, 35534, 31186, 26886, 22630, 18418, 14254, + 10130, 6046, 20055}; /* ------------------------------------------------------------------ */ /* decLnOp -- effect natural logarithm */ @@ -5526,7 +5548,7 @@ const uShort LNnn[90]={9016, 8652, 8316, 8008, 7724, 7456, 7208, /* */ /* A finite result is rounded using DEC_ROUND_HALF_EVEN; it will */ /* almost always be correctly rounded, but may be up to 1 ulp in */ -/* error in rare cases. */ +/* error in rare cases. */ /* ------------------------------------------------------------------ */ /* The result is calculated using Newton's method, with each */ /* iteration calculating a' = a + x * exp(-a) - 1. See, for example, */ @@ -5538,7 +5560,7 @@ const uShort LNnn[90]={9016, 8652, 8316, 8008, 7724, 7456, 7208, /* */ /* Implementation notes: */ /* */ -/* 1. This is separated out as decLnOp so it can be called from */ +/* 1. This is separated out as decLnOp so it can be called from */ /* other Mathematical functions (e.g., Log 10) with a wider range */ /* than normal. In particular, it can handle the slightly wider */ /* (+9+2) range needed by a power function. */ @@ -5631,7 +5653,7 @@ decNumber * decLnOp(decNumber *res, const decNumber *rhs, break;} } /* integer and short */ - /* Determine the working precision. This is normally the */ + /* Determine the working precision. This is normally the */ /* requested precision + 2, with a minimum of 9. However, if */ /* the rhs is 'over-precise' then allow for all its digits to */ /* potentially participate (consider an rhs where all the excess */ @@ -5684,7 +5706,7 @@ decNumber * decLnOp(decNumber *res, const decNumber *rhs, decCopyFit(b, rhs, &aset, &residue, &ignore); /* copy & shorten */ b->exponent=0; /* make integer */ t=decGetInt(b); /* [cannot fail] */ - if (t<10) t=X10(t); /* adjust single-digit b */ + if (t<10) t=X10(t); /* adjust single-digit b */ t=LNnn[t-10]; /* look up ln(b) */ decNumberFromInt32(b, t>>2); /* b=ln(b) coefficient */ b->exponent=-(t&3)-3; /* set exponent */ @@ -5713,13 +5735,13 @@ decNumber * decLnOp(decNumber *res, const decNumber *rhs, /* [initially 9 as then the sequence starts 7+2, 16+2, and */ /* 34+2, which is ideal for standard-sized numbers] */ aset.digits=pp; /* working context */ - bset.digits=pp+rhs->digits; /* wider context */ + bset.digits=pp+rhs->digits; /* wider context */ for (;;) { /* iterate */ #if DECCHECK iterations++; - if (iterations>24) break; /* consider 9 * 2**24 */ + if (iterations>24) break; /* consider 9 * 2**24 */ #endif - /* calculate the adjustment (exp(-a)*x-1) into b. This is a */ + /* calculate the adjustment (exp(-a)*x-1) into b. This is a */ /* catastrophic subtraction but it really is the difference */ /* from 1 that is of interest. */ /* Use the internal entry point to Exp as it allows the double */ @@ -5728,7 +5750,7 @@ decNumber * decLnOp(decNumber *res, const decNumber *rhs, decExpOp(b, a, &bset, &ignore); /* b=exp(-a) */ a->bits^=DECNEG; /* restore sign of a */ /* now multiply by rhs and subtract 1, at the wider precision */ - decMultiplyOp(b, b, rhs, &bset, &ignore); /* b=b*rhs */ + decMultiplyOp(b, b, rhs, &bset, &ignore); /* b=b*rhs */ decAddOp(b, b, &numone, &bset, DECNEG, &ignore); /* b=b-1 */ /* the iteration ends when the adjustment cannot affect the */ @@ -5766,7 +5788,7 @@ decNumber * decLnOp(decNumber *res, const decNumber *rhs, /* just a sanity check; remove the test to show always */ if (iterations>24) printf("Ln iterations=%ld, status=%08lx, p=%ld, d=%ld\n", - iterations, *status, p, rhs->digits); + (LI)iterations, (LI)*status, (LI)p, (LI)rhs->digits); #endif /* Copy and round the result to res */ @@ -5775,7 +5797,7 @@ decNumber * decLnOp(decNumber *res, const decNumber *rhs, aset.digits=set->digits; /* [use default rounding] */ decCopyFit(res, a, &aset, &residue, status); /* copy & shorten */ decFinish(res, set, &residue, status); /* cleanup/set flags */ - } while(0); /* end protected */ + } while(0); /* end protected */ if (allocbufa!=NULL) free(allocbufa); /* drop any storage used */ if (allocbufb!=NULL) free(allocbufb); /* .. */ @@ -5788,14 +5810,14 @@ decNumber * decLnOp(decNumber *res, const decNumber *rhs, /* */ /* This computes C = op(A, B), where op adjusts the coefficient */ /* of C (by rounding or shifting) such that the exponent (-scale) */ -/* of C has the value B or matches the exponent of B. */ +/* of C has the value B or matches the exponent of B. */ /* The numerical value of C will equal A, except for the effects of */ /* any rounding that occurred. */ /* */ /* res is C, the result. C may be A or B */ /* lhs is A, the number to adjust */ /* rhs is B, the requested exponent */ -/* set is the context */ +/* set is the context */ /* quant is 1 for quantize or 0 for rescale */ /* status is the status accumulator (this can be called without */ /* risk of control loss) */ @@ -5814,7 +5836,7 @@ static decNumber * decQuantizeOp(decNumber *res, const decNumber *lhs, #endif const decNumber *inrhs=rhs; /* save original rhs */ Int reqdigits=set->digits; /* requested DIGITS */ - Int reqexp; /* requested exponent [-scale] */ + Int reqexp; /* requested exponent [-scale] */ Int residue=0; /* rounding residue */ Int etiny=set->emin-(reqdigits-1); @@ -5904,7 +5926,7 @@ static decNumber * decQuantizeOp(decNumber *res, const decNumber *lhs, if (res->exponent>reqexp) { /* re-check needed, e.g., for quantize(0.9999, 0.001) under */ /* set->digits==3 */ - if (res->digits==reqdigits) { /* cannot shift by 1 */ + if (res->digits==reqdigits) { /* cannot shift by 1 */ *status&=~(DEC_Inexact | DEC_Rounded); /* [clean these] */ *status|=DEC_Invalid_operation; break; @@ -5937,9 +5959,9 @@ static decNumber * decQuantizeOp(decNumber *res, const decNumber *lhs, } else { decFinalize(res, set, &residue, status); /* set subnormal flags */ - *status&=~DEC_Underflow; /* suppress Underflow [754r] */ + *status&=~DEC_Underflow; /* suppress Underflow [as per 754] */ } - } while(0); /* end protected */ + } while(0); /* end protected */ #if DECSUBSET if (allocrhs!=NULL) free(allocrhs); /* drop any storage used */ @@ -5956,26 +5978,26 @@ static decNumber * decQuantizeOp(decNumber *res, const decNumber *lhs, /* result of a comparison unless one or both */ /* operands is a NaN (in which case a NaN results) */ /* COMPSIG -- as COMPARE except that a quiet NaN raises */ -/* Invalid operation. */ +/* Invalid operation. */ /* COMPMAX -- returns the larger of the operands, using the */ -/* 754r maxnum operation */ +/* 754 maxnum operation */ /* COMPMAXMAG -- ditto, comparing absolute values */ -/* COMPMIN -- the 754r minnum operation */ +/* COMPMIN -- the 754 minnum operation */ /* COMPMINMAG -- ditto, comparing absolute values */ -/* COMTOTAL -- returns the signum (as a number) giving the */ -/* result of a comparison using 754r total ordering */ +/* COMTOTAL -- returns the signum (as a number) giving the */ +/* result of a comparison using 754 total ordering */ /* */ /* res is C, the result. C may be A and/or B (e.g., X=X?X) */ /* lhs is A */ /* rhs is B */ -/* set is the context */ -/* op is the operation flag */ +/* set is the context */ +/* op is the operation flag */ /* status is the usual accumulator */ /* */ /* C must have space for one digit for COMPARE or set->digits for */ -/* COMPMAX, COMPMIN, COMPMAXMAG, or COMPMINMAG. */ +/* COMPMAX, COMPMIN, COMPMAXMAG, or COMPMINMAG. */ /* ------------------------------------------------------------------ */ -/* The emphasis here is on speed for common cases, and avoiding */ +/* The emphasis here is on speed for common cases, and avoiding */ /* coefficient comparison if possible. */ /* ------------------------------------------------------------------ */ decNumber * decCompareOp(decNumber *res, const decNumber *lhs, @@ -5986,7 +6008,7 @@ decNumber * decCompareOp(decNumber *res, const decNumber *lhs, decNumber *allocrhs=NULL; /* .., rhs */ #endif Int result=0; /* default result value */ - uByte merged; /* work */ + uByte merged; /* work */ #if DECCHECK if (decCheckOperands(res, lhs, rhs, set)) return res; @@ -6026,7 +6048,7 @@ decNumber * decCompareOp(decNumber *res, const decNumber *lhs, /* This assumes sNaN (even just one) leads to NaN. */ merged=(lhs->bits | rhs->bits) & (DECSNAN | DECNAN); if (merged) { /* a NaN bit set */ - if (op==COMPARE); /* result will be NaN */ + if (op==COMPARE); /* result will be NaN */ else if (op==COMPSIG) /* treat qNaN as sNaN */ *status|=DEC_Invalid_operation | DEC_sNaN; else if (op==COMPTOTAL) { /* total ordering, always finite */ @@ -6049,7 +6071,7 @@ decNumber * decCompareOp(decNumber *res, const decNumber *lhs, else if (merged & DECSNAN); /* sNaN -> qNaN */ else { /* here if MIN or MAX and one or two quiet NaNs */ - /* min or max -- 754r rules ignore single NaN */ + /* min or max -- 754 rules ignore single NaN */ if (!decNumberIsNaN(lhs) || !decNumberIsNaN(rhs)) { /* just one NaN; force choice to be the non-NaN operand */ op=COMPMAX; @@ -6065,7 +6087,7 @@ decNumber * decCompareOp(decNumber *res, const decNumber *lhs, /* have numbers */ if (op==COMPMAXMAG || op==COMPMINMAG) result=decCompare(lhs, rhs, 1); else result=decCompare(lhs, rhs, 0); /* sign matters */ - } while(0); /* end protected */ + } while(0); /* end protected */ if (result==BADINT) *status|=DEC_Insufficient_storage; /* rare */ else { @@ -6091,7 +6113,7 @@ decNumber * decCompareOp(decNumber *res, const decNumber *lhs, /* choose the operand for the result */ const decNumber *choice; if (result==0) { /* operands are numerically equal */ - /* choose according to sign then exponent (see 754r) */ + /* choose according to sign then exponent (see 754) */ uByte slhs=(lhs->bits & DECNEG); uByte srhs=(rhs->bits & DECNEG); #if DECSUBSET @@ -6110,7 +6132,7 @@ decNumber * decCompareOp(decNumber *res, const decNumber *lhs, else result=-1; /* [if equal, use lhs, technically identical] */ } - else { /* both positive */ + else { /* both positive */ if (lhs->exponent>rhs->exponent) result=+1; else result=-1; /* [ditto] */ @@ -6145,7 +6167,7 @@ decNumber * decCompareOp(decNumber *res, const decNumber *lhs, /* ------------------------------------------------------------------ */ static Int decCompare(const decNumber *lhs, const decNumber *rhs, Flag abs) { - Int result; /* result value */ + Int result; /* result value */ Int sigr; /* rhs signum */ Int compare; /* work */ @@ -6186,7 +6208,7 @@ static Int decCompare(const decNumber *lhs, const decNumber *rhs, compare=decUnitCompare(lhs->lsu, D2U(lhs->digits), rhs->lsu, D2U(rhs->digits), rhs->exponent-lhs->exponent); - if (compare!=BADINT) compare*=result; /* comparison succeeded */ + if (compare!=BADINT) compare*=result; /* comparison succeeded */ return compare; } /* decCompare */ @@ -6195,7 +6217,7 @@ static Int decCompare(const decNumber *lhs, const decNumber *rhs, /* */ /* This routine compares A ? B*10**E where A and B are unit arrays */ /* A is a plain integer */ -/* B has an exponent of E (which must be non-negative) */ +/* B has an exponent of E (which must be non-negative) */ /* */ /* Arg1 is A first Unit (lsu) */ /* Arg2 is A length in Units */ @@ -6205,18 +6227,18 @@ static Int decCompare(const decNumber *lhs, const decNumber *rhs, /* */ /* returns -1, 0, or 1 for A<B, A==B, or A>B, or BADINT if failure */ /* (the only possible failure is an allocation error, which can */ -/* only occur if E!=0) */ +/* only occur if E!=0) */ /* ------------------------------------------------------------------ */ static Int decUnitCompare(const Unit *a, Int alength, const Unit *b, Int blength, Int exp) { Unit *acc; /* accumulator for result */ Unit accbuff[SD2U(DECBUFFER*2+1)]; /* local buffer */ - Unit *allocacc=NULL; /* -> allocated acc buffer, iff allocated */ - Int accunits, need; /* units in use or needed for acc */ + Unit *allocacc=NULL; /* -> allocated acc buffer, iff allocated */ + Int accunits, need; /* units in use or needed for acc */ const Unit *l, *r, *u; /* work */ Int expunits, exprem, result; /* .. */ - if (exp==0) { /* aligned; fastpath */ + if (exp==0) { /* aligned; fastpath */ if (alength>blength) return 1; if (alength<blength) return -1; /* same number of units in both -- need unit-by-unit compare */ @@ -6229,7 +6251,7 @@ static Int decUnitCompare(const Unit *a, Int alength, return 0; /* all units match */ } /* aligned */ - /* Unaligned. If one is >1 unit longer than the other, padded */ + /* Unaligned. If one is >1 unit longer than the other, padded */ /* approximately, then can return easily */ if (alength>blength+(Int)D2U(exp)) return 1; if (alength+1<blength+(Int)D2U(exp)) return -1; @@ -6276,7 +6298,7 @@ static Int decUnitCompare(const Unit *a, Int alength, /* A may be shorter or longer than B. */ /* */ /* Leading zeros are not removed after a calculation. The result is */ -/* either the same length as the longer of A and B (adding any */ +/* either the same length as the longer of A and B (adding any */ /* shift), or one Unit longer than that (if a Unit carry occurred). */ /* */ /* A and B content are not altered unless C is also A or B. */ @@ -6315,10 +6337,10 @@ static Int decUnitAddSub(const Unit *a, Int alength, const Unit *b, Int blength, Int bshift, Unit *c, Int m) { const Unit *alsu=a; /* A lsu [need to remember it] */ - Unit *clsu=c; /* C ditto */ + Unit *clsu=c; /* C ditto */ Unit *minC; /* low water mark for C */ Unit *maxC; /* high water mark for C */ - eInt carry=0; /* carry integer (could be Long) */ + eInt carry=0; /* carry integer (could be Long) */ Int add; /* work */ #if DECDPUN<=4 /* myriadal, millenary, etc. */ Int est; /* estimated quotient */ @@ -6378,7 +6400,7 @@ static Int decUnitAddSub(const Unit *a, Int alength, carry=carry+(eInt)(DECDPUNMAX+1)*(DECDPUNMAX+1); /* make positive */ est=(((ueInt)carry>>11)*53687)>>18; *c=(Unit)(carry-est*(DECDPUNMAX+1)); - carry=est-(DECDPUNMAX+1); /* correctly negative */ + carry=est-(DECDPUNMAX+1); /* correctly negative */ if (*c<DECDPUNMAX+1) continue; /* was OK */ carry++; *c-=DECDPUNMAX+1; @@ -6396,7 +6418,7 @@ static Int decUnitAddSub(const Unit *a, Int alength, carry=carry+(eInt)(DECDPUNMAX+1)*(DECDPUNMAX+1); /* make positive */ est=(((ueInt)carry>>3)*16777)>>21; *c=(Unit)(carry-est*(DECDPUNMAX+1)); - carry=est-(DECDPUNMAX+1); /* correctly negative */ + carry=est-(DECDPUNMAX+1); /* correctly negative */ if (*c<DECDPUNMAX+1) continue; /* was OK */ carry++; *c-=DECDPUNMAX+1; @@ -6412,7 +6434,7 @@ static Int decUnitAddSub(const Unit *a, Int alength, carry=carry+(eInt)(DECDPUNMAX+1)*(DECDPUNMAX+1); /* make positive */ est=QUOT10(carry, DECDPUN); *c=(Unit)(carry-est*(DECDPUNMAX+1)); - carry=est-(DECDPUNMAX+1); /* correctly negative */ + carry=est-(DECDPUNMAX+1); /* correctly negative */ #else /* remainder operator is undefined if negative, so must test */ if ((ueInt)carry<(DECDPUNMAX+1)*2) { /* fastpath carry +1 */ @@ -6465,7 +6487,7 @@ static Int decUnitAddSub(const Unit *a, Int alength, carry=carry+(eInt)(DECDPUNMAX+1)*(DECDPUNMAX+1); /* make positive */ est=(((ueInt)carry>>11)*53687)>>18; *c=(Unit)(carry-est*(DECDPUNMAX+1)); - carry=est-(DECDPUNMAX+1); /* correctly negative */ + carry=est-(DECDPUNMAX+1); /* correctly negative */ if (*c<DECDPUNMAX+1) continue; /* was OK */ carry++; *c-=DECDPUNMAX+1; @@ -6483,7 +6505,7 @@ static Int decUnitAddSub(const Unit *a, Int alength, carry=carry+(eInt)(DECDPUNMAX+1)*(DECDPUNMAX+1); /* make positive */ est=(((ueInt)carry>>3)*16777)>>21; *c=(Unit)(carry-est*(DECDPUNMAX+1)); - carry=est-(DECDPUNMAX+1); /* correctly negative */ + carry=est-(DECDPUNMAX+1); /* correctly negative */ if (*c<DECDPUNMAX+1) continue; /* was OK */ carry++; *c-=DECDPUNMAX+1; @@ -6498,7 +6520,7 @@ static Int decUnitAddSub(const Unit *a, Int alength, carry=carry+(eInt)(DECDPUNMAX+1)*(DECDPUNMAX+1); /* make positive */ est=QUOT10(carry, DECDPUN); *c=(Unit)(carry-est*(DECDPUNMAX+1)); - carry=est-(DECDPUNMAX+1); /* correctly negative */ + carry=est-(DECDPUNMAX+1); /* correctly negative */ #else if ((ueInt)carry<(DECDPUNMAX+1)*2){ /* fastpath carry 1 */ *c=(Unit)(carry-(DECDPUNMAX+1)); @@ -6556,8 +6578,9 @@ static Int decUnitAddSub(const Unit *a, Int alength, /* dn is the number to trim or normalize */ /* set is the context to use to check for clamp */ /* all is 1 to remove all trailing zeros, 0 for just fraction ones */ +/* noclamp is 1 to unconditional (unclamped) trim */ /* dropped returns the number of discarded trailing zeros */ -/* returns dn */ +/* returns dn */ /* */ /* If clamp is set in the context then the number of zeros trimmed */ /* may be limited if the exponent is high. */ @@ -6565,8 +6588,8 @@ static Int decUnitAddSub(const Unit *a, Int alength, /* so special values are unchanged and no error is possible. */ /* ------------------------------------------------------------------ */ static decNumber * decTrim(decNumber *dn, decContext *set, Flag all, - Int *dropped) { - Int d, exp; /* work */ + Flag noclamp, Int *dropped) { + Int d, exp; /* work */ uInt cut; /* .. */ Unit *up; /* -> current Unit */ @@ -6595,7 +6618,7 @@ static decNumber * decTrim(decNumber *dn, decContext *set, Flag all, if (*up%powers[cut]!=0) break; /* found non-0 digit */ #endif /* have a trailing 0 */ - if (!all) { /* trimming */ + if (!all) { /* trimming */ /* [if exp>0 then all trailing 0s are significant for trim] */ if (exp<=0) { /* if digit might be significant */ if (exp==0) break; /* then quit */ @@ -6611,7 +6634,7 @@ static decNumber * decTrim(decNumber *dn, decContext *set, Flag all, if (d==0) return dn; /* none to drop */ /* may need to limit drop if clamping */ - if (set->clamp) { + if (set->clamp && !noclamp) { Int maxd=set->emax-set->digits+1-dn->exponent; if (maxd<=0) return dn; /* nothing possible */ if (d>maxd) d=maxd; @@ -6656,7 +6679,7 @@ static void decReverse(Unit *ulo, Unit *uhi) { /* returns the new length of the integer in the array, in digits */ /* */ /* No overflow is permitted (that is, the uar array must be known to */ -/* be large enough to hold the result, after shifting). */ +/* be large enough to hold the result, after shifting). */ /* ------------------------------------------------------------------ */ static Int decShiftToMost(Unit *uar, Int digits, Int shift) { Unit *target, *source, *first; /* work */ @@ -6672,8 +6695,8 @@ static Int decShiftToMost(Unit *uar, Int digits, Int shift) { next=0; /* all paths */ source=uar+D2U(digits)-1; /* where msu comes from */ target=source+D2U(shift); /* where upper part of first cut goes */ - cut=DECDPUN-MSUDIGITS(shift); /* where to slice */ - if (cut==0) { /* unit-boundary case */ + cut=DECDPUN-MSUDIGITS(shift); /* where to slice */ + if (cut==0) { /* unit-boundary case */ for (; source>=uar; source--, target--) *target=*source; } else { @@ -6704,14 +6727,14 @@ static Int decShiftToMost(Unit *uar, Int digits, Int shift) { /* ------------------------------------------------------------------ */ /* decShiftToLeast -- shift digits in array towards least significant */ /* */ -/* uar is the array */ +/* uar is the array */ /* units is length of the array, in units */ /* shift is the number of digits to remove from the lsu end; it */ /* must be zero or positive and <= than units*DECDPUN. */ /* */ /* returns the new length of the integer in the array, in units */ /* */ -/* Removed digits are discarded (lost). Units not required to hold */ +/* Removed digits are discarded (lost). Units not required to hold */ /* the final result are unchanged. */ /* ------------------------------------------------------------------ */ static Int decShiftToLeast(Unit *uar, Int units, Int shift) { @@ -6774,11 +6797,11 @@ static Int decShiftToLeast(Unit *uar, Int units, Int shift) { /* lostDigits and other status may be set by this. */ /* */ /* Since the input is an operand, it must not be modified. */ -/* Instead, return an allocated decNumber, rounded as required. */ +/* Instead, return an allocated decNumber, rounded as required. */ /* It is the caller's responsibility to free the allocated storage. */ /* */ /* If no storage is available then the result cannot be used, so NULL */ -/* is returned. */ +/* is returned. */ /* ------------------------------------------------------------------ */ static decNumber *decRoundOperand(const decNumber *dn, decContext *set, uInt *status) { @@ -6810,7 +6833,7 @@ static decNumber *decRoundOperand(const decNumber *dn, decContext *set, /* dest is the target decNumber */ /* src is the source decNumber */ /* set is the context [used for length (digits) and rounding mode] */ -/* residue is the residue accumulator */ +/* residue is the residue accumulator */ /* status contains the current status to be updated */ /* */ /* (dest==src is allowed and will be a no-op if fits) */ @@ -6826,20 +6849,20 @@ static void decCopyFit(decNumber *dest, const decNumber *src, /* ------------------------------------------------------------------ */ /* decSetCoeff -- set the coefficient of a number */ /* */ -/* dn is the number whose coefficient array is to be set. */ +/* dn is the number whose coefficient array is to be set. */ /* It must have space for set->digits digits */ /* set is the context [for size] */ /* lsu -> lsu of the source coefficient [may be dn->lsu] */ /* len is digits in the source coefficient [may be dn->digits] */ -/* residue is the residue accumulator. This has values as in */ +/* residue is the residue accumulator. This has values as in */ /* decApplyRound, and will be unchanged unless the */ /* target size is less than len. In this case, the */ /* coefficient is truncated and the residue is updated to */ -/* reflect the previous residue and the dropped digits. */ -/* status is the status accumulator, as usual */ +/* reflect the previous residue and the dropped digits. */ +/* status is the status accumulator, as usual */ /* */ /* The coefficient may already be in the number, or it can be an */ -/* external intermediate array. If it is in the number, lsu must == */ +/* external intermediate array. If it is in the number, lsu must == */ /* dn->lsu and len must == dn->digits. */ /* */ /* Note that the coefficient length (len) may be < set->digits, and */ @@ -6860,7 +6883,7 @@ static void decCopyFit(decNumber *dest, const decNumber *src, /* ------------------------------------------------------------------ */ /* mapping array: maps 0-9 to canonical residues, so that a residue */ /* can be adjusted in the range [-1, +1] and achieve correct rounding */ -/* 0 1 2 3 4 5 6 7 8 9 */ +/* 0 1 2 3 4 5 6 7 8 9 */ static const uByte resmap[10]={0, 3, 3, 3, 3, 5, 7, 7, 7, 7}; static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu, Int len, Int *residue, uInt *status) { @@ -6875,7 +6898,7 @@ static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu, discard=len-set->digits; /* digits to discard */ if (discard<=0) { /* no digits are being discarded */ - if (dn->lsu!=lsu) { /* copy needed */ + if (dn->lsu!=lsu) { /* copy needed */ /* copy the coefficient array to the result number; no shift needed */ count=len; /* avoids D2U */ up=lsu; @@ -6890,7 +6913,7 @@ static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu, /* some digits must be discarded ... */ dn->exponent+=discard; /* maintain numerical value */ - *status|=DEC_Rounded; /* accumulate Rounded status */ + *status|=DEC_Rounded; /* accumulate Rounded status */ if (*residue>1) *residue=1; /* previous residue now to right, so reduce */ if (discard>len) { /* everything, +1, is being discarded */ @@ -6904,7 +6927,7 @@ static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu, } } if (*residue!=0) *status|=DEC_Inexact; /* record inexactitude */ - *dn->lsu=0; /* coefficient will now be 0 */ + *dn->lsu=0; /* coefficient will now be 0 */ dn->digits=1; /* .. */ return; } /* total discard */ @@ -6924,12 +6947,12 @@ static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu, /* here up -> Unit with first discarded digit */ cut=discard-(count-DECDPUN)-1; - if (cut==DECDPUN-1) { /* unit-boundary case (fast) */ + if (cut==DECDPUN-1) { /* unit-boundary case (fast) */ Unit half=(Unit)powers[DECDPUN]>>1; /* set residue directly */ if (*up>=half) { if (*up>half) *residue=7; - else *residue+=5; /* add sticky bit */ + else *residue+=5; /* add sticky bit */ } else { /* <half */ if (*up!=0) *residue=3; /* [else is 0, leave as sticky bit] */ @@ -6940,7 +6963,7 @@ static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu, } else { /* shift to least */ count=set->digits; /* now digits to end up with */ - dn->digits=count; /* set the new length */ + dn->digits=count; /* set the new length */ up++; /* move to next */ /* on unit boundary, so shift-down copy loop is simple */ for (target=dn->lsu; count>0; target++, up++, count-=DECDPUN) @@ -6952,7 +6975,7 @@ static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu, uInt discard1; /* first discarded digit */ uInt quot, rem; /* for divisions */ if (cut==0) quot=*up; /* is at bottom of unit */ - else /* cut>0 */ { /* it's not at bottom of unit */ + else /* cut>0 */ { /* it's not at bottom of unit */ #if DECDPUN<=4 quot=QUOT10(*up, cut); rem=*up-quot*powers[cut]; @@ -6985,7 +7008,7 @@ static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu, } else { /* shift to least needed */ count=set->digits; /* now digits to end up with */ - dn->digits=count; /* set the new length */ + dn->digits=count; /* set the new length */ /* shift-copy the coefficient array to the result number */ for (target=dn->lsu; ; target++) { *target=(Unit)quot; @@ -7014,7 +7037,7 @@ static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu, /* ------------------------------------------------------------------ */ /* decApplyRound -- apply pending rounding to a number */ /* */ -/* dn is the number, with space for set->digits digits */ +/* dn is the number, with space for set->digits digits */ /* set is the context [for size and rounding mode] */ /* residue indicates pending rounding, being any accumulated */ /* guard and sticky information. It may be: */ @@ -7023,14 +7046,14 @@ static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu, /* 1-4: rounding digit is <5 and >0 */ /* 0: the coefficient is exact */ /* -1: as 1, but the hidden digits are subtractive, that */ -/* is, of the opposite sign to dn. In this case the */ +/* is, of the opposite sign to dn. In this case the */ /* coefficient must be non-0. This case occurs when */ /* subtracting a small number (which can be reduced to */ /* a sticky bit); see decAddOp. */ -/* status is the status accumulator, as usual */ +/* status is the status accumulator, as usual */ /* */ /* This routine applies rounding while keeping the length of the */ -/* coefficient constant. The exponent and status are unchanged */ +/* coefficient constant. The exponent and status are unchanged */ /* except if: */ /* */ /* -- the coefficient was increased and is all nines (in which */ @@ -7125,7 +7148,7 @@ static void decApplyRound(decNumber *dn, decContext *set, Int residue, if (bump==0) return; /* no action required */ /* Simply use decUnitAddSub unless bumping up and the number is */ - /* all nines. In this special case set to 100... explicitly */ + /* all nines. In this special case set to 100... explicitly */ /* and adjust the exponent by one (as otherwise could overflow */ /* the array) */ /* Similarly handle all-nines result if bumping down. */ @@ -7139,12 +7162,12 @@ static void decApplyRound(decNumber *dn, decContext *set, Int residue, /* here if it, too, is all nines */ *up=(Unit)powers[count-1]; /* here 999 -> 100 etc. */ for (up=up-1; up>=dn->lsu; up--) *up=0; /* others all to 0 */ - dn->exponent++; /* and bump exponent */ + dn->exponent++; /* and bump exponent */ /* [which, very rarely, could cause Overflow...] */ if ((dn->exponent+dn->digits)>set->emax+1) { decSetOverflow(dn, set, status); } - return; /* done */ + return; /* done */ } /* a full unit to check, with more to come */ if (*up!=DECDPUNMAX) break; /* not still 9s */ @@ -7161,11 +7184,11 @@ static void decApplyRound(decNumber *dn, decContext *set, Int residue, /* this is the last Unit (the msu) */ if (*up!=powers[count-1]) break; /* not 100.. */ /* here if have the 1000... case */ - sup=up; /* save msu pointer */ + sup=up; /* save msu pointer */ *up=(Unit)powers[count]-1; /* here 100 in msu -> 999 */ /* others all to all-nines, too */ for (up=up-1; up>=dn->lsu; up--) *up=(Unit)powers[DECDPUN]-1; - dn->exponent--; /* and bump exponent */ + dn->exponent--; /* and bump exponent */ /* iff the number was at the subnormal boundary (exponent=etiny) */ /* then the exponent is now out of range, so it will in fact get */ @@ -7181,7 +7204,7 @@ static void decApplyRound(decNumber *dn, decContext *set, Int residue, dn->exponent++; *status|=DEC_Underflow | DEC_Subnormal | DEC_Inexact | DEC_Rounded; } - return; /* done */ + return; /* done */ } /* a full unit to check, with more to come */ @@ -7200,7 +7223,7 @@ static void decApplyRound(decNumber *dn, decContext *set, Int residue, /* decFinish -- finish processing a number */ /* */ /* dn is the number */ -/* set is the context */ +/* set is the context */ /* residue is the rounding accumulator (as in decApplyRound) */ /* status is the accumulator */ /* */ @@ -7237,14 +7260,14 @@ static void decFinish(decNumber *dn, decContext *set, Int *residue, /* decFinalize -- final check, clamp, and round of a number */ /* */ /* dn is the number */ -/* set is the context */ +/* set is the context */ /* residue is the rounding accumulator (as in decApplyRound) */ /* status is the status accumulator */ /* */ /* This finishes off the current number by checking for subnormal */ /* results, applying any pending rounding, checking for overflow, */ /* and applying any clamping. */ -/* Underflow and overflow conditions are raised as appropriate. */ +/* Underflow and overflow conditions are raised as appropriate. */ /* All fields are updated as required. */ /* ------------------------------------------------------------------ */ static void decFinalize(decNumber *dn, decContext *set, Int *residue, @@ -7272,12 +7295,12 @@ static void decFinalize(decNumber *dn, decContext *set, Int *residue, nmin.lsu[0]=1; nmin.exponent=set->emin; comp=decCompare(dn, &nmin, 1); /* (signless compare) */ - if (comp==BADINT) { /* oops */ + if (comp==BADINT) { /* oops */ *status|=DEC_Insufficient_storage; /* abandon... */ return; } if (*residue<0 && comp==0) { /* neg residue and dn==Nmin */ - decApplyRound(dn, set, *residue, status); /* might force down */ + decApplyRound(dn, set, *residue, status); /* might force down */ decSetSubnormal(dn, set, residue, status); return; } @@ -7306,27 +7329,27 @@ static void decFinalize(decNumber *dn, decContext *set, Int *residue, dn->digits=decShiftToMost(dn->lsu, dn->digits, shift); } dn->exponent-=shift; /* adjust the exponent to match */ - *status|=DEC_Clamped; /* and record the dirty deed */ + *status|=DEC_Clamped; /* and record the dirty deed */ return; } /* decFinalize */ /* ------------------------------------------------------------------ */ /* decSetOverflow -- set number to proper overflow value */ /* */ -/* dn is the number (used for sign [only] and result) */ +/* dn is the number (used for sign [only] and result) */ /* set is the context [used for the rounding mode, etc.] */ /* status contains the current status to be updated */ /* */ /* This sets the sign of a number and sets its value to either */ /* Infinity or the maximum finite value, depending on the sign of */ -/* dn and the rounding mode, following IEEE 854 rules. */ +/* dn and the rounding mode, following IEEE 754 rules. */ /* ------------------------------------------------------------------ */ static void decSetOverflow(decNumber *dn, decContext *set, uInt *status) { Flag needmax=0; /* result is maximum finite value */ uByte sign=dn->bits&DECNEG; /* clean and save sign bit */ if (ISZERO(dn)) { /* zero does not overflow magnitude */ - Int emax=set->emax; /* limit value */ + Int emax=set->emax; /* limit value */ if (set->clamp) emax-=set->digits-1; /* lower if clamping */ if (dn->exponent>emax) { /* clamp required */ dn->exponent=emax; @@ -7360,7 +7383,7 @@ static void decSetOverflow(decNumber *dn, decContext *set, uInt *status) { } /* decSetOverflow */ /* ------------------------------------------------------------------ */ -/* decSetMaxValue -- set number to +Nmax (maximum normal value) */ +/* decSetMaxValue -- set number to +Nmax (maximum normal value) */ /* */ /* dn is the number to set */ /* set is the context [used for digits and emax] */ @@ -7403,7 +7426,6 @@ static void decSetMaxValue(decNumber *dn, decContext *set) { /* ------------------------------------------------------------------ */ static void decSetSubnormal(decNumber *dn, decContext *set, Int *residue, uInt *status) { - Int dnexp; /* saves original exponent */ decContext workset; /* work */ Int etiny, adjust; /* .. */ @@ -7448,15 +7470,14 @@ static void decSetSubnormal(decNumber *dn, decContext *set, Int *residue, /* adjust>0, so need to rescale the result so exponent becomes Etiny */ /* [this code is similar to that in rescale] */ - dnexp=dn->exponent; /* save exponent */ - workset=*set; /* clone rounding, etc. */ + workset=*set; /* clone rounding, etc. */ workset.digits=dn->digits-adjust; /* set requested length */ - workset.emin-=adjust; /* and adjust emin to match */ + workset.emin-=adjust; /* and adjust emin to match */ /* [note that the latter can be <1, here, similar to Rescale case] */ decSetCoeff(dn, &workset, dn->lsu, dn->digits, residue, status); decApplyRound(dn, &workset, *residue, status); - /* Use 754R/854 default rule: Underflow is set iff Inexact */ + /* Use 754 default rule: Underflow is set iff Inexact */ /* [independent of whether trapped] */ if (*status&DEC_Inexact) *status|=DEC_Underflow; @@ -7597,14 +7618,14 @@ static Int decGetInt(const decNumber *dn) { /* ------------------------------------------------------------------ */ /* decDecap -- decapitate the coefficient of a number */ /* */ -/* dn is the number to be decapitated */ +/* dn is the number to be decapitated */ /* drop is the number of digits to be removed from the left of dn; */ -/* this must be <= dn->digits (if equal, the coefficient is */ +/* this must be <= dn->digits (if equal, the coefficient is */ /* set to 0) */ /* */ /* Returns dn; dn->digits will be <= the initial digits less drop */ -/* (after removing drop digits there may be leading zero digits */ -/* which will also be removed). Only dn->lsu and dn->digits change. */ +/* (after removing drop digits there may be leading zero digits */ +/* which will also be removed). Only dn->lsu and dn->digits change. */ /* ------------------------------------------------------------------ */ static decNumber *decDecap(decNumber *dn, Int drop) { Unit *msu; /* -> target cut point */ @@ -7704,13 +7725,13 @@ static decNumber * decNaNs(decNumber *res, const decNumber *lhs, /* ------------------------------------------------------------------ */ /* decStatus -- apply non-zero status */ /* */ -/* dn is the number to set if error */ +/* dn is the number to set if error */ /* status contains the current status (not yet in context) */ /* set is the context */ /* */ /* If the status is an error status, the number is set to a NaN, */ /* unless the error was an overflow, divide-by-zero, or underflow, */ -/* in which case the number will have already been set. */ +/* in which case the number will have already been set. */ /* */ /* The context status is then updated with the new status. Note that */ /* this may raise a signal, so control may never return from this */ @@ -7732,7 +7753,7 @@ static void decStatus(decNumber *dn, uInt status, decContext *set) { /* ------------------------------------------------------------------ */ /* decGetDigits -- count digits in a Units array */ /* */ -/* uar is the Unit array holding the number (this is often an */ +/* uar is the Unit array holding the number (this is often an */ /* accumulator of some sort) */ /* len is the length of the array in units [>=1] */ /* */ @@ -7743,7 +7764,7 @@ static void decStatus(decNumber *dn, uInt status, decContext *set) { /* ------------------------------------------------------------------ */ /* This may be called twice during some operations. */ static Int decGetDigits(Unit *uar, Int len) { - Unit *up=uar+(len-1); /* -> msu */ + Unit *up=uar+(len-1); /* -> msu */ Int digits=(len-1)*DECDPUN+1; /* possible digits excluding msu */ #if DECDPUN>4 uInt const *pow; /* work */ @@ -7763,7 +7784,7 @@ static Int decGetDigits(Unit *uar, Int len) { if (*up<10) break; /* is 1-9 */ digits++; #if DECDPUN>2 /* not done yet */ - if (*up<100) break; /* is 10-99 */ + if (*up<100) break; /* is 10-99 */ digits++; #if DECDPUN>3 /* not done yet */ if (*up<1000) break; /* is 100-999 */ @@ -7813,7 +7834,7 @@ void decNumberShow(const decNumber *dn) { } /* now carefully display the coefficient */ - up=dn->lsu+D2U(dn->digits)-1; /* msu */ + up=dn->lsu+D2U(dn->digits)-1; /* msu */ printf("%ld", (LI)*up); for (up=up-1; up>=dn->lsu; up--) { u=*up; @@ -7837,7 +7858,7 @@ void decNumberShow(const decNumber *dn) { /* ------------------------------------------------------------------ */ /* decDumpAr -- display a unit array [debug/check aid] */ /* name is a single-character tag name */ -/* ar is the array to display */ +/* ar is the array to display */ /* len is the length of the array in Units */ /* ------------------------------------------------------------------ */ static void decDumpAr(char name, const Unit *ar, Int len) { @@ -7880,7 +7901,7 @@ static void decDumpAr(char name, const Unit *ar, Int len) { /* rhs is the second (may be DECUNUSED) */ /* set is the context (may be DECUNCONT) */ /* returns 0 if both operands, and the context are clean, or 1 */ -/* otherwise (in which case the context will show an error, */ +/* otherwise (in which case the context will show an error, */ /* unless NULL). Note that res is not cleaned; caller should */ /* handle this so res=NULL case is safe. */ /* The caller is expected to abandon immediately if 1 is returned. */ @@ -7917,7 +7938,7 @@ static Flag decCheckOperands(decNumber *res, const decNumber *lhs, if (set!=DECUNCONT) decContextSetStatus(set, DEC_Invalid_operation); if (res!=DECUNRESU && res!=NULL) { decNumberZero(res); - res->bits=DECNAN; /* qNaN */ + res->bits=DECNAN; /* qNaN */ } } return bad; @@ -7933,7 +7954,7 @@ static Flag decCheckOperands(decNumber *res, const decNumber *lhs, /* ------------------------------------------------------------------ */ static Flag decCheckNumber(const decNumber *dn) { const Unit *up; /* work */ - uInt maxuint; /* .. */ + uInt maxuint; /* .. */ Int ae, d, digits; /* .. */ Int emin, emax; /* .. */ @@ -8004,7 +8025,7 @@ static Flag decCheckNumber(const decNumber *dn) { /* check the exponent. Note that input operands can have exponents */ /* which are out of the set->emin/set->emax and set->digits range */ /* (just as they can have more digits than set->digits). */ - ae=dn->exponent+dn->digits-1; /* adjusted exponent */ + ae=dn->exponent+dn->digits-1; /* adjusted exponent */ emax=DECNUMMAXE; emin=DECNUMMINE; digits=DECNUMMAXP; @@ -8060,7 +8081,7 @@ static void decCheckInexact(const decNumber *dn, decContext *set) { /* */ /* Semantics is the same as the stdlib malloc routine, but bytes */ /* allocated are accounted for globally, and corruption fences are */ -/* added before and after the 'actual' storage. */ +/* added before and after the 'actual' storage. */ /* ------------------------------------------------------------------ */ /* This routine allocates storage with an extra twelve bytes; 8 are */ /* at the start and hold: */ @@ -8070,17 +8091,16 @@ static void decCheckInexact(const decNumber *dn, decContext *set) { /* ------------------------------------------------------------------ */ static void *decMalloc(size_t n) { uInt size=n+12; /* true size */ - void *alloc; /* -> allocated storage */ - uInt *j; /* work */ - uByte *b, *b0; /* .. */ + void *alloc; /* -> allocated storage */ + uByte *b, *b0; /* work */ + uInt uiwork; /* for macros */ alloc=malloc(size); /* -> allocated storage */ - if (alloc==NULL) return NULL; /* out of strorage */ + if (alloc==NULL) return NULL; /* out of strorage */ b0=(uByte *)alloc; /* as bytes */ decAllocBytes+=n; /* account for storage */ - j=(uInt *)alloc; /* -> first four bytes */ - *j=n; /* save n */ - /* printf(" alloc ++ dAB: %ld (%d)\n", decAllocBytes, n); */ + UBFROMUI(alloc, n); /* save n */ + /* printf(" alloc ++ dAB: %ld (%ld)\n", (LI)decAllocBytes, (LI)n); */ for (b=b0+4; b<b0+8; b++) *b=DECFENCE; for (b=b0+n+8; b<b0+n+12; b++) *b=DECFENCE; return b0+8; /* -> play area */ @@ -8099,20 +8119,20 @@ static void *decMalloc(size_t n) { /* is, offset by 8). */ /* ------------------------------------------------------------------ */ static void decFree(void *alloc) { - uInt *j, n; /* pointer, original length */ + uInt n; /* original length */ uByte *b, *b0; /* work */ + uInt uiwork; /* for macros */ if (alloc==NULL) return; /* allowed; it's a nop */ b0=(uByte *)alloc; /* as bytes */ b0-=8; /* -> true start of storage */ - j=(uInt *)b0; /* -> first four bytes */ - n=*j; /* lift */ + n=UBTOUI(b0); /* lift length */ for (b=b0+4; b<b0+8; b++) if (*b!=DECFENCE) printf("=== Corrupt byte [%02x] at offset %d from %ld ===\n", *b, - b-b0-8, (Int)b0); + b-b0-8, (LI)b0); for (b=b0+n+8; b<b0+n+12; b++) if (*b!=DECFENCE) printf("=== Corrupt byte [%02x] at offset +%d from %ld, n=%ld ===\n", *b, - b-b0-8, (Int)b0, n); + b-b0-8, (LI)b0, (LI)n); free(b0); /* drop the storage */ decAllocBytes-=n; /* account for storage */ /* printf(" free -- dAB: %d (%d)\n", decAllocBytes, -n); */ diff --git a/libdecnumber/decNumber.h b/libdecnumber/decNumber.h index 0a9fdced8b3..72dbdaf46b3 100644 --- a/libdecnumber/decNumber.h +++ b/libdecnumber/decNumber.h @@ -46,7 +46,7 @@ #define DECNEG 0x80 /* Sign; 1=negative, 0=positive or zero */ #define DECINF 0x40 /* 1=Infinity */ #define DECNAN 0x20 /* 1=NaN */ - #define DECSNAN 0x10 /* 1=sNaN */ + #define DECSNAN 0x10 /* 1=sNaN */ /* The remaining bits are reserved; they must be 0 */ #define DECSPECIAL (DECINF|DECNAN|DECSNAN) /* any special value */ @@ -124,7 +124,7 @@ uint8_t * decNumberGetBCD(const decNumber *, uint8_t *); decNumber * decNumberSetBCD(decNumber *, const uint8_t *, uint32_t); - /* Operators and elementary functions */ + /* Operators and elementary functions */ decNumber * decNumberAbs(decNumber *, const decNumber *, decContext *); decNumber * decNumberAdd(decNumber *, const decNumber *, const decNumber *, decContext *); decNumber * decNumberAnd(decNumber *, const decNumber *, const decNumber *, decContext *); @@ -185,7 +185,7 @@ /* Macros for testing decNumber *dn */ #define decNumberIsCanonical(dn) (1) /* All decNumbers are saintly */ - #define decNumberIsFinite(dn) (((dn)->bits&DECSPECIAL)==0) + #define decNumberIsFinite(dn) (((dn)->bits&DECSPECIAL)==0) #define decNumberIsInfinite(dn) (((dn)->bits&DECINF)!=0) #define decNumberIsNaN(dn) (((dn)->bits&(DECNAN|DECSNAN))!=0) #define decNumberIsNegative(dn) (((dn)->bits&DECNEG)!=0) diff --git a/libdecnumber/decNumberLocal.h b/libdecnumber/decNumberLocal.h index f1568f725e1..c31b50db245 100644 --- a/libdecnumber/decNumberLocal.h +++ b/libdecnumber/decNumberLocal.h @@ -31,42 +31,48 @@ /* ------------------------------------------------------------------ */ /* decNumber package local type, tuning, and macro definitions */ /* ------------------------------------------------------------------ */ -/* This header file is included by all modules in the decNumber */ +/* This header file is included by all modules in the decNumber */ /* library, and contains local type definitions, tuning parameters, */ -/* etc. It should not need to be used by application programs. */ +/* etc. It should not need to be used by application programs. */ /* decNumber.h or one of decDouble (etc.) must be included first. */ /* ------------------------------------------------------------------ */ #if !defined(DECNUMBERLOC) #define DECNUMBERLOC - #define DECVERSION "decNumber 3.53" /* Package Version [16 max.] */ + #define DECVERSION "decNumber 3.61" /* Package Version [16 max.] */ #define DECNLAUTHOR "Mike Cowlishaw" /* Who to blame */ #include <stdlib.h> /* for abs */ #include <string.h> /* for memset, strcpy */ - #include "dconfig.h" /* for WORDS_BIGENDIAN */ /* Conditional code flag -- set this to match hardware platform */ - /* 1=little-endian, 0=big-endian */ - #if WORDS_BIGENDIAN - #define DECLITEND 0 - #else - #define DECLITEND 1 + #if !defined(DECLITEND) + #define DECLITEND 1 /* 1=little-endian, 0=big-endian */ #endif /* Conditional code flag -- set this to 1 for best performance */ + #if !defined(DECUSE64) #define DECUSE64 1 /* 1=use int64s, 0=int32 & smaller only */ + #endif /* Conditional check flags -- set these to 0 for best performance */ + #if !defined(DECCHECK) #define DECCHECK 0 /* 1 to enable robust checking */ + #endif + #if !defined(DECALLOC) #define DECALLOC 0 /* 1 to enable memory accounting */ + #endif + #if !defined(DECTRACE) #define DECTRACE 0 /* 1 to trace certain internals, etc. */ + #endif /* Tuning parameter for decNumber (arbitrary precision) module */ + #if !defined(DECBUFFER) #define DECBUFFER 36 /* Size basis for local buffers. This */ /* should be a common maximum precision */ /* rounded up to a multiple of 4; must */ /* be zero or positive. */ + #endif /* ---------------------------------------------------------------- */ /* Definitions for all modules (general-purpose) */ @@ -76,33 +82,33 @@ /* not use int or long directly. */ #define Flag uint8_t #define Byte int8_t - #define uByte uint8_t - #define Short int16_t + #define uByte uint8_t + #define Short int16_t #define uShort uint16_t #define Int int32_t #define uInt uint32_t #define Unit decNumberUnit #if DECUSE64 #define Long int64_t - #define uLong uint64_t + #define uLong uint64_t #endif /* Development-use definitions */ typedef long int LI; /* for printf arguments only */ #define DECNOINT 0 /* 1 to check no internal use of 'int' */ + /* or stdint types */ #if DECNOINT /* if these interfere with your C includes, do not set DECNOINT */ - #define int ? /* enable to ensure that plain C 'int' */ - #define long ?? /* .. or 'long' types are not used */ + #define int ? /* enable to ensure that plain C 'int' */ + #define long ?? /* .. or 'long' types are not used */ #endif /* Shared lookup tables */ extern const uByte DECSTICKYTAB[10]; /* re-round digits if sticky */ extern const uInt DECPOWERS[10]; /* powers of ten table */ /* The following are included from decDPD.h */ -#include "decDPDSymbols.h" - extern const uShort DPD2BIN[1024]; /* DPD -> 0-999 */ - extern const uShort BIN2DPD[1000]; /* 0-999 -> DPD */ + extern const uShort DPD2BIN[1024]; /* DPD -> 0-999 */ + extern const uShort BIN2DPD[1000]; /* 0-999 -> DPD */ extern const uInt DPD2BINK[1024]; /* DPD -> 0-999000 */ extern const uInt DPD2BINM[1024]; /* DPD -> 0-999000000 */ extern const uByte DPD2BCD8[4096]; /* DPD -> ddd + len */ @@ -111,32 +117,42 @@ /* LONGMUL32HI -- set w=(u*v)>>32, where w, u, and v are uInts */ /* (that is, sets w to be the high-order word of the 64-bit result; */ - /* the low-order word is simply u*v.) */ + /* the low-order word is simply u*v.) */ /* This version is derived from Knuth via Hacker's Delight; */ - /* it seems to optimize better than some others tried */ + /* it seems to optimize better than some others tried */ #define LONGMUL32HI(w, u, v) { \ - uInt u0, u1, v0, v1, w0, w1, w2, t; \ + uInt u0, u1, v0, v1, w0, w1, w2, t; \ u0=u & 0xffff; u1=u>>16; \ v0=v & 0xffff; v1=v>>16; \ w0=u0*v0; \ - t=u1*v0 + (w0>>16); \ + t=u1*v0 + (w0>>16); \ w1=t & 0xffff; w2=t>>16; \ w1=u0*v1 + w1; \ (w)=u1*v1 + w2 + (w1>>16);} /* ROUNDUP -- round an integer up to a multiple of n */ #define ROUNDUP(i, n) ((((i)+(n)-1)/n)*n) + #define ROUNDUP4(i) (((i)+3)&~3) /* special for n=4 */ /* ROUNDDOWN -- round an integer down to a multiple of n */ #define ROUNDDOWN(i, n) (((i)/n)*n) - #define ROUNDDOWN4(i) ((i)&~3) /* special for n=4 */ + #define ROUNDDOWN4(i) ((i)&~3) /* special for n=4 */ + + /* References to multi-byte sequences under different sizes; these */ + /* require locally declared variables, but do not violate strict */ + /* aliasing or alignment (as did the UINTAT simple cast to uInt). */ + /* Variables needed are uswork, uiwork, etc. [so do not use at same */ + /* level in an expression, e.g., UBTOUI(x)==UBTOUI(y) may fail]. */ - /* References to multi-byte sequences under different sizes */ - /* Refer to a uInt from four bytes starting at a char* or uByte*, */ - /* etc. */ - #define UINTAT(b) (*((uInt *)(b))) - #define USHORTAT(b) (*((uShort *)(b))) - #define UBYTEAT(b) (*((uByte *)(b))) + /* Return a uInt, etc., from bytes starting at a char* or uByte* */ + #define UBTOUS(b) (memcpy((void *)&uswork, b, 2), uswork) + #define UBTOUI(b) (memcpy((void *)&uiwork, b, 4), uiwork) + + /* Store a uInt, etc., into bytes starting at a char* or uByte*. */ + /* Returns i, evaluated, for convenience; has to use uiwork because */ + /* i may be an expression. */ + #define UBFROMUS(b, i) (uswork=(i), memcpy(b, (void *)&uswork, 2), uswork) + #define UBFROMUI(b, i) (uiwork=(i), memcpy(b, (void *)&uiwork, 4), uiwork) /* X10 and X100 -- multiply integer i by 10 or 100 */ /* [shifts are usually faster than multiply; could be conditional] */ @@ -149,7 +165,7 @@ /* Useful constants */ #define BILLION 1000000000 /* 10**9 */ - /* CHARMASK: 0x30303030 for ASCII/UTF8; 0xF0F0F0F0 for EBCDIC */ + /* CHARMASK: 0x30303030 for ASCII/UTF8; 0xF0F0F0F0 for EBCDIC */ #define CHARMASK ((((((((uInt)'0')<<8)+'0')<<8)+'0')<<8)+'0') @@ -172,7 +188,7 @@ #error Minimum exponent mismatch #endif - /* Set DECDPUNMAX -- the maximum integer that fits in DECDPUN */ + /* Set DECDPUNMAX -- the maximum integer that fits in DECDPUN */ /* digits, and D2UTABLE -- the initializer for the D2U table */ #if DECDPUN==1 #define DECDPUNMAX 9 @@ -253,7 +269,7 @@ /* D2N -- return the number of decNumber structs that would be */ /* needed to contain that number of digits (and the initial */ /* decNumber struct) safely. Note that one Unit is included in the */ - /* initial structure. Used for allocating space that is aligned on */ + /* initial structure. Used for allocating space that is aligned on */ /* a decNumber struct boundary. */ #define D2N(d) \ ((((SD2U(d)-1)*sizeof(Unit))+sizeof(decNumber)*2-1)/sizeof(decNumber)) @@ -261,7 +277,7 @@ /* TODIGIT -- macro to remove the leading digit from the unsigned */ /* integer u at column cut (counting from the right, LSD=0) and */ /* place it as an ASCII character into the character pointed to by */ - /* c. Note that cut must be <= 9, and the maximum value for u is */ + /* c. Note that cut must be <= 9, and the maximum value for u is */ /* 2,000,000,000 (as is needed for negative exponents of */ /* subnormals). The unsigned integer pow is used as a temporary */ /* variable. */ @@ -274,7 +290,7 @@ pow/=2; \ if ((u)>=pow) {(u)-=pow; *(c)+=4;} \ pow/=2; \ - } \ + } \ if ((u)>=pow) {(u)-=pow; *(c)+=2;} \ pow/=2; \ if ((u)>=pow) {(u)-=pow; *(c)+=1;} \ @@ -289,9 +305,9 @@ /* number, whose coefficient is a string of bcd8 uBytes */ typedef struct { uByte *msd; /* -> most significant digit */ - uByte *lsd; /* -> least ditto */ + uByte *lsd; /* -> least ditto */ uInt sign; /* 0=positive, DECFLOAT_Sign=negative */ - Int exponent; /* Unadjusted signed exponent (q), or */ + Int exponent; /* Unadjusted signed exponent (q), or */ /* DECFLOAT_NaN etc. for a special */ } bcdnum; @@ -308,12 +324,12 @@ #define DECWORDS (DECBYTES/4) #define DECWWORDS (DECWBYTES/4) #if DECLITEND - #define DFWORD(df, off) ((df)->words[DECWORDS-1-(off)]) - #define DFBYTE(df, off) ((df)->bytes[DECBYTES-1-(off)]) + #define DFBYTE(df, off) ((df)->bytes[DECBYTES-1-(off)]) + #define DFWORD(df, off) ((df)->words[DECWORDS-1-(off)]) #define DFWWORD(dfw, off) ((dfw)->words[DECWWORDS-1-(off)]) #else - #define DFWORD(df, off) ((df)->words[off]) - #define DFBYTE(df, off) ((df)->bytes[off]) + #define DFBYTE(df, off) ((df)->bytes[off]) + #define DFWORD(df, off) ((df)->words[off]) #define DFWWORD(dfw, off) ((dfw)->words[off]) #endif @@ -326,7 +342,6 @@ #define DFISSNAN(df) ((DFWORD(df, 0)&0x7e000000)==0x7e000000) /* Shared lookup tables */ -#include "decCommonSymbols.h" extern const uInt DECCOMBMSD[64]; /* Combination field -> MSD */ extern const uInt DECCOMBFROM[48]; /* exp+msd -> Combination */ @@ -338,7 +353,7 @@ /* Format-dependent macros and constants */ #if defined(DECPMAX) - /* Useful constants */ + /* Useful constants */ #define DECPMAX9 (ROUNDUP(DECPMAX, 9)/9) /* 'Pmax' in 10**9s */ /* Top words for a zero */ #define SINGLEZERO 0x22500000 @@ -350,10 +365,10 @@ /* DFISZERO -- test for (any) zero */ /* DFISCCZERO -- test for coefficient continuation being zero */ /* DFISCC01 -- test for coefficient contains only 0s and 1s */ - /* DFISINT -- test for finite and exponent q=0 */ + /* DFISINT -- test for finite and exponent q=0 */ /* DFISUINT01 -- test for sign=0, finite, exponent q=0, and */ /* MSD=0 or 1 */ - /* ZEROWORD is also defined here. */ + /* ZEROWORD is also defined here. */ /* In DFISZERO the first test checks the least-significant word */ /* (most likely to be non-zero); the penultimate tests MSD and */ /* DPDs in the signword, and the final test excludes specials and */ @@ -407,26 +422,36 @@ || ((dpd)&(((uInt)0x6e)<<(k)))!=(((uInt)0x6e)<<(k))) /* declet is at offset k (a multiple of 2) in a pair of uInts: */ /* [the top 2 bits will always be in the more-significant uInt] */ - #define CANONDPDTWO(hi, lo, k) (((hi)&(0x300>>(32-(k))))==0 \ + #define CANONDPDTWO(hi, lo, k) (((hi)&(0x300>>(32-(k))))==0 \ || ((hi)&(0x6e>>(32-(k))))!=(0x6e>>(32-(k))) \ || ((lo)&(((uInt)0x6e)<<(k)))!=(((uInt)0x6e)<<(k))) /* Macro to test whether a full-length (length DECPMAX) BCD8 */ - /* coefficient is zero */ - /* test just the LSWord first, then the remainder */ + /* coefficient, starting at uByte u, is all zeros */ + /* Test just the LSWord first, then the remainder as a sequence */ + /* of tests in order to avoid same-level use of UBTOUI */ #if DECPMAX==7 - #define ISCOEFFZERO(u) (UINTAT((u)+DECPMAX-4)==0 \ - && UINTAT((u)+DECPMAX-7)==0) + #define ISCOEFFZERO(u) ( \ + UBTOUI((u)+DECPMAX-4)==0 \ + && UBTOUS((u)+DECPMAX-6)==0 \ + && *(u)==0) #elif DECPMAX==16 - #define ISCOEFFZERO(u) (UINTAT((u)+DECPMAX-4)==0 \ - && (UINTAT((u)+DECPMAX-8)+UINTAT((u)+DECPMAX-12) \ - +UINTAT((u)+DECPMAX-16))==0) + #define ISCOEFFZERO(u) ( \ + UBTOUI((u)+DECPMAX-4)==0 \ + && UBTOUI((u)+DECPMAX-8)==0 \ + && UBTOUI((u)+DECPMAX-12)==0 \ + && UBTOUI(u)==0) #elif DECPMAX==34 - #define ISCOEFFZERO(u) (UINTAT((u)+DECPMAX-4)==0 \ - && (UINTAT((u)+DECPMAX-8) +UINTAT((u)+DECPMAX-12) \ - +UINTAT((u)+DECPMAX-16)+UINTAT((u)+DECPMAX-20) \ - +UINTAT((u)+DECPMAX-24)+UINTAT((u)+DECPMAX-28) \ - +UINTAT((u)+DECPMAX-32)+USHORTAT((u)+DECPMAX-34))==0) + #define ISCOEFFZERO(u) ( \ + UBTOUI((u)+DECPMAX-4)==0 \ + && UBTOUI((u)+DECPMAX-8)==0 \ + && UBTOUI((u)+DECPMAX-12)==0 \ + && UBTOUI((u)+DECPMAX-16)==0 \ + && UBTOUI((u)+DECPMAX-20)==0 \ + && UBTOUI((u)+DECPMAX-24)==0 \ + && UBTOUI((u)+DECPMAX-28)==0 \ + && UBTOUI((u)+DECPMAX-32)==0 \ + && UBTOUS(u)==0) #endif /* Macros and masks for the exponent continuation field and MSD */ @@ -448,29 +473,24 @@ #define ECONNANMASK ((0x01ffffff>>(32-6-DECECONL))<<(32-6-DECECONL)) /* Macros to decode the coefficient in a finite decFloat *df into */ - /* a BCD string (uByte *bcdin) of length DECPMAX uBytes */ - - /* In-line sequence to convert 10 bits at right end of uInt dpd */ - /* to three BCD8 digits starting at uByte u. Note that an extra */ - /* byte is written to the right of the three digits because this */ - /* moves four at a time for speed; the alternative macro moves */ - /* exactly three bytes */ - #define dpd2bcd8(u, dpd) { \ - UINTAT(u)=UINTAT(&DPD2BCD8[((dpd)&0x3ff)*4]);} + /* a BCD string (uByte *bcdin) of length DECPMAX uBytes. */ - #define dpd2bcd83(u, dpd) { \ - *(u)=DPD2BCD8[((dpd)&0x3ff)*4]; \ - *(u+1)=DPD2BCD8[((dpd)&0x3ff)*4+1]; \ - *(u+2)=DPD2BCD8[((dpd)&0x3ff)*4+2];} + /* In-line sequence to convert least significant 10 bits of uInt */ + /* dpd to three BCD8 digits starting at uByte u. Note that an */ + /* extra byte is written to the right of the three digits because */ + /* four bytes are moved at a time for speed; the alternative */ + /* macro moves exactly three bytes (usually slower). */ + #define dpd2bcd8(u, dpd) memcpy(u, &DPD2BCD8[((dpd)&0x3ff)*4], 4) + #define dpd2bcd83(u, dpd) memcpy(u, &DPD2BCD8[((dpd)&0x3ff)*4], 3) /* Decode the declets. After extracting each one, it is decoded */ /* to BCD8 using a table lookup (also used for variable-length */ - /* decode). Each DPD decode is 3 bytes BCD8 plus a one-byte */ - /* length which is not used, here). Fixed-length 4-byte moves */ + /* decode). Each DPD decode is 3 bytes BCD8 plus a one-byte */ + /* length which is not used, here). Fixed-length 4-byte moves */ /* are fast, however, almost everywhere, and so are used except */ /* for the final three bytes (to avoid overrun). The code below */ /* is 36 instructions for Doubles and about 70 for Quads, even */ - /* on IA32. */ + /* on IA32. */ /* Two macros are defined for each format: */ /* GETCOEFF extracts the coefficient of the current format */ @@ -478,7 +498,7 @@ /* The latter is a copy of the next-wider GETCOEFF using DFWWORD. */ #if DECPMAX==7 - #define GETCOEFF(df, bcd) { \ + #define GETCOEFF(df, bcd) { \ uInt sourhi=DFWORD(df, 0); \ *(bcd)=(uByte)DECCOMBMSD[sourhi>>26]; \ dpd2bcd8(bcd+1, sourhi>>10); \ @@ -494,7 +514,7 @@ dpd2bcd83(bcd+13, sourlo);} #elif DECPMAX==16 - #define GETCOEFF(df, bcd) { \ + #define GETCOEFF(df, bcd) { \ uInt sourhi=DFWORD(df, 0); \ uInt sourlo=DFWORD(df, 1); \ *(bcd)=(uByte)DECCOMBMSD[sourhi>>26]; \ @@ -522,7 +542,7 @@ dpd2bcd83(bcd+31, sourlo);} #elif DECPMAX==34 - #define GETCOEFF(df, bcd) { \ + #define GETCOEFF(df, bcd) { \ uInt sourhi=DFWORD(df, 0); \ uInt sourmh=DFWORD(df, 1); \ uInt sourml=DFWORD(df, 2); \ @@ -540,12 +560,12 @@ dpd2bcd8(bcd+28, sourlo>>10); \ dpd2bcd83(bcd+31, sourlo);} - #define GETWCOEFF(df, bcd) {??} /* [should never be used] */ + #define GETWCOEFF(df, bcd) {??} /* [should never be used] */ #endif /* Macros to decode the coefficient in a finite decFloat *df into */ /* a base-billion uInt array, with the least-significant */ - /* 0-999999999 'digit' at offset 0. */ + /* 0-999999999 'digit' at offset 0. */ /* Decode the declets. After extracting each one, it is decoded */ /* to binary using a table lookup. Three tables are used; one */ @@ -597,8 +617,8 @@ #endif /* Macros to decode the coefficient in a finite decFloat *df into */ - /* a base-thousand uInt array, with the least-significant 0-999 */ - /* 'digit' at offset 0. */ + /* a base-thousand uInt array (of size DECLETS+1, to allow for */ + /* the MSD), with the least-significant 0-999 'digit' at offset 0.*/ /* Decode the declets. After extracting each one, it is decoded */ /* to binary using a table lookup. */ @@ -640,9 +660,72 @@ (buf)[9]=DPD2BIN[((sourhi<<6) | (sourmh>>26))&0x3ff]; \ (buf)[10]=DPD2BIN[(sourhi>>4)&0x3ff]; \ (buf)[11]=DECCOMBMSD[sourhi>>26];} + #endif + + + /* Macros to decode the coefficient in a finite decFloat *df and */ + /* add to a base-thousand uInt array (as for GETCOEFFTHOU). */ + /* After the addition then most significant 'digit' in the array */ + /* might have a value larger then 10 (with a maximum of 19). */ + #if DECPMAX==7 + #define ADDCOEFFTHOU(df, buf) { \ + uInt sourhi=DFWORD(df, 0); \ + (buf)[0]+=DPD2BIN[sourhi&0x3ff]; \ + if (buf[0]>999) {buf[0]-=1000; buf[1]++;} \ + (buf)[1]+=DPD2BIN[(sourhi>>10)&0x3ff]; \ + if (buf[1]>999) {buf[1]-=1000; buf[2]++;} \ + (buf)[2]+=DECCOMBMSD[sourhi>>26];} + #elif DECPMAX==16 + #define ADDCOEFFTHOU(df, buf) { \ + uInt sourhi, sourlo; \ + sourlo=DFWORD(df, 1); \ + (buf)[0]+=DPD2BIN[sourlo&0x3ff]; \ + if (buf[0]>999) {buf[0]-=1000; buf[1]++;} \ + (buf)[1]+=DPD2BIN[(sourlo>>10)&0x3ff]; \ + if (buf[1]>999) {buf[1]-=1000; buf[2]++;} \ + (buf)[2]+=DPD2BIN[(sourlo>>20)&0x3ff]; \ + if (buf[2]>999) {buf[2]-=1000; buf[3]++;} \ + sourhi=DFWORD(df, 0); \ + (buf)[3]+=DPD2BIN[((sourhi<<2) | (sourlo>>30))&0x3ff]; \ + if (buf[3]>999) {buf[3]-=1000; buf[4]++;} \ + (buf)[4]+=DPD2BIN[(sourhi>>8)&0x3ff]; \ + if (buf[4]>999) {buf[4]-=1000; buf[5]++;} \ + (buf)[5]+=DECCOMBMSD[sourhi>>26];} + + #elif DECPMAX==34 + #define ADDCOEFFTHOU(df, buf) { \ + uInt sourhi, sourmh, sourml, sourlo; \ + sourlo=DFWORD(df, 3); \ + (buf)[0]+=DPD2BIN[sourlo&0x3ff]; \ + if (buf[0]>999) {buf[0]-=1000; buf[1]++;} \ + (buf)[1]+=DPD2BIN[(sourlo>>10)&0x3ff]; \ + if (buf[1]>999) {buf[1]-=1000; buf[2]++;} \ + (buf)[2]+=DPD2BIN[(sourlo>>20)&0x3ff]; \ + if (buf[2]>999) {buf[2]-=1000; buf[3]++;} \ + sourml=DFWORD(df, 2); \ + (buf)[3]+=DPD2BIN[((sourml<<2) | (sourlo>>30))&0x3ff]; \ + if (buf[3]>999) {buf[3]-=1000; buf[4]++;} \ + (buf)[4]+=DPD2BIN[(sourml>>8)&0x3ff]; \ + if (buf[4]>999) {buf[4]-=1000; buf[5]++;} \ + (buf)[5]+=DPD2BIN[(sourml>>18)&0x3ff]; \ + if (buf[5]>999) {buf[5]-=1000; buf[6]++;} \ + sourmh=DFWORD(df, 1); \ + (buf)[6]+=DPD2BIN[((sourmh<<4) | (sourml>>28))&0x3ff]; \ + if (buf[6]>999) {buf[6]-=1000; buf[7]++;} \ + (buf)[7]+=DPD2BIN[(sourmh>>6)&0x3ff]; \ + if (buf[7]>999) {buf[7]-=1000; buf[8]++;} \ + (buf)[8]+=DPD2BIN[(sourmh>>16)&0x3ff]; \ + if (buf[8]>999) {buf[8]-=1000; buf[9]++;} \ + sourhi=DFWORD(df, 0); \ + (buf)[9]+=DPD2BIN[((sourhi<<6) | (sourmh>>26))&0x3ff]; \ + if (buf[9]>999) {buf[9]-=1000; buf[10]++;} \ + (buf)[10]+=DPD2BIN[(sourhi>>4)&0x3ff]; \ + if (buf[10]>999) {buf[10]-=1000; buf[11]++;} \ + (buf)[11]+=DECCOMBMSD[sourhi>>26];} #endif + /* Set a decFloat to the maximum positive finite number (Nmax) */ #if DECPMAX==7 #define DFSETNMAX(df) \ diff --git a/libdecnumber/decPacked.c b/libdecnumber/decPacked.c index 2b912fe13bc..2297d7d6e7d 100644 --- a/libdecnumber/decPacked.c +++ b/libdecnumber/decPacked.c @@ -31,12 +31,12 @@ /* ------------------------------------------------------------------ */ /* Packed Decimal conversion module */ /* ------------------------------------------------------------------ */ -/* This module comprises the routines for Packed Decimal format */ +/* This module comprises the routines for Packed Decimal format */ /* numbers. Conversions are supplied to and from decNumber, which in */ /* turn supports: */ /* conversions to and from string */ /* arithmetic routines */ -/* utilities. */ +/* utilities. */ /* Conversions from decNumber to and from densely packed decimal */ /* formats are provided by the decimal32 through decimal128 modules. */ /* ------------------------------------------------------------------ */ @@ -51,8 +51,8 @@ /* */ /* bcd is the BCD bytes */ /* length is the length of the BCD array */ -/* scale is the scale result */ -/* dn is the decNumber */ +/* scale is the scale result */ +/* dn is the decNumber */ /* returns bcd, or NULL if error */ /* */ /* The number is converted to a BCD packed decimal byte array, */ @@ -67,7 +67,7 @@ /* as necessary. */ /* */ /* If there is an error (that is, the decNumber has too many digits */ -/* to fit in length bytes, or it is a NaN or Infinity), NULL is */ +/* to fit in length bytes, or it is a NaN or Infinity), NULL is */ /* returned and the bcd and scale results are unchanged. Otherwise */ /* bcd is returned. */ /* ------------------------------------------------------------------ */ @@ -86,9 +86,9 @@ uByte * decPackedFromNumber(uByte *bcd, Int length, Int *scale, if (dn->digits>length*2-1 /* too long .. */ ||(dn->bits & DECSPECIAL)) return NULL; /* .. or special -- hopeless */ - if (dn->bits&DECNEG) obyte=DECPMINUS; /* set the sign .. */ - else obyte=DECPPLUS; - *scale=-dn->exponent; /* .. and scale */ + if (dn->bits&DECNEG) obyte=DECPMINUS; /* set the sign .. */ + else obyte=DECPPLUS; + *scale=-dn->exponent; /* .. and scale */ /* loop from lowest (rightmost) byte */ out=bcd+length-1; /* -> final byte */ @@ -141,7 +141,7 @@ uByte * decPackedFromNumber(uByte *bcd, Int length, Int *scale, /* bcd is the BCD bytes */ /* length is the length of the BCD array */ /* scale is the scale associated with the BCD integer */ -/* dn is the decNumber [with space for length*2 digits] */ +/* dn is the decNumber [with space for length*2 digits] */ /* returns dn, or NULL if error */ /* */ /* The BCD packed decimal byte array, together with an associated */ @@ -157,7 +157,7 @@ uByte * decPackedFromNumber(uByte *bcd, Int length, Int *scale, /* no error is possible unless the adjusted exponent is out of range, */ /* no sign nibble was found, or a sign nibble was found before the */ /* final nibble. In these error cases, NULL is returned and the */ -/* decNumber will be 0. */ +/* decNumber will be 0. */ /* ------------------------------------------------------------------ */ decNumber * decPackedToNumber(const uByte *bcd, Int length, const Int *scale, decNumber *dn) { @@ -165,7 +165,7 @@ decNumber * decPackedToNumber(const uByte *bcd, Int length, const uByte *first; /* -> first non-zero byte */ uInt nib; /* work nibble */ Unit *up=dn->lsu; /* output pointer */ - Int digits; /* digits count */ + Int digits; /* digits count */ Int cut=0; /* phase of output */ decNumberZero(dn); /* default result */ @@ -182,7 +182,7 @@ decNumber * decPackedToNumber(const uByte *bcd, Int length, /* leave as 1] */ /* check the adjusted exponent; note that scale could be unbounded */ - dn->exponent=-*scale; /* set the exponent */ + dn->exponent=-*scale; /* set the exponent */ if (*scale>=0) { /* usual case */ if ((dn->digits-*scale-1)<-DECNUMMAXE) { /* underflow */ decNumberZero(dn); diff --git a/libdecnumber/decPacked.h b/libdecnumber/decPacked.h index c76aa09631e..04fcf53dfc5 100644 --- a/libdecnumber/decPacked.h +++ b/libdecnumber/decPacked.h @@ -36,7 +36,7 @@ #define DECPACKED #define DECPNAME "decPacked" /* Short name */ #define DECPFULLNAME "Packed Decimal conversions" /* Verbose name */ - #define DECPAUTHOR "Mike Cowlishaw" /* Who to blame */ + #define DECPAUTHOR "Mike Cowlishaw" /* Who to blame */ #define DECPACKED_DefP 32 /* default precision */ @@ -47,12 +47,12 @@ /* Sign nibble constants */ #if !defined(DECPPLUSALT) - #define DECPPLUSALT 0x0A /* alternate plus nibble */ - #define DECPMINUSALT 0x0B /* alternate minus nibble */ - #define DECPPLUS 0x0C /* preferred plus nibble */ - #define DECPMINUS 0x0D /* preferred minus nibble */ - #define DECPPLUSALT2 0x0E /* alternate plus nibble */ - #define DECPUNSIGNED 0x0F /* alternate plus nibble (unsigned) */ + #define DECPPLUSALT 0x0A /* alternate plus nibble */ + #define DECPMINUSALT 0x0B /* alternate minus nibble */ + #define DECPPLUS 0x0C /* preferred plus nibble */ + #define DECPMINUS 0x0D /* preferred minus nibble */ + #define DECPPLUSALT2 0x0E /* alternate plus nibble */ + #define DECPUNSIGNED 0x0F /* alternate plus nibble (unsigned) */ #endif /* ---------------------------------------------------------------- */ diff --git a/libdecnumber/decQuad.c b/libdecnumber/decQuad.c index 6ec9b7f735f..a8eb9050ddc 100644 --- a/libdecnumber/decQuad.c +++ b/libdecnumber/decQuad.c @@ -34,111 +34,111 @@ /* This module comprises decQuad operations (including conversions) */ /* ------------------------------------------------------------------ */ -#include "decContext.h" /* public includes */ +#include "decContext.h" /* public includes */ #include "decQuad.h" /* .. */ /* Constant mappings for shared code */ -#define DECPMAX DECQUAD_Pmax -#define DECEMIN DECQUAD_Emin -#define DECEMAX DECQUAD_Emax +#define DECPMAX DECQUAD_Pmax +#define DECEMIN DECQUAD_Emin +#define DECEMAX DECQUAD_Emax #define DECEMAXD DECQUAD_EmaxD #define DECBYTES DECQUAD_Bytes #define DECSTRING DECQUAD_String #define DECECONL DECQUAD_EconL -#define DECBIAS DECQUAD_Bias -#define DECLETS DECQUAD_Declets +#define DECBIAS DECQUAD_Bias +#define DECLETS DECQUAD_Declets #define DECQTINY (-DECQUAD_Bias) /* Type and function mappings for shared code */ -#define decFloat decQuad /* Type name */ +#define decFloat decQuad /* Type name */ /* Utilities and conversions (binary results, extractors, etc.) */ -#define decFloatFromBCD decQuadFromBCD -#define decFloatFromInt32 decQuadFromInt32 -#define decFloatFromPacked decQuadFromPacked -#define decFloatFromString decQuadFromString -#define decFloatFromUInt32 decQuadFromUInt32 -#define decFloatFromWider decQuadFromWider -#define decFloatGetCoefficient decQuadGetCoefficient -#define decFloatGetExponent decQuadGetExponent -#define decFloatSetCoefficient decQuadSetCoefficient -#define decFloatSetExponent decQuadSetExponent -#define decFloatShow decQuadShow -#define decFloatToBCD decQuadToBCD -#define decFloatToEngString decQuadToEngString -#define decFloatToInt32 decQuadToInt32 -#define decFloatToInt32Exact decQuadToInt32Exact -#define decFloatToPacked decQuadToPacked -#define decFloatToString decQuadToString -#define decFloatToUInt32 decQuadToUInt32 -#define decFloatToUInt32Exact decQuadToUInt32Exact -#define decFloatToWider decQuadToWider -#define decFloatZero decQuadZero +#define decFloatFromBCD decQuadFromBCD +#define decFloatFromInt32 decQuadFromInt32 +#define decFloatFromPacked decQuadFromPacked +#define decFloatFromPackedChecked decQuadFromPackedChecked +#define decFloatFromString decQuadFromString +#define decFloatFromUInt32 decQuadFromUInt32 +#define decFloatFromWider decQuadFromWider +#define decFloatGetCoefficient decQuadGetCoefficient +#define decFloatGetExponent decQuadGetExponent +#define decFloatSetCoefficient decQuadSetCoefficient +#define decFloatSetExponent decQuadSetExponent +#define decFloatShow decQuadShow +#define decFloatToBCD decQuadToBCD +#define decFloatToEngString decQuadToEngString +#define decFloatToInt32 decQuadToInt32 +#define decFloatToInt32Exact decQuadToInt32Exact +#define decFloatToPacked decQuadToPacked +#define decFloatToString decQuadToString +#define decFloatToUInt32 decQuadToUInt32 +#define decFloatToUInt32Exact decQuadToUInt32Exact +#define decFloatToWider decQuadToWider +#define decFloatZero decQuadZero /* Computational (result is a decFloat) */ -#define decFloatAbs decQuadAbs -#define decFloatAdd decQuadAdd -#define decFloatAnd decQuadAnd -#define decFloatDivide decQuadDivide -#define decFloatDivideInteger decQuadDivideInteger -#define decFloatFMA decQuadFMA -#define decFloatInvert decQuadInvert -#define decFloatLogB decQuadLogB -#define decFloatMax decQuadMax -#define decFloatMaxMag decQuadMaxMag -#define decFloatMin decQuadMin -#define decFloatMinMag decQuadMinMag -#define decFloatMinus decQuadMinus -#define decFloatMultiply decQuadMultiply -#define decFloatNextMinus decQuadNextMinus -#define decFloatNextPlus decQuadNextPlus -#define decFloatNextToward decQuadNextToward -#define decFloatOr decQuadOr -#define decFloatPlus decQuadPlus -#define decFloatQuantize decQuadQuantize -#define decFloatReduce decQuadReduce -#define decFloatRemainder decQuadRemainder -#define decFloatRemainderNear decQuadRemainderNear -#define decFloatRotate decQuadRotate -#define decFloatScaleB decQuadScaleB -#define decFloatShift decQuadShift -#define decFloatSubtract decQuadSubtract -#define decFloatToIntegralValue decQuadToIntegralValue -#define decFloatToIntegralExact decQuadToIntegralExact -#define decFloatXor decQuadXor +#define decFloatAbs decQuadAbs +#define decFloatAdd decQuadAdd +#define decFloatAnd decQuadAnd +#define decFloatDivide decQuadDivide +#define decFloatDivideInteger decQuadDivideInteger +#define decFloatFMA decQuadFMA +#define decFloatInvert decQuadInvert +#define decFloatLogB decQuadLogB +#define decFloatMax decQuadMax +#define decFloatMaxMag decQuadMaxMag +#define decFloatMin decQuadMin +#define decFloatMinMag decQuadMinMag +#define decFloatMinus decQuadMinus +#define decFloatMultiply decQuadMultiply +#define decFloatNextMinus decQuadNextMinus +#define decFloatNextPlus decQuadNextPlus +#define decFloatNextToward decQuadNextToward +#define decFloatOr decQuadOr +#define decFloatPlus decQuadPlus +#define decFloatQuantize decQuadQuantize +#define decFloatReduce decQuadReduce +#define decFloatRemainder decQuadRemainder +#define decFloatRemainderNear decQuadRemainderNear +#define decFloatRotate decQuadRotate +#define decFloatScaleB decQuadScaleB +#define decFloatShift decQuadShift +#define decFloatSubtract decQuadSubtract +#define decFloatToIntegralValue decQuadToIntegralValue +#define decFloatToIntegralExact decQuadToIntegralExact +#define decFloatXor decQuadXor /* Comparisons */ -#define decFloatCompare decQuadCompare -#define decFloatCompareSignal decQuadCompareSignal -#define decFloatCompareTotal decQuadCompareTotal -#define decFloatCompareTotalMag decQuadCompareTotalMag +#define decFloatCompare decQuadCompare +#define decFloatCompareSignal decQuadCompareSignal +#define decFloatCompareTotal decQuadCompareTotal +#define decFloatCompareTotalMag decQuadCompareTotalMag /* Copies */ -#define decFloatCanonical decQuadCanonical -#define decFloatCopy decQuadCopy -#define decFloatCopyAbs decQuadCopyAbs -#define decFloatCopyNegate decQuadCopyNegate -#define decFloatCopySign decQuadCopySign +#define decFloatCanonical decQuadCanonical +#define decFloatCopy decQuadCopy +#define decFloatCopyAbs decQuadCopyAbs +#define decFloatCopyNegate decQuadCopyNegate +#define decFloatCopySign decQuadCopySign /* Non-computational */ -#define decFloatClass decQuadClass -#define decFloatClassString decQuadClassString -#define decFloatDigits decQuadDigits -#define decFloatIsCanonical decQuadIsCanonical -#define decFloatIsFinite decQuadIsFinite -#define decFloatIsInfinite decQuadIsInfinite -#define decFloatIsInteger decQuadIsInteger -#define decFloatIsNaN decQuadIsNaN -#define decFloatIsNormal decQuadIsNormal -#define decFloatIsSignaling decQuadIsSignaling -#define decFloatIsSignalling decQuadIsSignalling -#define decFloatIsSigned decQuadIsSigned -#define decFloatIsSubnormal decQuadIsSubnormal -#define decFloatIsZero decQuadIsZero -#define decFloatRadix decQuadRadix -#define decFloatSameQuantum decQuadSameQuantum -#define decFloatVersion decQuadVersion - +#define decFloatClass decQuadClass +#define decFloatClassString decQuadClassString +#define decFloatDigits decQuadDigits +#define decFloatIsCanonical decQuadIsCanonical +#define decFloatIsFinite decQuadIsFinite +#define decFloatIsInfinite decQuadIsInfinite +#define decFloatIsInteger decQuadIsInteger +#define decFloatIsNaN decQuadIsNaN +#define decFloatIsNormal decQuadIsNormal +#define decFloatIsSignaling decQuadIsSignaling +#define decFloatIsSignalling decQuadIsSignalling +#define decFloatIsSigned decQuadIsSigned +#define decFloatIsSubnormal decQuadIsSubnormal +#define decFloatIsZero decQuadIsZero +#define decFloatRadix decQuadRadix +#define decFloatSameQuantum decQuadSameQuantum +#define decFloatVersion decQuadVersion #include "decNumberLocal.h" /* local includes (need DECPMAX) */ #include "decCommon.c" /* non-arithmetic decFloat routines */ diff --git a/libdecnumber/decQuad.h b/libdecnumber/decQuad.h index af9bc24e265..80f5eef4958 100644 --- a/libdecnumber/decQuad.h +++ b/libdecnumber/decQuad.h @@ -31,27 +31,25 @@ /* ------------------------------------------------------------------ */ /* decQuad.h -- Decimal 128-bit format module header */ /* ------------------------------------------------------------------ */ -/* Please see decFloats.h for an overview and documentation details. */ -/* ------------------------------------------------------------------ */ /* This include file is always included by decSingle and decDouble, */ -/* and therefore also holds useful constants used by all three. */ +/* and therefore also holds useful constants used by all three. */ #if !defined(DECQUAD) #define DECQUAD #define DECQUADNAME "decimalQuad" /* Short name */ #define DECQUADTITLE "Decimal 128-bit datum" /* Verbose name */ - #define DECQUADAUTHOR "Mike Cowlishaw" /* Who to blame */ + #define DECQUADAUTHOR "Mike Cowlishaw" /* Who to blame */ /* parameters for decQuads */ - #define DECQUAD_Bytes 16 /* length */ + #define DECQUAD_Bytes 16 /* length */ #define DECQUAD_Pmax 34 /* maximum precision (digits) */ - #define DECQUAD_Emin -6143 /* minimum adjusted exponent */ - #define DECQUAD_Emax 6144 /* maximum adjusted exponent */ - #define DECQUAD_EmaxD 4 /* maximum exponent digits */ + #define DECQUAD_Emin -6143 /* minimum adjusted exponent */ + #define DECQUAD_Emax 6144 /* maximum adjusted exponent */ + #define DECQUAD_EmaxD 4 /* maximum exponent digits */ #define DECQUAD_Bias 6176 /* bias for the exponent */ - #define DECQUAD_String 43 /* maximum string length, +1 */ - #define DECQUAD_EconL 12 /* exponent continuation length */ + #define DECQUAD_String 43 /* maximum string length, +1 */ + #define DECQUAD_EconL 12 /* exponent continuation length */ #define DECQUAD_Declets 11 /* count of declets */ /* highest biased exponent (Elimit-1) */ #define DECQUAD_Ehigh (DECQUAD_Emax + DECQUAD_Bias - (DECQUAD_Pmax-1)) @@ -59,11 +57,14 @@ /* Required include */ #include "decContext.h" - /* The decQuad decimal 128-bit type, accessible by various types */ + /* The decQuad decimal 128-bit type, accessible by all sizes */ typedef union { - uint8_t bytes[DECQUAD_Bytes]; /* fields: 1, 5, 12, 110 bits */ + uint8_t bytes[DECQUAD_Bytes]; /* fields: 1, 5, 12, 110 bits */ uint16_t shorts[DECQUAD_Bytes/2]; - uint32_t words[DECQUAD_Bytes/4]; + uint32_t words[DECQUAD_Bytes/4]; + #if DECUSE64 + uint64_t longs[DECQUAD_Bytes/8]; + #endif } decQuad; /* ---------------------------------------------------------------- */ @@ -72,21 +73,21 @@ /* sign and special values [top 32-bits; last two bits are don't-care for Infinity on input, last bit don't-care for NaNs] */ - #define DECFLOAT_Sign 0x80000000 /* 1 00000 00 Sign */ + #define DECFLOAT_Sign 0x80000000 /* 1 00000 00 Sign */ #define DECFLOAT_NaN 0x7c000000 /* 0 11111 00 NaN generic */ - #define DECFLOAT_qNaN 0x7c000000 /* 0 11111 00 qNaN */ - #define DECFLOAT_sNaN 0x7e000000 /* 0 11111 10 sNaN */ + #define DECFLOAT_qNaN 0x7c000000 /* 0 11111 00 qNaN */ + #define DECFLOAT_sNaN 0x7e000000 /* 0 11111 10 sNaN */ #define DECFLOAT_Inf 0x78000000 /* 0 11110 00 Infinity */ #define DECFLOAT_MinSp 0x78000000 /* minimum special value */ /* [specials are all >=MinSp] */ /* Sign nibble constants */ #if !defined(DECPPLUSALT) - #define DECPPLUSALT 0x0A /* alternate plus nibble */ - #define DECPMINUSALT 0x0B /* alternate minus nibble */ - #define DECPPLUS 0x0C /* preferred plus nibble */ - #define DECPMINUS 0x0D /* preferred minus nibble */ - #define DECPPLUSALT2 0x0E /* alternate plus nibble */ - #define DECPUNSIGNED 0x0F /* alternate plus nibble (unsigned) */ + #define DECPPLUSALT 0x0A /* alternate plus nibble */ + #define DECPMINUSALT 0x0B /* alternate minus nibble */ + #define DECPPLUS 0x0C /* preferred plus nibble */ + #define DECPMINUS 0x0D /* preferred minus nibble */ + #define DECPPLUSALT2 0x0E /* alternate plus nibble */ + #define DECPUNSIGNED 0x0F /* alternate plus nibble (unsigned) */ #endif /* ---------------------------------------------------------------- */ @@ -99,6 +100,7 @@ extern decQuad * decQuadFromBCD(decQuad *, int32_t, const uint8_t *, int32_t); extern decQuad * decQuadFromInt32(decQuad *, int32_t); extern decQuad * decQuadFromPacked(decQuad *, int32_t, const uint8_t *); + extern decQuad * decQuadFromPackedChecked(decQuad *, int32_t, const uint8_t *); extern decQuad * decQuadFromString(decQuad *, const char *, decContext *); extern decQuad * decQuadFromUInt32(decQuad *, uint32_t); extern int32_t decQuadGetCoefficient(const decQuad *, uint8_t *); @@ -182,7 +184,8 @@ /* decNumber conversions; these are implemented as macros so as not */ /* to force a dependency on decimal128 and decNumber in decQuad. */ + /* decQuadFromNumber returns a decimal128 * to avoid warnings. */ #define decQuadToNumber(dq, dn) decimal128ToNumber((decimal128 *)(dq), dn) - #define decQuadFromNumber(dq, dn, set) (decQuad *)decimal128FromNumber((decimal128 *)(dq), dn, set) + #define decQuadFromNumber(dq, dn, set) decimal128FromNumber((decimal128 *)(dq), dn, set) #endif diff --git a/libdecnumber/decSingle.c b/libdecnumber/decSingle.c index 112395970fe..1c56c65806e 100644 --- a/libdecnumber/decSingle.c +++ b/libdecnumber/decSingle.c @@ -31,22 +31,20 @@ /* ------------------------------------------------------------------ */ /* decSingle.c -- decSingle operations module */ /* ------------------------------------------------------------------ */ -/* This module comprises decSingle operations (including conversions) */ -/* ------------------------------------------------------------------ */ -#include "decContext.h" /* public includes */ +#include "decContext.h" /* public includes */ #include "decSingle.h" /* public includes */ /* Constant mappings for shared code */ -#define DECPMAX DECSINGLE_Pmax -#define DECEMIN DECSINGLE_Emin -#define DECEMAX DECSINGLE_Emax +#define DECPMAX DECSINGLE_Pmax +#define DECEMIN DECSINGLE_Emin +#define DECEMAX DECSINGLE_Emax #define DECEMAXD DECSINGLE_EmaxD #define DECBYTES DECSINGLE_Bytes #define DECSTRING DECSINGLE_String #define DECECONL DECSINGLE_EconL -#define DECBIAS DECSINGLE_Bias -#define DECLETS DECSINGLE_Declets +#define DECBIAS DECSINGLE_Bias +#define DECLETS DECSINGLE_Declets #define DECQTINY (-DECSINGLE_Bias) /* parameters of next-wider format */ #define DECWBYTES DECDOUBLE_Bytes @@ -55,29 +53,30 @@ #define DECWBIAS DECDOUBLE_Bias /* Type and function mappings for shared code */ -#define decFloat decSingle /* Type name */ -#define decFloatWider decDouble /* Type name */ +#define decFloat decSingle /* Type name */ +#define decFloatWider decDouble /* Type name */ /* Utility (binary results, extractors, etc.) */ -#define decFloatFromBCD decSingleFromBCD -#define decFloatFromPacked decSingleFromPacked -#define decFloatFromString decSingleFromString -#define decFloatFromWider decSingleFromWider -#define decFloatGetCoefficient decSingleGetCoefficient -#define decFloatGetExponent decSingleGetExponent -#define decFloatSetCoefficient decSingleSetCoefficient -#define decFloatSetExponent decSingleSetExponent -#define decFloatShow decSingleShow -#define decFloatToBCD decSingleToBCD -#define decFloatToEngString decSingleToEngString -#define decFloatToPacked decSingleToPacked -#define decFloatToString decSingleToString -#define decFloatToWider decSingleToWider -#define decFloatZero decSingleZero +#define decFloatFromBCD decSingleFromBCD +#define decFloatFromPacked decSingleFromPacked +#define decFloatFromPackedChecked decSingleFromPackedChecked +#define decFloatFromString decSingleFromString +#define decFloatFromWider decSingleFromWider +#define decFloatGetCoefficient decSingleGetCoefficient +#define decFloatGetExponent decSingleGetExponent +#define decFloatSetCoefficient decSingleSetCoefficient +#define decFloatSetExponent decSingleSetExponent +#define decFloatShow decSingleShow +#define decFloatToBCD decSingleToBCD +#define decFloatToEngString decSingleToEngString +#define decFloatToPacked decSingleToPacked +#define decFloatToString decSingleToString +#define decFloatToWider decSingleToWider +#define decFloatZero decSingleZero /* Non-computational */ -#define decFloatRadix decSingleRadix -#define decFloatVersion decSingleVersion +#define decFloatRadix decSingleRadix +#define decFloatVersion decSingleVersion #include "decNumberLocal.h" /* local includes (need DECPMAX) */ #include "decCommon.c" /* non-basic decFloat routines */ diff --git a/libdecnumber/decSingle.h b/libdecnumber/decSingle.h index bae39848eed..29efe438e9b 100644 --- a/libdecnumber/decSingle.h +++ b/libdecnumber/decSingle.h @@ -31,24 +31,22 @@ /* ------------------------------------------------------------------ */ /* decSingle.h -- Decimal 32-bit format module header */ /* ------------------------------------------------------------------ */ -/* Please see decFloats.h for an overview and documentation details. */ -/* ------------------------------------------------------------------ */ #if !defined(DECSINGLE) #define DECSINGLE - #define DECSINGLENAME "decSingle" /* Short name */ + #define DECSINGLENAME "decSingle" /* Short name */ #define DECSINGLETITLE "Decimal 32-bit datum" /* Verbose name */ #define DECSINGLEAUTHOR "Mike Cowlishaw" /* Who to blame */ /* parameters for decSingles */ #define DECSINGLE_Bytes 4 /* length */ #define DECSINGLE_Pmax 7 /* maximum precision (digits) */ - #define DECSINGLE_Emin -95 /* minimum adjusted exponent */ - #define DECSINGLE_Emax 96 /* maximum adjusted exponent */ + #define DECSINGLE_Emin -95 /* minimum adjusted exponent */ + #define DECSINGLE_Emax 96 /* maximum adjusted exponent */ #define DECSINGLE_EmaxD 3 /* maximum exponent digits */ #define DECSINGLE_Bias 101 /* bias for the exponent */ - #define DECSINGLE_String 16 /* maximum string length, +1 */ + #define DECSINGLE_String 16 /* maximum string length, +1 */ #define DECSINGLE_EconL 6 /* exponent continuation length */ #define DECSINGLE_Declets 2 /* count of declets */ /* highest biased exponent (Elimit-1) */ @@ -59,11 +57,11 @@ #include "decQuad.h" #include "decDouble.h" - /* The decSingle decimal 32-bit type, accessible by various types */ + /* The decSingle decimal 32-bit type, accessible by all sizes */ typedef union { - uint8_t bytes[DECSINGLE_Bytes]; /* fields: 1, 5, 6, 20 bits */ + uint8_t bytes[DECSINGLE_Bytes]; /* fields: 1, 5, 6, 20 bits */ uint16_t shorts[DECSINGLE_Bytes/2]; - uint32_t words[DECSINGLE_Bytes/4]; + uint32_t words[DECSINGLE_Bytes/4]; } decSingle; /* ---------------------------------------------------------------- */ @@ -75,6 +73,7 @@ /* Utilities (binary argument(s) or result, extractors, etc.) */ extern decSingle * decSingleFromBCD(decSingle *, int32_t, const uint8_t *, int32_t); extern decSingle * decSingleFromPacked(decSingle *, int32_t, const uint8_t *); + extern decSingle * decSingleFromPackedChecked(decSingle *, int32_t, const uint8_t *); extern decSingle * decSingleFromString(decSingle *, const char *, decContext *); extern decSingle * decSingleFromWider(decSingle *, const decDouble *, decContext *); extern int32_t decSingleGetCoefficient(const decSingle *, uint8_t *); @@ -97,7 +96,8 @@ /* decNumber conversions; these are implemented as macros so as not */ /* to force a dependency on decimal32 and decNumber in decSingle. */ + /* decSingleFromNumber returns a decimal32 * to avoid warnings. */ #define decSingleToNumber(dq, dn) decimal32ToNumber((decimal32 *)(dq), dn) - #define decSingleFromNumber(dq, dn, set) (decSingle *)decimal32FromNumber((decimal32 *)(dq), dn, set) + #define decSingleFromNumber(dq, dn, set) decimal32FromNumber((decimal32 *)(dq), dn, set) #endif diff --git a/libdecnumber/dpd/decimal128.c b/libdecnumber/dpd/decimal128.c index 54191aab5c0..edf22e1c8d5 100644 --- a/libdecnumber/dpd/decimal128.c +++ b/libdecnumber/dpd/decimal128.c @@ -42,11 +42,11 @@ #include <string.h> /* [for memset/memcpy] */ #include <stdio.h> /* [for printf] */ -#include "dconfig.h" /* GCC definitions */ -#define DECNUMDIGITS 34 /* make decNumbers with space for 34 */ +#include "dconfig.h" /* GCC definitions */ +#define DECNUMDIGITS 34 /* make decNumbers with space for 34 */ #include "decNumber.h" /* base number library */ #include "decNumberLocal.h" /* decNumber local types, etc. */ -#include "decimal128.h" /* our primary include */ +#include "decimal128.h" /* our primary include */ /* Utility routines and tables [in decimal64.c] */ extern const uInt COMBEXP[32], COMBMSD[32]; @@ -71,7 +71,7 @@ extern void decNumberShow(const decNumber *); /* .. */ /* */ /* ds is the target decimal128 */ /* dn is the source number (assumed valid) */ -/* set is the context, used only for reporting errors */ +/* set is the context, used only for reporting errors */ /* */ /* The set argument is used only for status reporting and for the */ /* rounding mode (used if the coefficient is more than DECIMAL128_Pmax*/ @@ -89,8 +89,8 @@ decimal128 * decimal128FromNumber(decimal128 *d128, const decNumber *dn, Int ae; /* adjusted exponent */ decNumber dw; /* work */ decContext dc; /* .. */ - uInt *pu; /* .. */ uInt comb, exp; /* .. */ + uInt uiwork; /* for macros */ uInt targar[4]={0,0,0,0}; /* target 128-bit */ #define targhi targar[3] /* name the word with the sign */ #define targmh targar[2] /* name the words */ @@ -102,7 +102,7 @@ decimal128 * decimal128FromNumber(decimal128 *d128, const decNumber *dn, /* constraints. This could push the number to Infinity or zero, */ /* so this check and rounding must be done before generating the */ /* decimal128] */ - ae=dn->exponent+dn->digits-1; /* [0 if special] */ + ae=dn->exponent+dn->digits-1; /* [0 if special] */ if (dn->digits>DECIMAL128_Pmax /* too many digits */ || ae>DECIMAL128_Emax /* likely overflow */ || ae<DECIMAL128_Emin) { /* likely underflow */ @@ -118,7 +118,7 @@ decimal128 * decimal128FromNumber(decimal128 *d128, const decNumber *dn, if (dn->bits&DECSPECIAL) { /* a special value */ if (dn->bits&DECINF) targhi=DECIMAL_Inf<<24; else { /* sNaN or qNaN */ - if ((*dn->lsu!=0 || dn->digits>1) /* non-zero coefficient */ + if ((*dn->lsu!=0 || dn->digits>1) /* non-zero coefficient */ && (dn->digits<DECIMAL128_Pmax)) { /* coefficient fits */ decDigitsToDPD(dn, targar, 0); } @@ -144,11 +144,11 @@ decimal128 * decimal128FromNumber(decimal128 *d128, const decNumber *dn, comb=(exp>>9) & 0x18; /* msd=0, exp top 2 bits .. */ } else { /* non-zero finite number */ - uInt msd; /* work */ + uInt msd; /* work */ Int pad=0; /* coefficient pad digits */ /* the dn is known to fit, but it may need to be padded */ - exp=(uInt)(dn->exponent+DECIMAL128_Bias); /* bias exponent */ + exp=(uInt)(dn->exponent+DECIMAL128_Bias); /* bias exponent */ if (exp>DECIMAL128_Ehigh) { /* fold-down case */ pad=exp-DECIMAL128_Ehigh; exp=DECIMAL128_Ehigh; /* [to maximum] */ @@ -172,18 +172,19 @@ decimal128 * decimal128FromNumber(decimal128 *d128, const decNumber *dn, if (dn->bits&DECNEG) targhi|=0x80000000; /* add sign bit */ /* now write to storage; this is endian */ - pu=(uInt *)d128->bytes; /* overlay */ if (DECLITEND) { - pu[0]=targlo; /* directly store the low int */ - pu[1]=targml; /* then the mid-low */ - pu[2]=targmh; /* then the mid-high */ - pu[3]=targhi; /* then the high int */ + /* lo -> hi */ + UBFROMUI(d128->bytes, targlo); + UBFROMUI(d128->bytes+4, targml); + UBFROMUI(d128->bytes+8, targmh); + UBFROMUI(d128->bytes+12, targhi); } else { - pu[0]=targhi; /* directly store the high int */ - pu[1]=targmh; /* then the mid-high */ - pu[2]=targml; /* then the mid-low */ - pu[3]=targlo; /* then the low int */ + /* hi -> lo */ + UBFROMUI(d128->bytes, targhi); + UBFROMUI(d128->bytes+4, targmh); + UBFROMUI(d128->bytes+8, targml); + UBFROMUI(d128->bytes+12, targlo); } if (status!=0) decContextSetStatus(set, status); /* pass on status */ @@ -201,8 +202,8 @@ decNumber * decimal128ToNumber(const decimal128 *d128, decNumber *dn) { uInt msd; /* coefficient MSD */ uInt exp; /* exponent top two bits */ uInt comb; /* combination field */ - const uInt *pu; /* work */ - Int need; /* .. */ + Int need; /* work */ + uInt uiwork; /* for macros */ uInt sourar[4]; /* source 128-bit */ #define sourhi sourar[3] /* name the word with the sign */ #define sourmh sourar[2] /* and the mid-high word */ @@ -210,18 +211,17 @@ decNumber * decimal128ToNumber(const decimal128 *d128, decNumber *dn) { #define sourlo sourar[0] /* and the lowest word */ /* load source from storage; this is endian */ - pu=(const uInt *)d128->bytes; /* overlay */ if (DECLITEND) { - sourlo=pu[0]; /* directly load the low int */ - sourml=pu[1]; /* then the mid-low */ - sourmh=pu[2]; /* then the mid-high */ - sourhi=pu[3]; /* then the high int */ + sourlo=UBTOUI(d128->bytes ); /* directly load the low int */ + sourml=UBTOUI(d128->bytes+4 ); /* then the mid-low */ + sourmh=UBTOUI(d128->bytes+8 ); /* then the mid-high */ + sourhi=UBTOUI(d128->bytes+12); /* then the high int */ } else { - sourhi=pu[0]; /* directly load the high int */ - sourmh=pu[1]; /* then the mid-high */ - sourml=pu[2]; /* then the mid-low */ - sourlo=pu[3]; /* then the low int */ + sourhi=UBTOUI(d128->bytes ); /* directly load the high int */ + sourmh=UBTOUI(d128->bytes+4 ); /* then the mid-high */ + sourml=UBTOUI(d128->bytes+8 ); /* then the mid-low */ + sourlo=UBTOUI(d128->bytes+12); /* then the low int */ } comb=(sourhi>>26)&0x1f; /* combination field */ @@ -232,7 +232,7 @@ decNumber * decimal128ToNumber(const decimal128 *d128, decNumber *dn) { msd=COMBMSD[comb]; /* decode the combination field */ exp=COMBEXP[comb]; /* .. */ - if (exp==3) { /* is a special */ + if (exp==3) { /* is a special */ if (msd==0) { dn->bits|=DECINF; return dn; /* no coefficient needed */ @@ -265,7 +265,7 @@ decNumber * decimal128ToNumber(const decimal128 *d128, decNumber *dn) { } /* decimal128ToNumber */ /* ------------------------------------------------------------------ */ -/* to-scientific-string -- conversion to numeric string */ +/* to-scientific-string -- conversion to numeric string */ /* to-engineering-string -- conversion to numeric string */ /* */ /* decimal128ToString(d128, string); */ @@ -279,7 +279,7 @@ decNumber * decimal128ToNumber(const decimal128 *d128, decNumber *dn) { /* No error is possible, and no status can be set. */ /* ------------------------------------------------------------------ */ char * decimal128ToEngString(const decimal128 *d128, char *string){ - decNumber dn; /* work */ + decNumber dn; /* work */ decimal128ToNumber(d128, &dn); decNumberToEngString(&dn, string); return string; @@ -289,13 +289,13 @@ char * decimal128ToString(const decimal128 *d128, char *string){ uInt msd; /* coefficient MSD */ Int exp; /* exponent top two bits or full */ uInt comb; /* combination field */ - char *cstart; /* coefficient start */ + char *cstart; /* coefficient start */ char *c; /* output pointer in string */ - const uInt *pu; /* work */ + const uByte *u; /* work */ char *s, *t; /* .. (source, target) */ Int dpd; /* .. */ Int pre, e; /* .. */ - const uByte *u; /* .. */ + uInt uiwork; /* for macros */ uInt sourar[4]; /* source 128-bit */ #define sourhi sourar[3] /* name the word with the sign */ @@ -304,18 +304,17 @@ char * decimal128ToString(const decimal128 *d128, char *string){ #define sourlo sourar[0] /* and the lowest word */ /* load source from storage; this is endian */ - pu=(const uInt *)d128->bytes; /* overlay */ if (DECLITEND) { - sourlo=pu[0]; /* directly load the low int */ - sourml=pu[1]; /* then the mid-low */ - sourmh=pu[2]; /* then the mid-high */ - sourhi=pu[3]; /* then the high int */ + sourlo=UBTOUI(d128->bytes ); /* directly load the low int */ + sourml=UBTOUI(d128->bytes+4 ); /* then the mid-low */ + sourmh=UBTOUI(d128->bytes+8 ); /* then the mid-high */ + sourhi=UBTOUI(d128->bytes+12); /* then the high int */ } else { - sourhi=pu[0]; /* directly load the high int */ - sourmh=pu[1]; /* then the mid-high */ - sourml=pu[2]; /* then the mid-low */ - sourlo=pu[3]; /* then the low int */ + sourhi=UBTOUI(d128->bytes ); /* directly load the high int */ + sourmh=UBTOUI(d128->bytes+4 ); /* then the mid-high */ + sourml=UBTOUI(d128->bytes+8 ); /* then the mid-low */ + sourlo=UBTOUI(d128->bytes+12); /* then the low int */ } c=string; /* where result will go */ @@ -327,7 +326,7 @@ char * decimal128ToString(const decimal128 *d128, char *string){ if (exp==3) { if (msd==0) { /* infinity */ - strcpy(c, "Inf"); + strcpy(c, "Inf"); strcpy(c+3, "inity"); return string; /* easy */ } @@ -353,12 +352,12 @@ char * decimal128ToString(const decimal128 *d128, char *string){ /* length. We use fixed-length memcpys because variable-length */ /* causes a subroutine call in GCC. (These are length 4 for speed */ /* and are safe because the array has an extra terminator byte.) */ - #define dpd2char u=&BIN2CHAR[DPD2BIN[dpd]*4]; \ + #define dpd2char u=&BIN2CHAR[DPD2BIN[dpd]*4]; \ if (c!=cstart) {memcpy(c, u+1, 4); c+=3;} \ else if (*u) {memcpy(c, u+4-*u, 4); c+=*u;} dpd=(sourhi>>4)&0x3ff; /* declet 1 */ dpd2char; - dpd=((sourhi&0xf)<<6) | (sourmh>>26); /* declet 2 */ + dpd=((sourhi&0xf)<<6) | (sourmh>>26); /* declet 2 */ dpd2char; dpd=(sourmh>>16)&0x3ff; /* declet 3 */ dpd2char; @@ -381,7 +380,7 @@ char * decimal128ToString(const decimal128 *d128, char *string){ if (c==cstart) *c++='0'; /* all zeros -- make 0 */ - if (exp==0) { /* integer or NaN case -- easy */ + if (exp==0) { /* integer or NaN case -- easy */ *c='\0'; /* terminate */ return string; } @@ -409,8 +408,8 @@ char * decimal128ToString(const decimal128 *d128, char *string){ /* finally add the E-part, if needed; it will never be 0, and has */ /* a maximum length of 4 digits */ if (e!=0) { - *c++='E'; /* starts with E */ - *c++='+'; /* assume positive */ + *c++='E'; /* starts with E */ + *c++='+'; /* assume positive */ if (e<0) { *(c-1)='-'; /* oops, need '-' */ e=-e; /* uInt, please */ @@ -449,13 +448,13 @@ char * decimal128ToString(const decimal128 *d128, char *string){ /* ------------------------------------------------------------------ */ /* to-number -- conversion from numeric string */ /* */ -/* decimal128FromString(result, string, set); */ +/* decimal128FromString(result, string, set); */ /* */ /* result is the decimal128 format number which gets the result of */ /* the conversion */ /* *string is the character string which should contain a valid */ /* number (which may be a special value) */ -/* set is the context */ +/* set is the context */ /* */ /* The context is supplied to this routine is used for error handling */ /* (setting of status and traps) and for the rounding mode, only. */ @@ -464,7 +463,7 @@ char * decimal128ToString(const decimal128 *d128, char *string){ decimal128 * decimal128FromString(decimal128 *result, const char *string, decContext *set) { decContext dc; /* work */ - decNumber dn; /* .. */ + decNumber dn; /* .. */ decContextDefault(&dc, DEC_INIT_DECIMAL128); /* no traps, please */ dc.round=set->round; /* use supplied rounding */ @@ -483,8 +482,8 @@ decimal128 * decimal128FromString(decimal128 *result, const char *string, /* returns 1 if the encoding of d128 is canonical, 0 otherwise */ /* No error is possible. */ /* ------------------------------------------------------------------ */ -uint32_t decimal128IsCanonical(const decimal128 *d128) { - decNumber dn; /* work */ +uInt decimal128IsCanonical(const decimal128 *d128) { + decNumber dn; /* work */ decimal128 canon; /* .. */ decContext dc; /* .. */ decContextDefault(&dc, DEC_INIT_DECIMAL128); @@ -501,7 +500,7 @@ uint32_t decimal128IsCanonical(const decimal128 *d128) { /* No error is possible. */ /* ------------------------------------------------------------------ */ decimal128 * decimal128Canonical(decimal128 *result, const decimal128 *d128) { - decNumber dn; /* work */ + decNumber dn; /* work */ decContext dc; /* .. */ decContextDefault(&dc, DEC_INIT_DECIMAL128); decimal128ToNumber(d128, &dn); @@ -532,13 +531,13 @@ decimal128 * decimal128Canonical(decimal128 *result, const decimal128 *d128) { /* This assumes range has been checked and exponent previously 0; */ /* type of exponent must be unsigned */ #define decimal128SetExpCon(d, e) { \ - (d)->bytes[0]|=(uint8_t)((e)>>10); \ - (d)->bytes[1] =(uint8_t)(((e)&0x3fc)>>2); \ - (d)->bytes[2]|=(uint8_t)(((e)&0x03)<<6);} + (d)->bytes[0]|=(uByte)((e)>>10); \ + (d)->bytes[1] =(uByte)(((e)&0x3fc)>>2); \ + (d)->bytes[2]|=(uByte)(((e)&0x03)<<6);} /* ------------------------------------------------------------------ */ /* decimal128Show -- display a decimal128 in hexadecimal [debug aid] */ -/* d128 -- the number to show */ +/* d128 -- the number to show */ /* ------------------------------------------------------------------ */ /* Also shows sign/cob/expconfields extracted */ void decimal128Show(const decimal128 *d128) { diff --git a/libdecnumber/dpd/decimal128.h b/libdecnumber/dpd/decimal128.h index f8f5b5a8ff2..95f73f4bbf4 100644 --- a/libdecnumber/dpd/decimal128.h +++ b/libdecnumber/dpd/decimal128.h @@ -29,7 +29,7 @@ 02110-1301, USA. */ /* ------------------------------------------------------------------ */ -/* Decimal 128-bit format module header */ +/* Decimal 128-bit format module header */ /* ------------------------------------------------------------------ */ #if !defined(DECIMAL128) @@ -46,7 +46,7 @@ #define DECIMAL128_Bias 6176 /* bias for the exponent */ #define DECIMAL128_String 43 /* maximum string length, +1 */ #define DECIMAL128_EconL 12 /* exp. continuation length */ - /* highest biased exponent (Elimit-1) */ + /* highest biased exponent (Elimit-1) */ #define DECIMAL128_Ehigh (DECIMAL128_Emax+DECIMAL128_Bias-DECIMAL128_Pmax+1) /* check enough digits, if pre-defined */ @@ -71,20 +71,20 @@ /* special values [top byte excluding sign bit; last two bits are */ /* don't-care for Infinity on input, last bit don't-care for NaN] */ #if !defined(DECIMAL_NaN) - #define DECIMAL_NaN 0x7c /* 0 11111 00 NaN */ + #define DECIMAL_NaN 0x7c /* 0 11111 00 NaN */ #define DECIMAL_sNaN 0x7e /* 0 11111 10 sNaN */ - #define DECIMAL_Inf 0x78 /* 0 11110 00 Infinity */ + #define DECIMAL_Inf 0x78 /* 0 11110 00 Infinity */ #endif - #include "decimal128Local.h" +#include "decimal128Local.h" /* ---------------------------------------------------------------- */ /* Routines */ /* ---------------------------------------------------------------- */ - #include "decimal128Symbols.h" +#include "decimal128Symbols.h" - /* String conversions */ + /* String conversions */ decimal128 * decimal128FromString(decimal128 *, const char *, decContext *); char * decimal128ToString(const decimal128 *, char *); char * decimal128ToEngString(const decimal128 *, char *); @@ -94,7 +94,7 @@ decContext *); decNumber * decimal128ToNumber(const decimal128 *, decNumber *); - /* Format-dependent utilities */ + /* Format-dependent utilities */ uint32_t decimal128IsCanonical(const decimal128 *); decimal128 * decimal128Canonical(decimal128 *, const decimal128 *); diff --git a/libdecnumber/dpd/decimal32.c b/libdecnumber/dpd/decimal32.c index d8e3f597811..eefd71c2a3c 100644 --- a/libdecnumber/dpd/decimal32.c +++ b/libdecnumber/dpd/decimal32.c @@ -29,7 +29,7 @@ 02110-1301, USA. */ /* ------------------------------------------------------------------ */ -/* Decimal 32-bit format module */ +/* Decimal 32-bit format module */ /* ------------------------------------------------------------------ */ /* This module comprises the routines for decimal32 format numbers. */ /* Conversions are supplied to and from decNumber and String. */ @@ -42,8 +42,8 @@ #include <string.h> /* [for memset/memcpy] */ #include <stdio.h> /* [for printf] */ -#include "dconfig.h" /* GCC definitions */ -#define DECNUMDIGITS 7 /* make decNumbers with space for 7 */ +#include "dconfig.h" /* GCC definitions */ +#define DECNUMDIGITS 7 /* make decNumbers with space for 7 */ #include "decNumber.h" /* base number library */ #include "decNumberLocal.h" /* decNumber local types, etc. */ #include "decimal32.h" /* our primary include */ @@ -69,9 +69,9 @@ extern void decNumberShow(const decNumber *); /* .. */ /* ------------------------------------------------------------------ */ /* decimal32FromNumber -- convert decNumber to decimal32 */ /* */ -/* ds is the target decimal32 */ +/* ds is the target decimal32 */ /* dn is the source number (assumed valid) */ -/* set is the context, used only for reporting errors */ +/* set is the context, used only for reporting errors */ /* */ /* The set argument is used only for status reporting and for the */ /* rounding mode (used if the coefficient is more than DECIMAL32_Pmax */ @@ -89,8 +89,8 @@ decimal32 * decimal32FromNumber(decimal32 *d32, const decNumber *dn, Int ae; /* adjusted exponent */ decNumber dw; /* work */ decContext dc; /* .. */ - uInt *pu; /* .. */ uInt comb, exp; /* .. */ + uInt uiwork; /* for macros */ uInt targ=0; /* target 32-bit */ /* If the number has too many digits, or the exponent could be */ @@ -98,9 +98,9 @@ decimal32 * decimal32FromNumber(decimal32 *d32, const decNumber *dn, /* constraints. This could push the number to Infinity or zero, */ /* so this check and rounding must be done before generating the */ /* decimal32] */ - ae=dn->exponent+dn->digits-1; /* [0 if special] */ - if (dn->digits>DECIMAL32_Pmax /* too many digits */ - || ae>DECIMAL32_Emax /* likely overflow */ + ae=dn->exponent+dn->digits-1; /* [0 if special] */ + if (dn->digits>DECIMAL32_Pmax /* too many digits */ + || ae>DECIMAL32_Emax /* likely overflow */ || ae<DECIMAL32_Emin) { /* likely underflow */ decContextDefault(&dc, DEC_INIT_DECIMAL32); /* [no traps] */ dc.round=set->round; /* use supplied rounding */ @@ -114,7 +114,7 @@ decimal32 * decimal32FromNumber(decimal32 *d32, const decNumber *dn, if (dn->bits&DECSPECIAL) { /* a special value */ if (dn->bits&DECINF) targ=DECIMAL_Inf<<24; else { /* sNaN or qNaN */ - if ((*dn->lsu!=0 || dn->digits>1) /* non-zero coefficient */ + if ((*dn->lsu!=0 || dn->digits>1) /* non-zero coefficient */ && (dn->digits<DECIMAL32_Pmax)) { /* coefficient fits */ decDigitsToDPD(dn, &targ, 0); } @@ -140,7 +140,7 @@ decimal32 * decimal32FromNumber(decimal32 *d32, const decNumber *dn, comb=(exp>>3) & 0x18; /* msd=0, exp top 2 bits .. */ } else { /* non-zero finite number */ - uInt msd; /* work */ + uInt msd; /* work */ Int pad=0; /* coefficient pad digits */ /* the dn is known to fit, but it may need to be padded */ @@ -175,8 +175,7 @@ decimal32 * decimal32FromNumber(decimal32 *d32, const decNumber *dn, if (dn->bits&DECNEG) targ|=0x80000000; /* add sign bit */ /* now write to storage; this is endian */ - pu=(uInt *)d32->bytes; /* overlay */ - *pu=targ; /* directly store the int */ + UBFROMUI(d32->bytes, targ); /* directly store the int */ if (status!=0) decContextSetStatus(set, status); /* pass on status */ /* decimal32Show(d32); */ @@ -194,13 +193,12 @@ decNumber * decimal32ToNumber(const decimal32 *d32, decNumber *dn) { uInt exp; /* exponent top two bits */ uInt comb; /* combination field */ uInt sour; /* source 32-bit */ - const uInt *pu; /* work */ + uInt uiwork; /* for macros */ /* load source from storage; this is endian */ - pu=(const uInt *)d32->bytes; /* overlay */ - sour=*pu; /* directly load the int */ + sour=UBTOUI(d32->bytes); /* directly load the int */ - comb=(sour>>26)&0x1f; /* combination field */ + comb=(sour>>26)&0x1f; /* combination field */ decNumberZero(dn); /* clean number */ if (sour&0x80000000) dn->bits=DECNEG; /* set sign if negative */ @@ -208,7 +206,7 @@ decNumber * decimal32ToNumber(const decimal32 *d32, decNumber *dn) { msd=COMBMSD[comb]; /* decode the combination field */ exp=COMBEXP[comb]; /* .. */ - if (exp==3) { /* is a special */ + if (exp==3) { /* is a special */ if (msd==0) { dn->bits|=DECINF; return dn; /* no coefficient needed */ @@ -229,7 +227,7 @@ decNumber * decimal32ToNumber(const decimal32 *d32, decNumber *dn) { return dn; } /* msd=0 */ - if (!sour) return dn; /* easy: coefficient is 0 */ + if (!sour) return dn; /* easy: coefficient is 0 */ if (sour&0x000ffc00) /* need 2 declets? */ decDigitsFromDPD(dn, &sour, 2); /* process 2 declets */ else @@ -238,11 +236,11 @@ decNumber * decimal32ToNumber(const decimal32 *d32, decNumber *dn) { } /* decimal32ToNumber */ /* ------------------------------------------------------------------ */ -/* to-scientific-string -- conversion to numeric string */ +/* to-scientific-string -- conversion to numeric string */ /* to-engineering-string -- conversion to numeric string */ /* */ /* decimal32ToString(d32, string); */ -/* decimal32ToEngString(d32, string); */ +/* decimal32ToEngString(d32, string); */ /* */ /* d32 is the decimal32 format number to convert */ /* string is the string where the result will be laid out */ @@ -252,7 +250,7 @@ decNumber * decimal32ToNumber(const decimal32 *d32, decNumber *dn) { /* No error is possible, and no status can be set. */ /* ------------------------------------------------------------------ */ char * decimal32ToEngString(const decimal32 *d32, char *string){ - decNumber dn; /* work */ + decNumber dn; /* work */ decimal32ToNumber(d32, &dn); decNumberToEngString(&dn, string); return string; @@ -262,29 +260,28 @@ char * decimal32ToString(const decimal32 *d32, char *string){ uInt msd; /* coefficient MSD */ Int exp; /* exponent top two bits or full */ uInt comb; /* combination field */ - char *cstart; /* coefficient start */ + char *cstart; /* coefficient start */ char *c; /* output pointer in string */ - const uInt *pu; /* work */ - const uByte *u; /* .. */ + const uByte *u; /* work */ char *s, *t; /* .. (source, target) */ Int dpd; /* .. */ Int pre, e; /* .. */ + uInt uiwork; /* for macros */ uInt sour; /* source 32-bit */ /* load source from storage; this is endian */ - pu=(const uInt *)d32->bytes; /* overlay */ - sour=*pu; /* directly load the int */ + sour=UBTOUI(d32->bytes); /* directly load the int */ c=string; /* where result will go */ if (((Int)sour)<0) *c++='-'; /* handle sign */ - comb=(sour>>26)&0x1f; /* combination field */ + comb=(sour>>26)&0x1f; /* combination field */ msd=COMBMSD[comb]; /* decode the combination field */ exp=COMBEXP[comb]; /* .. */ if (exp==3) { if (msd==0) { /* infinity */ - strcpy(c, "Inf"); + strcpy(c, "Inf"); strcpy(c+3, "inity"); return string; /* easy */ } @@ -309,18 +306,18 @@ char * decimal32ToString(const decimal32 *d32, char *string){ /* length. We use fixed-length memcpys because variable-length */ /* causes a subroutine call in GCC. (These are length 4 for speed */ /* and are safe because the array has an extra terminator byte.) */ - #define dpd2char u=&BIN2CHAR[DPD2BIN[dpd]*4]; \ + #define dpd2char u=&BIN2CHAR[DPD2BIN[dpd]*4]; \ if (c!=cstart) {memcpy(c, u+1, 4); c+=3;} \ else if (*u) {memcpy(c, u+4-*u, 4); c+=*u;} - dpd=(sour>>10)&0x3ff; /* declet 1 */ + dpd=(sour>>10)&0x3ff; /* declet 1 */ dpd2char; dpd=(sour)&0x3ff; /* declet 2 */ dpd2char; if (c==cstart) *c++='0'; /* all zeros -- make 0 */ - if (exp==0) { /* integer or NaN case -- easy */ + if (exp==0) { /* integer or NaN case -- easy */ *c='\0'; /* terminate */ return string; } @@ -348,13 +345,13 @@ char * decimal32ToString(const decimal32 *d32, char *string){ /* finally add the E-part, if needed; it will never be 0, and has */ /* a maximum length of 3 digits (E-101 case) */ if (e!=0) { - *c++='E'; /* starts with E */ - *c++='+'; /* assume positive */ + *c++='E'; /* starts with E */ + *c++='+'; /* assume positive */ if (e<0) { *(c-1)='-'; /* oops, need '-' */ e=-e; /* uInt, please */ } - u=&BIN2CHAR[e*4]; /* -> length byte */ + u=&BIN2CHAR[e*4]; /* -> length byte */ memcpy(c, u+4-*u, 4); /* copy fixed 4 characters [is safe] */ c+=*u; /* bump pointer appropriately */ } @@ -384,7 +381,7 @@ char * decimal32ToString(const decimal32 *d32, char *string){ /* the conversion */ /* *string is the character string which should contain a valid */ /* number (which may be a special value) */ -/* set is the context */ +/* set is the context */ /* */ /* The context is supplied to this routine is used for error handling */ /* (setting of status and traps) and for the rounding mode, only. */ @@ -393,7 +390,7 @@ char * decimal32ToString(const decimal32 *d32, char *string){ decimal32 * decimal32FromString(decimal32 *result, const char *string, decContext *set) { decContext dc; /* work */ - decNumber dn; /* .. */ + decNumber dn; /* .. */ decContextDefault(&dc, DEC_INIT_DECIMAL32); /* no traps, please */ dc.round=set->round; /* use supplied rounding */ @@ -409,11 +406,11 @@ decimal32 * decimal32FromString(decimal32 *result, const char *string, /* ------------------------------------------------------------------ */ /* decimal32IsCanonical -- test whether encoding is canonical */ /* d32 is the source decimal32 */ -/* returns 1 if the encoding of d32 is canonical, 0 otherwise */ +/* returns 1 if the encoding of d32 is canonical, 0 otherwise */ /* No error is possible. */ /* ------------------------------------------------------------------ */ -uint32_t decimal32IsCanonical(const decimal32 *d32) { - decNumber dn; /* work */ +uInt decimal32IsCanonical(const decimal32 *d32) { + decNumber dn; /* work */ decimal32 canon; /* .. */ decContext dc; /* .. */ decContextDefault(&dc, DEC_INIT_DECIMAL32); @@ -430,7 +427,7 @@ uint32_t decimal32IsCanonical(const decimal32 *d32) { /* No error is possible. */ /* ------------------------------------------------------------------ */ decimal32 * decimal32Canonical(decimal32 *result, const decimal32 *d32) { - decNumber dn; /* work */ + decNumber dn; /* work */ decContext dc; /* .. */ decContextDefault(&dc, DEC_INIT_DECIMAL32); decimal32ToNumber(d32, &dn); @@ -460,8 +457,8 @@ decimal32 * decimal32Canonical(decimal32 *result, const decimal32 *d32) { /* This assumes range has been checked and exponent previously 0; */ /* type of exponent must be unsigned */ #define decimal32SetExpCon(d, e) { \ - (d)->bytes[0]|=(uint8_t)((e)>>4); \ - (d)->bytes[1]|=(uint8_t)(((e)&0x0F)<<4);} + (d)->bytes[0]|=(uByte)((e)>>4); \ + (d)->bytes[1]|=(uByte)(((e)&0x0F)<<4);} /* ------------------------------------------------------------------ */ /* decimal32Show -- display a decimal32 in hexadecimal [debug aid] */ diff --git a/libdecnumber/dpd/decimal32.h b/libdecnumber/dpd/decimal32.h index 0d530464172..222ba973f4c 100644 --- a/libdecnumber/dpd/decimal32.h +++ b/libdecnumber/dpd/decimal32.h @@ -35,7 +35,7 @@ #if !defined(DECIMAL32) #define DECIMAL32 #define DEC32NAME "decimal32" /* Short name */ - #define DEC32FULLNAME "Decimal 32-bit Number" /* Verbose name */ + #define DEC32FULLNAME "Decimal 32-bit Number" /* Verbose name */ #define DEC32AUTHOR "Mike Cowlishaw" /* Who to blame */ /* parameters for decimal32s */ @@ -46,7 +46,7 @@ #define DECIMAL32_Bias 101 /* bias for the exponent */ #define DECIMAL32_String 15 /* maximum string length, +1 */ #define DECIMAL32_EconL 6 /* exp. continuation length */ - /* highest biased exponent (Elimit-1) */ + /* highest biased exponent (Elimit-1) */ #define DECIMAL32_Ehigh (DECIMAL32_Emax+DECIMAL32_Bias-DECIMAL32_Pmax+1) /* check enough digits, if pre-defined */ @@ -71,18 +71,18 @@ /* special values [top byte excluding sign bit; last two bits are */ /* don't-care for Infinity on input, last bit don't-care for NaN] */ #if !defined(DECIMAL_NaN) - #define DECIMAL_NaN 0x7c /* 0 11111 00 NaN */ + #define DECIMAL_NaN 0x7c /* 0 11111 00 NaN */ #define DECIMAL_sNaN 0x7e /* 0 11111 10 sNaN */ - #define DECIMAL_Inf 0x78 /* 0 11110 00 Infinity */ + #define DECIMAL_Inf 0x78 /* 0 11110 00 Infinity */ #endif /* ---------------------------------------------------------------- */ /* Routines */ /* ---------------------------------------------------------------- */ - #include "decimal32Symbols.h" +#include "decimal32Symbols.h" - /* String conversions */ + /* String conversions */ decimal32 * decimal32FromString(decimal32 *, const char *, decContext *); char * decimal32ToString(const decimal32 *, char *); char * decimal32ToEngString(const decimal32 *, char *); @@ -92,7 +92,7 @@ decContext *); decNumber * decimal32ToNumber(const decimal32 *, decNumber *); - /* Format-dependent utilities */ + /* Format-dependent utilities */ uint32_t decimal32IsCanonical(const decimal32 *); decimal32 * decimal32Canonical(decimal32 *, const decimal32 *); diff --git a/libdecnumber/dpd/decimal64.c b/libdecnumber/dpd/decimal64.c index 474eb7cf8a0..77684d82fcc 100644 --- a/libdecnumber/dpd/decimal64.c +++ b/libdecnumber/dpd/decimal64.c @@ -29,7 +29,7 @@ 02110-1301, USA. */ /* ------------------------------------------------------------------ */ -/* Decimal 64-bit format module */ +/* Decimal 64-bit format module */ /* ------------------------------------------------------------------ */ /* This module comprises the routines for decimal64 format numbers. */ /* Conversions are supplied to and from decNumber and String. */ @@ -42,8 +42,8 @@ #include <string.h> /* [for memset/memcpy] */ #include <stdio.h> /* [for printf] */ -#include "dconfig.h" /* GCC definitions */ -#define DECNUMDIGITS 16 /* make decNumbers with space for 16 */ +#include "dconfig.h" /* GCC definitions */ +#define DECNUMDIGITS 16 /* make decNumbers with space for 16 */ #include "decNumber.h" /* base number library */ #include "decNumberLocal.h" /* decNumber local types, etc. */ #include "decimal64.h" /* our primary include */ @@ -75,9 +75,9 @@ extern void decNumberShow(const decNumber *); /* .. */ /* ------------------------------------------------------------------ */ /* decimal64FromNumber -- convert decNumber to decimal64 */ /* */ -/* ds is the target decimal64 */ +/* ds is the target decimal64 */ /* dn is the source number (assumed valid) */ -/* set is the context, used only for reporting errors */ +/* set is the context, used only for reporting errors */ /* */ /* The set argument is used only for status reporting and for the */ /* rounding mode (used if the coefficient is more than DECIMAL64_Pmax */ @@ -95,8 +95,8 @@ decimal64 * decimal64FromNumber(decimal64 *d64, const decNumber *dn, Int ae; /* adjusted exponent */ decNumber dw; /* work */ decContext dc; /* .. */ - uInt *pu; /* .. */ uInt comb, exp; /* .. */ + uInt uiwork; /* for macros */ uInt targar[2]={0, 0}; /* target 64-bit */ #define targhi targar[1] /* name the word with the sign */ #define targlo targar[0] /* and the other */ @@ -106,9 +106,9 @@ decimal64 * decimal64FromNumber(decimal64 *d64, const decNumber *dn, /* constraints. This could push the number to Infinity or zero, */ /* so this check and rounding must be done before generating the */ /* decimal64] */ - ae=dn->exponent+dn->digits-1; /* [0 if special] */ - if (dn->digits>DECIMAL64_Pmax /* too many digits */ - || ae>DECIMAL64_Emax /* likely overflow */ + ae=dn->exponent+dn->digits-1; /* [0 if special] */ + if (dn->digits>DECIMAL64_Pmax /* too many digits */ + || ae>DECIMAL64_Emax /* likely overflow */ || ae<DECIMAL64_Emin) { /* likely underflow */ decContextDefault(&dc, DEC_INIT_DECIMAL64); /* [no traps] */ dc.round=set->round; /* use supplied rounding */ @@ -122,7 +122,7 @@ decimal64 * decimal64FromNumber(decimal64 *d64, const decNumber *dn, if (dn->bits&DECSPECIAL) { /* a special value */ if (dn->bits&DECINF) targhi=DECIMAL_Inf<<24; else { /* sNaN or qNaN */ - if ((*dn->lsu!=0 || dn->digits>1) /* non-zero coefficient */ + if ((*dn->lsu!=0 || dn->digits>1) /* non-zero coefficient */ && (dn->digits<DECIMAL64_Pmax)) { /* coefficient fits */ decDigitsToDPD(dn, targar, 0); } @@ -148,7 +148,7 @@ decimal64 * decimal64FromNumber(decimal64 *d64, const decNumber *dn, comb=(exp>>5) & 0x18; /* msd=0, exp top 2 bits .. */ } else { /* non-zero finite number */ - uInt msd; /* work */ + uInt msd; /* work */ Int pad=0; /* coefficient pad digits */ /* the dn is known to fit, but it may need to be padded */ @@ -193,14 +193,15 @@ decimal64 * decimal64FromNumber(decimal64 *d64, const decNumber *dn, if (dn->bits&DECNEG) targhi|=0x80000000; /* add sign bit */ /* now write to storage; this is now always endian */ - pu=(uInt *)d64->bytes; /* overlay */ if (DECLITEND) { - pu[0]=targar[0]; /* directly store the low int */ - pu[1]=targar[1]; /* then the high int */ + /* lo int then hi */ + UBFROMUI(d64->bytes, targar[0]); + UBFROMUI(d64->bytes+4, targar[1]); } else { - pu[0]=targar[1]; /* directly store the high int */ - pu[1]=targar[0]; /* then the low int */ + /* hi int then lo */ + UBFROMUI(d64->bytes, targar[1]); + UBFROMUI(d64->bytes+4, targar[0]); } if (status!=0) decContextSetStatus(set, status); /* pass on status */ @@ -218,21 +219,20 @@ decNumber * decimal64ToNumber(const decimal64 *d64, decNumber *dn) { uInt msd; /* coefficient MSD */ uInt exp; /* exponent top two bits */ uInt comb; /* combination field */ - const uInt *pu; /* work */ - Int need; /* .. */ + Int need; /* work */ + uInt uiwork; /* for macros */ uInt sourar[2]; /* source 64-bit */ #define sourhi sourar[1] /* name the word with the sign */ #define sourlo sourar[0] /* and the lower word */ /* load source from storage; this is endian */ - pu=(const uInt *)d64->bytes; /* overlay */ if (DECLITEND) { - sourlo=pu[0]; /* directly load the low int */ - sourhi=pu[1]; /* then the high int */ + sourlo=UBTOUI(d64->bytes ); /* directly load the low int */ + sourhi=UBTOUI(d64->bytes+4); /* then the high int */ } else { - sourhi=pu[0]; /* directly load the high int */ - sourlo=pu[1]; /* then the low int */ + sourhi=UBTOUI(d64->bytes ); /* directly load the high int */ + sourlo=UBTOUI(d64->bytes+4); /* then the low int */ } comb=(sourhi>>26)&0x1f; /* combination field */ @@ -243,7 +243,7 @@ decNumber * decimal64ToNumber(const decimal64 *d64, decNumber *dn) { msd=COMBMSD[comb]; /* decode the combination field */ exp=COMBEXP[comb]; /* .. */ - if (exp==3) { /* is a special */ + if (exp==3) { /* is a special */ if (msd==0) { dn->bits|=DECINF; return dn; /* no coefficient needed */ @@ -281,11 +281,11 @@ decNumber * decimal64ToNumber(const decimal64 *d64, decNumber *dn) { /* ------------------------------------------------------------------ */ -/* to-scientific-string -- conversion to numeric string */ +/* to-scientific-string -- conversion to numeric string */ /* to-engineering-string -- conversion to numeric string */ /* */ /* decimal64ToString(d64, string); */ -/* decimal64ToEngString(d64, string); */ +/* decimal64ToEngString(d64, string); */ /* */ /* d64 is the decimal64 format number to convert */ /* string is the string where the result will be laid out */ @@ -295,7 +295,7 @@ decNumber * decimal64ToNumber(const decimal64 *d64, decNumber *dn) { /* No error is possible, and no status can be set. */ /* ------------------------------------------------------------------ */ char * decimal64ToEngString(const decimal64 *d64, char *string){ - decNumber dn; /* work */ + decNumber dn; /* work */ decimal64ToNumber(d64, &dn); decNumberToEngString(&dn, string); return string; @@ -305,27 +305,26 @@ char * decimal64ToString(const decimal64 *d64, char *string){ uInt msd; /* coefficient MSD */ Int exp; /* exponent top two bits or full */ uInt comb; /* combination field */ - char *cstart; /* coefficient start */ + char *cstart; /* coefficient start */ char *c; /* output pointer in string */ - const uInt *pu; /* work */ + const uByte *u; /* work */ char *s, *t; /* .. (source, target) */ Int dpd; /* .. */ Int pre, e; /* .. */ - const uByte *u; /* .. */ + uInt uiwork; /* for macros */ uInt sourar[2]; /* source 64-bit */ #define sourhi sourar[1] /* name the word with the sign */ #define sourlo sourar[0] /* and the lower word */ /* load source from storage; this is endian */ - pu=(const uInt *)d64->bytes; /* overlay */ if (DECLITEND) { - sourlo=pu[0]; /* directly load the low int */ - sourhi=pu[1]; /* then the high int */ + sourlo=UBTOUI(d64->bytes ); /* directly load the low int */ + sourhi=UBTOUI(d64->bytes+4); /* then the high int */ } else { - sourhi=pu[0]; /* directly load the high int */ - sourlo=pu[1]; /* then the low int */ + sourhi=UBTOUI(d64->bytes ); /* directly load the high int */ + sourlo=UBTOUI(d64->bytes+4); /* then the low int */ } c=string; /* where result will go */ @@ -337,7 +336,7 @@ char * decimal64ToString(const decimal64 *d64, char *string){ if (exp==3) { if (msd==0) { /* infinity */ - strcpy(c, "Inf"); + strcpy(c, "Inf"); strcpy(c+3, "inity"); return string; /* easy */ } @@ -362,7 +361,7 @@ char * decimal64ToString(const decimal64 *d64, char *string){ /* length. We use fixed-length memcpys because variable-length */ /* causes a subroutine call in GCC. (These are length 4 for speed */ /* and are safe because the array has an extra terminator byte.) */ - #define dpd2char u=&BIN2CHAR[DPD2BIN[dpd]*4]; \ + #define dpd2char u=&BIN2CHAR[DPD2BIN[dpd]*4]; \ if (c!=cstart) {memcpy(c, u+1, 4); c+=3;} \ else if (*u) {memcpy(c, u+4-*u, 4); c+=*u;} @@ -379,7 +378,7 @@ char * decimal64ToString(const decimal64 *d64, char *string){ if (c==cstart) *c++='0'; /* all zeros -- make 0 */ - if (exp==0) { /* integer or NaN case -- easy */ + if (exp==0) { /* integer or NaN case -- easy */ *c='\0'; /* terminate */ return string; } @@ -407,13 +406,13 @@ char * decimal64ToString(const decimal64 *d64, char *string){ /* finally add the E-part, if needed; it will never be 0, and has */ /* a maximum length of 3 digits */ if (e!=0) { - *c++='E'; /* starts with E */ - *c++='+'; /* assume positive */ + *c++='E'; /* starts with E */ + *c++='+'; /* assume positive */ if (e<0) { *(c-1)='-'; /* oops, need '-' */ e=-e; /* uInt, please */ } - u=&BIN2CHAR[e*4]; /* -> length byte */ + u=&BIN2CHAR[e*4]; /* -> length byte */ memcpy(c, u+4-*u, 4); /* copy fixed 4 characters [is safe] */ c+=*u; /* bump pointer appropriately */ } @@ -443,7 +442,7 @@ char * decimal64ToString(const decimal64 *d64, char *string){ /* the conversion */ /* *string is the character string which should contain a valid */ /* number (which may be a special value) */ -/* set is the context */ +/* set is the context */ /* */ /* The context is supplied to this routine is used for error handling */ /* (setting of status and traps) and for the rounding mode, only. */ @@ -452,7 +451,7 @@ char * decimal64ToString(const decimal64 *d64, char *string){ decimal64 * decimal64FromString(decimal64 *result, const char *string, decContext *set) { decContext dc; /* work */ - decNumber dn; /* .. */ + decNumber dn; /* .. */ decContextDefault(&dc, DEC_INIT_DECIMAL64); /* no traps, please */ dc.round=set->round; /* use supplied rounding */ @@ -469,11 +468,11 @@ decimal64 * decimal64FromString(decimal64 *result, const char *string, /* ------------------------------------------------------------------ */ /* decimal64IsCanonical -- test whether encoding is canonical */ /* d64 is the source decimal64 */ -/* returns 1 if the encoding of d64 is canonical, 0 otherwise */ +/* returns 1 if the encoding of d64 is canonical, 0 otherwise */ /* No error is possible. */ /* ------------------------------------------------------------------ */ -uint32_t decimal64IsCanonical(const decimal64 *d64) { - decNumber dn; /* work */ +uInt decimal64IsCanonical(const decimal64 *d64) { + decNumber dn; /* work */ decimal64 canon; /* .. */ decContext dc; /* .. */ decContextDefault(&dc, DEC_INIT_DECIMAL64); @@ -490,7 +489,7 @@ uint32_t decimal64IsCanonical(const decimal64 *d64) { /* No error is possible. */ /* ------------------------------------------------------------------ */ decimal64 * decimal64Canonical(decimal64 *result, const decimal64 *d64) { - decNumber dn; /* work */ + decNumber dn; /* work */ decContext dc; /* .. */ decContextDefault(&dc, DEC_INIT_DECIMAL64); decimal64ToNumber(d64, &dn); @@ -520,8 +519,8 @@ decimal64 * decimal64Canonical(decimal64 *result, const decimal64 *d64) { /* This assumes range has been checked and exponent previously 0; */ /* type of exponent must be unsigned */ #define decimal64SetExpCon(d, e) { \ - (d)->bytes[0]|=(uint8_t)((e)>>6); \ - (d)->bytes[1]|=(uint8_t)(((e)&0x3F)<<2);} + (d)->bytes[0]|=(uByte)((e)>>6); \ + (d)->bytes[1]|=(uByte)(((e)&0x3F)<<2);} /* ------------------------------------------------------------------ */ /* decimal64Show -- display a decimal64 in hexadecimal [debug aid] */ @@ -591,12 +590,12 @@ const uInt COMBMSD[32]={0, 1, 2, 3, 4, 5, 6, 7, /* ------------------------------------------------------------------ */ /* decDigitsToDPD -- pack coefficient into DPD form */ /* */ -/* dn is the source number (assumed valid, max DECMAX754 digits) */ +/* dn is the source number (assumed valid, max DECMAX754 digits) */ /* targ is 1, 2, or 4-element uInt array, which the caller must */ -/* have cleared to zeros */ +/* have cleared to zeros */ /* shift is the number of 0 digits to add on the right (normally 0) */ /* */ -/* The coefficient must be known small enough to fit. The full */ +/* The coefficient must be known small enough to fit. The full */ /* coefficient is copied, including the leading 'odd' digit. This */ /* digit is retrieved and packed into the combination field by the */ /* caller. */ @@ -625,7 +624,7 @@ void decDigitsToDPD(const decNumber *dn, uInt *targ, Int shift) { uInt dpd; /* densely packed decimal value */ uInt bin; /* binary value 0-999 */ uInt *uout=targ; /* -> current output uInt */ - uInt uoff=0; /* -> current output offset [from right] */ + uInt uoff=0; /* -> current output offset [from right] */ const Unit *inu=dn->lsu; /* -> current input unit */ Unit uar[DECMAXUNITS]; /* working copy of units, iff shifted */ #if DECDPUN!=3 /* not fast path */ @@ -636,7 +635,7 @@ void decDigitsToDPD(const decNumber *dn, uInt *targ, Int shift) { /* shift the units array to the left by pad digits and copy */ /* [this code is a special case of decShiftToMost, which could */ /* be used instead if exposed and the array were copied first] */ - const Unit *source; /* .. */ + const Unit *source; /* .. */ Unit *target, *first; /* .. */ uInt next=0; /* work */ @@ -681,12 +680,12 @@ void decDigitsToDPD(const decNumber *dn, uInt *targ, Int shift) { for(n=0; digits>0; n++) { /* each output bunch */ #if DECDPUN==3 /* fast path, 3-at-a-time */ - bin=*inu; /* 3 digits ready for convert */ + bin=*inu; /* 3 digits ready for convert */ digits-=3; /* [may go negative] */ inu++; /* may need another */ #else /* must collect digit-by-digit */ - Unit dig; /* current digit */ + Unit dig; /* current digit */ Int j; /* digit-in-declet count */ for (j=0; j<3; j++) { #if DECDPUN<=4 @@ -698,7 +697,7 @@ void decDigitsToDPD(const decNumber *dn, uInt *targ, Int shift) { in=in/10; #endif if (j==0) bin=dig; - else if (j==1) bin+=X10(dig); + else if (j==1) bin+=X10(dig); else /* j==2 */ bin+=X100(dig); digits--; if (digits==0) break; /* [also protects *inu below] */ @@ -750,12 +749,12 @@ void decDigitsFromDPD(decNumber *dn, const uInt *sour, Int declets) { Int n; /* counter */ Unit *uout=dn->lsu; /* -> current output unit */ Unit *last=uout; /* will be unit containing msd */ - const uInt *uin=sour; /* -> current input uInt */ - uInt uoff=0; /* -> current input offset [from right] */ + const uInt *uin=sour; /* -> current input uInt */ + uInt uoff=0; /* -> current input offset [from right] */ #if DECDPUN!=3 uInt bcd; /* BCD result */ - uInt nibble; /* work */ + uInt nibble; /* work */ Unit out=0; /* accumulator */ Int cut=0; /* power of ten in current unit */ #endif @@ -772,7 +771,7 @@ void decDigitsFromDPD(decNumber *dn, const uInt *sour, Int declets) { uoff-=32; dpd|=*uin<<(10-uoff); /* get waiting bits */ } - dpd&=0x3ff; /* clear uninteresting bits */ + dpd&=0x3ff; /* clear uninteresting bits */ #if DECDPUN==3 if (dpd==0) *uout=0; @@ -822,9 +821,9 @@ void decDigitsFromDPD(decNumber *dn, const uInt *sour, Int declets) { cut++; if (cut==DECDPUN) {*uout=out; if (out) {last=uout; out=0;} uout++; cut=0;} } /* n */ - if (cut!=0) { /* some more left over */ + if (cut!=0) { /* some more left over */ *uout=out; /* write out final unit */ - if (out) last=uout; /* and note if non-zero */ + if (out) last=uout; /* and note if non-zero */ } #endif @@ -834,14 +833,14 @@ void decDigitsFromDPD(decNumber *dn, const uInt *sour, Int declets) { dn->digits=(last-dn->lsu)*DECDPUN+1; /* floor of digits, plus */ /* must be at least 1 digit */ #if DECDPUN>1 - if (*last<10) return; /* common odd digit or 0 */ - dn->digits++; /* must be 2 at least */ + if (*last<10) return; /* common odd digit or 0 */ + dn->digits++; /* must be 2 at least */ #if DECDPUN>2 if (*last<100) return; /* 10-99 */ - dn->digits++; /* must be 3 at least */ + dn->digits++; /* must be 3 at least */ #if DECDPUN>3 if (*last<1000) return; /* 100-999 */ - dn->digits++; /* must be 4 at least */ + dn->digits++; /* must be 4 at least */ #if DECDPUN>4 for (pow=&DECPOWERS[4]; *last>=*pow; pow++) dn->digits++; #endif diff --git a/libdecnumber/dpd/decimal64.h b/libdecnumber/dpd/decimal64.h index 549b626536c..95ae15f2b0f 100644 --- a/libdecnumber/dpd/decimal64.h +++ b/libdecnumber/dpd/decimal64.h @@ -35,7 +35,7 @@ #if !defined(DECIMAL64) #define DECIMAL64 #define DEC64NAME "decimal64" /* Short name */ - #define DEC64FULLNAME "Decimal 64-bit Number" /* Verbose name */ + #define DEC64FULLNAME "Decimal 64-bit Number" /* Verbose name */ #define DEC64AUTHOR "Mike Cowlishaw" /* Who to blame */ @@ -47,7 +47,7 @@ #define DECIMAL64_Bias 398 /* bias for the exponent */ #define DECIMAL64_String 24 /* maximum string length, +1 */ #define DECIMAL64_EconL 8 /* exp. continuation length */ - /* highest biased exponent (Elimit-1) */ + /* highest biased exponent (Elimit-1) */ #define DECIMAL64_Ehigh (DECIMAL64_Emax+DECIMAL64_Bias-DECIMAL64_Pmax+1) /* check enough digits, if pre-defined */ @@ -73,18 +73,18 @@ /* special values [top byte excluding sign bit; last two bits are */ /* don't-care for Infinity on input, last bit don't-care for NaN] */ #if !defined(DECIMAL_NaN) - #define DECIMAL_NaN 0x7c /* 0 11111 00 NaN */ + #define DECIMAL_NaN 0x7c /* 0 11111 00 NaN */ #define DECIMAL_sNaN 0x7e /* 0 11111 10 sNaN */ - #define DECIMAL_Inf 0x78 /* 0 11110 00 Infinity */ + #define DECIMAL_Inf 0x78 /* 0 11110 00 Infinity */ #endif /* ---------------------------------------------------------------- */ /* Routines */ /* ---------------------------------------------------------------- */ - #include "decimal64Symbols.h" +#include "decimal64Symbols.h" - /* String conversions */ + /* String conversions */ decimal64 * decimal64FromString(decimal64 *, const char *, decContext *); char * decimal64ToString(const decimal64 *, char *); char * decimal64ToEngString(const decimal64 *, char *); @@ -94,7 +94,7 @@ decContext *); decNumber * decimal64ToNumber(const decimal64 *, decNumber *); - /* Format-dependent utilities */ + /* Format-dependent utilities */ uint32_t decimal64IsCanonical(const decimal64 *); decimal64 * decimal64Canonical(decimal64 *, const decimal64 *); diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index b845937b30b..d9d2b3d9834 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,10 @@ +2009-03-28 Joseph Myers <joseph@codesourcery.com> + + * config.host (arm-*-coff*, armel-*-coff*, arm-semi-aof, + armel-semi-aof, h8300-*-*, i[34567]86-*-aout*, i[34567]86-*-coff*, + m68k-*-aout*, m68k-*-coff*, pdp11-*-bsd, rs6000-ibm-aix4.[12]*, + powerpc-ibm-aix4.[12]*, sh-*-*): Remove. + 2009-02-12 Uros Bizjak <ubizjak@gmail.com> * config.host (ia64*-*-linux*): Add t-softfp to tmake_file. diff --git a/libgcc/config.host b/libgcc/config.host index 5352363fc72..ad2ca4194e6 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -1,6 +1,6 @@ # libgcc host-specific configuration file. # Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -# 2008 Free Software Foundation, Inc. +# 2008, 2009 Free Software Foundation, Inc. #This file is part of GCC. @@ -191,10 +191,6 @@ alpha*-dec-*vms*) ;; arc-*-elf*) ;; -arm-*-coff* | armel-*-coff*) - ;; -arm-semi-aof | armel-semi-aof) - ;; arm-wrs-vxworks) ;; arm*-*-freebsd*) @@ -255,8 +251,6 @@ h8300-*-rtems*) ;; h8300-*-elf*) ;; -h8300-*-*) - ;; hppa*64*-*-linux*) ;; hppa*-*-linux*) @@ -276,8 +270,6 @@ i[34567]86-*-elf*) ;; x86_64-*-elf*) ;; -i[34567]86-*-aout*) - ;; i[34567]86-*-freebsd*) ;; x86_64-*-freebsd*) @@ -292,8 +284,6 @@ i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123]) ;; i[34567]86-*-openbsd*) ;; -i[34567]86-*-coff*) - ;; i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu*) extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm" @@ -368,10 +358,6 @@ m68hc11-*-*|m6811-*-*) ;; m68hc12-*-*|m6812-*-*) ;; -m68k-*-aout*) - ;; -m68k-*-coff*) - ;; m68k-*-elf*) ;; m68k*-*-netbsdelf*) @@ -430,8 +416,6 @@ mmix-knuth-mmixware) ;; mn10300-*-*) ;; -pdp11-*-bsd) - ;; pdp11-*-*) ;; picochip-*-*) @@ -489,8 +473,6 @@ powerpcle-*-eabisim*) ;; powerpcle-*-eabi*) ;; -rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*) - ;; rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*) ;; rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*) @@ -520,8 +502,6 @@ sh-*-rtems*) ;; sh-wrs-vxworks) ;; -sh-*-*) - ;; sparc-*-netbsdelf*) ;; sparc64-*-openbsd*) diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 500280604f0..e0ec2507052 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,17 @@ +2009-03-29 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + PR fortran/33595 + * intrinsics/c99_functions.c (round): Use floor instead of ceil. + Revise checks to round up. + (roundf): Likewise. + +2009-03-28 Daniel Kraft <d@domob.eu> + + * intrinsics/string_intrinsics.c: #include <assert.h> + * intrinsics/string_intrinsics_inc.c (string_trim): Use string_len_trim + instead of calculating the length directly. + (string_len_trim): For KIND=1, speed search up. + 2009-03-24 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libfortran/39528 diff --git a/libgfortran/intrinsics/c99_functions.c b/libgfortran/intrinsics/c99_functions.c index ce96c8cb54b..66f06b323c8 100644 --- a/libgfortran/intrinsics/c99_functions.c +++ b/libgfortran/intrinsics/c99_functions.c @@ -571,16 +571,16 @@ round(double x) if (x >= 0.0) { - t = ceil(x); - if (t - x > 0.5) - t -= 1.0; + t = floor(x); + if (t - x <= -0.5) + t += 1.0; return (t); } else { - t = ceil(-x); - if (t + x > 0.5) - t -= 1.0; + t = floor(-x); + if (t + x <= -0.5) + t += 1.0; return (-t); } } @@ -600,16 +600,16 @@ roundf(float x) if (x >= 0.0) { - t = ceilf(x); - if (t - x > 0.5) - t -= 1.0; + t = floorf(x); + if (t - x <= -0.5) + t += 1.0; return (t); } else { - t = ceilf(-x); - if (t + x > 0.5) - t -= 1.0; + t = floorf(-x); + if (t + x <= -0.5) + t += 1.0; return (-t); } } diff --git a/libgfortran/intrinsics/string_intrinsics.c b/libgfortran/intrinsics/string_intrinsics.c index f6d9663f0ba..491b45e21df 100644 --- a/libgfortran/intrinsics/string_intrinsics.c +++ b/libgfortran/intrinsics/string_intrinsics.c @@ -39,6 +39,7 @@ Boston, MA 02110-1301, USA. */ #include <stdlib.h> #include <string.h> +#include <assert.h> /* Helper function to set parts of wide strings to a constant (usually diff --git a/libgfortran/intrinsics/string_intrinsics_inc.c b/libgfortran/intrinsics/string_intrinsics_inc.c index 0008db5b2fc..5497991c76b 100644 --- a/libgfortran/intrinsics/string_intrinsics_inc.c +++ b/libgfortran/intrinsics/string_intrinsics_inc.c @@ -165,15 +165,7 @@ void string_trim (gfc_charlen_type *len, CHARTYPE **dest, gfc_charlen_type slen, const CHARTYPE *src) { - gfc_charlen_type i; - - /* Determine length of result string. */ - for (i = slen - 1; i >= 0; i--) - { - if (src[i] != ' ') - break; - } - *len = i + 1; + *len = string_len_trim (slen, src); if (*len == 0) *dest = &zero_length_string; @@ -193,13 +185,57 @@ string_trim (gfc_charlen_type *len, CHARTYPE **dest, gfc_charlen_type slen, gfc_charlen_type string_len_trim (gfc_charlen_type len, const CHARTYPE *s) { + const gfc_charlen_type long_len = (gfc_charlen_type) sizeof (unsigned long); gfc_charlen_type i; - for (i = len - 1; i >= 0; i--) + i = len - 1; + + /* If we've got the standard (KIND=1) character type, we scan the string in + long word chunks to speed it up (until a long word is hit that does not + consist of ' 's). */ + if (sizeof (CHARTYPE) == 1 && i >= long_len) { - if (s[i] != ' ') - break; + int starting; + unsigned long blank_longword; + + /* Handle the first characters until we're aligned on a long word + boundary. Actually, s + i + 1 must be properly aligned, because + s + i will be the last byte of a long word read. */ + starting = ((unsigned long) (s + i + 1)) % long_len; + i -= starting; + for (; starting > 0; --starting) + if (s[i + starting] != ' ') + return i + starting + 1; + + /* Handle the others in a batch until first non-blank long word is + found. Here again, s + i is the last byte of the current chunk, + to it starts at s + i - sizeof (long) + 1. */ + +#if __SIZEOF_LONG__ == 4 + blank_longword = 0x20202020L; +#elif __SIZEOF_LONG__ == 8 + blank_longword = 0x2020202020202020L; +#else + #error Invalid size of long! +#endif + + while (i >= long_len) + { + i -= long_len; + if (*((unsigned long*) (s + i + 1)) != blank_longword) + { + i += long_len; + break; + } + } + + /* Now continue for the last characters with naive approach below. */ + assert (i >= 0); } + + /* Simply look for the first non-blank character. */ + while (i >= 0 && s[i] == ' ') + --i; return i + 1; } diff --git a/maintainer-scripts/ChangeLog b/maintainer-scripts/ChangeLog index 30856c7ff0a..8bedd24639d 100644 --- a/maintainer-scripts/ChangeLog +++ b/maintainer-scripts/ChangeLog @@ -1,3 +1,8 @@ +2009-03-28 Gerald Pfeifer <gerald@pfeifer.com> + + * crontab: Stop 4.2 snapshots. + Spread out 4.3, 4.4, and 4.5 snapshots more evenly. + 2009-03-27 Mark Mitchell <mark@codesourcery.com> * crontab: Add 4.4 branch snapshots. diff --git a/maintainer-scripts/crontab b/maintainer-scripts/crontab index 49862e7ee41..03902a2fce6 100644 --- a/maintainer-scripts/crontab +++ b/maintainer-scripts/crontab @@ -1,7 +1,6 @@ 16 0 * * * sh /home/gccadmin/scripts/update_version_svn 50 0 * * * sh /home/gccadmin/scripts/update_web_docs_svn 55 0 * * * sh /home/gccadmin/scripts/update_web_docs_libstdcxx_svn -32 22 * * 3 sh /home/gccadmin/scripts/gcc_release -s 4.2:branches/gcc-4_2-branch -l -d /sourceware/snapshot-tmp/gcc all -32 22 * * 4 sh /home/gccadmin/scripts/gcc_release -s 4.3:branches/gcc-4_3-branch -l -d /sourceware/snapshot-tmp/gcc all -32 22 * * 5 sh /home/gccadmin/scripts/gcc_release -s 4.4:branches/gcc-4_4-branch -l -d /sourceware/snapshot-tmp/gcc all -32 22 * * 6 sh /home/gccadmin/scripts/gcc_release -s 4.5:trunk -l -d /sourceware/snapshot-tmp/gcc all +32 22 * * 0 sh /home/gccadmin/scripts/gcc_release -s 4.3:branches/gcc-4_3-branch -l -d /sourceware/snapshot-tmp/gcc all +32 22 * * 2 sh /home/gccadmin/scripts/gcc_release -s 4.4:branches/gcc-4_4-branch -l -d /sourceware/snapshot-tmp/gcc all +32 22 * * 4 sh /home/gccadmin/scripts/gcc_release -s 4.5:trunk -l -d /sourceware/snapshot-tmp/gcc all |