aboutsummaryrefslogtreecommitdiff
path: root/gcc/extend.texi
AgeCommit message (Collapse)AuthorFilesLines
2001-03-23[multiple changes]Bryce McKinlay1-0/+8
2001-03-23 Bryce McKinlay <bryce@albatross.co.nz> * extend.texi: Document the "java_interface" attribute. java/: 2001-03-21 Bryce McKinlay <bryce@albatross.co.nz> * gjavah.c (process_file): Mark interface definitions with "__attribute__ ((java_interface))". cp/: 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz> Add support for Java interface method calls. * cp-tree.h (struct lang_type): Add java_interface flag. (TYPE_JAVA_INTERFACE): New macro. * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute by setting TYPE_JAVA_INTERFACE. * call.c (java_iface_lookup_fn): New static. (build_over_call): If calling a method declared in a TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the expression which resolves the function address. (build_java_interface_fn_ref): New function. From-SVN: r40769
2001-02-22* extend.texi (C++ Attributes): Fix typo.Andreas Jaeger1-1/+1
From-SVN: r39982
2001-02-12extend.texi (Deprecated): Deprecate new initializer lists.Nathan Sidwell1-0/+3
.: * extend.texi (Deprecated): Deprecate new initializer lists. cp: * errfn.c (cp_deprecated): Tweak diagnostic text. * parse.y (new_initializer): Deprecate initializer lists extension. testsuite: * g++.old-deja/g++.robertl/eb63.C: Remove new initializer list case. * g++.old-deja/g++.ext/arrnew.C: Deprecate. From-SVN: r39603
2001-02-05extend.texi (Extended Asm): Do not say that semicolon is always a valid ↵Hans-Peter Nilsson1-6/+9
line-breaking character for GNU... * extend.texi (Extended Asm): Do not say that semicolon is always a valid line-breaking character for GNU assemblers. Use newline-tab as the most commonly supported syntax. Use newline-tab rather than semicolon in multi-insn examples. From-SVN: r39471
2001-01-27* extend.texi (Attribute Syntax): New section.Joseph Myers1-0/+186
From-SVN: r39305
2001-01-13* extend.texi: Update for CPP.Neil Booth1-41/+77
From-SVN: r38986
2001-01-13c-typeck.c (store_init_value): Don't require constant initializer elements ↵Jakub Jelinek1-0/+10
with -pedantic -std=c99. * c-typeck.c (store_init_value): Don't require constant initializer elements with -pedantic -std=c99. (digest_init): Change error about non-constant initializer elements into pedwarn. (constructor_range_end): Remove. (constructor_incremental, designator_depth, designator_errorneous): New variables. (struct constructor_stack): Remove range_end, add incremental. (struct constructor_range_stack, constructor_range_stack): New. (struct initializer_stack): Add constructor_range_stack. (finish_init): Set it. (start_init): Likewise. require_constant_elements for non-static trees only if not flag_isoc99. (really_start_incremental_init): Remove constructor_range_end, add constructor_incremental. (pop_init_level): Likewise. (push_init_level): Likewise. If implicit and the subobject had some value set already, preinitialize the level with it. Warn about missing braces only if not pushing due to designators. (set_designator, push_range_stack): New functions. (set_init_label): Use them. (set_init_index): Likewise. Remove constructor_range_end. Error if designator index is outside of array bounds. (add_pending_init): Compare values of purpose index trees, not the trees themselves. Allow overwriting of already initialized element. Issue a warning if it had side-effects. (set_nonincremental_init, set_nonincremental_init_from_string): New functions. (pending_init_member): Rename to... (find_init_member): ...this function. Call set_nonincremental_init if necessary. Compare values of purpose index trees, not the trees themselves. Return the actual value, not just non-zero if something is found. (output_init_element): Remove checks for duplicates. If field has zero size, only check the initializer for correctness. Call set_nonincremental_init if necessary. Push RECORD/ARRAY into AVL if constructor_incremental is zero. Change error about initializers not computable at load time into pedwarn. (output_pending_init_elements): Compare bit positions, not FIELD_DECLs to take into account zero-sized fields. (process_init_element): Use constructor_range_stack to fill all ranges in the designator lists from current level up. * extend.texi: Update documentation for labeled elements. * gcc.c-torture/execute/20000801-3.x: Remove. * gcc.dg/c90-init-1.c: New test. * gcc.dg/c99-init-1.c: New test. * gcc.dg/c99-init-2.c: New test. * gcc.dg/gnu99-init-1.c: New test. From-SVN: r38968
2001-01-12cpp.texi, [...]: Consistently refer to ISO C instead of ANSI C.Joseph Myers1-18/+31
* cpp.texi, extend.texi, gcc.texi, install.texi, invoke.texi, tm.texi: Consistently refer to ISO C instead of ANSI C. Refer to -std options alongside references to -ansi. Update some documentation for C99. * cpp.1: Regenerate. From-SVN: r38956
2001-01-12extend.texi: Move C++-extension-related node from the C section into the C++ ↵Phil Edwards1-69/+67
section. 2001-01-12 Phil Edwards <pme@sources.redhat.com> * extend.texi: Move C++-extension-related node from the C section into the C++ section. From-SVN: r38950
2001-01-12extend.texi: Refer to an array of pointers to functions instead of one of ↵Joseph Myers1-2/+2
functions. * extend.texi: Refer to an array of pointers to functions instead of one of functions. From-SVN: r38948
2001-01-07builtins.def (BUILT_IN_FPRINTF): New entry.Kaveh R. Ghazi1-7/+8
* builtins.def (BUILT_IN_FPRINTF): New entry. * c-common.c (c_expand_builtin_fprintf): New function. (init_function_format_info): Handle __builtin_fprintf. (c_common_nodes_and_builtins): Declare fprintf/__builtin_fprintf. (c_expand_builtin): Handle BUILT_IN_FPRINTF. * c-decl.c (duplicate_decls): Adjust comment. * extend.texi (fprintf): Document new builtin. testsuite: * gcc.c-torture/execute/stdio-opt-3.c: New test. From-SVN: r38788
2001-01-07c-common.c (c_common_nodes_and_builtins): Add _Exit builtin.Joseph Myers1-4/+6
* c-common.c (c_common_nodes_and_builtins): Add _Exit builtin. * extend.texi: Document _Exit builtin. testsuite: * gcc.c-torture/execute/builtin-noret-1.c: New test. From-SVN: r38771
2001-01-05builtins.def (BUILT_IN_CONJ, [...]): Define.Joseph Myers1-3/+13
* builtins.def (BUILT_IN_CONJ, BUILT_IN_CREAL, BUILT_IN_CIMAG): Define. * builtins.c (expand_builtin): Abort on BUILT_IN_CONJ, BUILT_IN_CREAL and BUILT_IN_CIMAG. * c-common.c (c_common_nodes_and_builtins): Create builtin conjf, conj, conjl, crealf, creal, creall, cimagf, cimag and cimagl. (expand_tree_builtin): Handle BUILT_IN_CONJ, BUILT_IN_CREAL and BUILT_IN_CIMAG. * extend.texi: Document these builtins. testsuite: * gcc.c-torture/execute/builtin-complex-1.c: New test. From-SVN: r38716
2001-01-04c-decl.c (finish_struct): Detect flexible array members used in an ↵Richard Henderson1-13/+40
inappropriate context. * c-decl.c (finish_struct): Detect flexible array members used in an inappropriate context. * c-typeck.c (really_start_incremental_init): Special case constructor_max_index for zero length arrays. (pop_init_level): Allow initialization of flexible array members. Deprecate initialization of zero length arrays. Don't issue missing initializer warning for flexible array members or zero length arrays. (process_init_element): Don't dereference null DECL_SIZE. * varasm.c (array_size_for_constructor): Return a HOST_WIDE_INT. Don't abort for empty constructors. Use size_binop (output_constructor): Add commentary regarding zero length array futures. Abort if we try to initialize an array of unspecified length with a non-empty constructor in the middle of a structure. * extend.texi (Zero Length): Update and clarify documentation on static initialization. From-SVN: r38705
2001-01-03c-decl.c (grokdeclarator): Give zero-length arrays size zero.Richard Henderson1-15/+37
* c-decl.c (grokdeclarator): Give zero-length arrays size zero. Remove dead code. * c-typeck.c (push_init_level): Move checks for flexible array members and zero length arrays ... (pop_init_level): ... here. Silently discard empty initializations. Remove dead code. * varasm.c (output_constructor): Update for sizeof change to zero-length arrays. * extend.texi (Zero Length): Clarify semantics. * gcc.dg/940510-1.c: Update expected error wording. * gcc.dg/array-2.c, gcc.dg/array-3.c, gcc.dg/array-4.c: New. From-SVN: r38678
2001-01-02extend.texi (C++ Extensions): New node for C++ attributes; describe ↵Phil Edwards1-2/+54
init_priority and com_interface. 2000-12-27 Phil Edwards <pme@sources.redhat.com> * extend.texi (C++ Extensions): New node for C++ attributes; describe init_priority and com_interface. * invoke.texi: Remove -finit-priority as it now has zero effect. * install.texi: Fix xref syntax. * md.texi: Likewise. From-SVN: r38610
2000-12-28c-common.c (enum format_type): Add strfmon_format_type.Joseph Myers1-20/+33
* c-common.c (enum format_type): Add strfmon_format_type. (decl_attributes): Handle format attributes strfmon and __strfmon__. (FMT_FLAG_USE_DOLLAR, FMT_FLAG_ZERO_WIDTH_BAD, FMT_FLAG_EMPTY_PREC_OK): Define. (format_char_info): Update comment for flag_chars. (format_flag_spec): Add skip_next_char. (format_kind_info): Add left_precision_char. (printf_flag_specs, scanf_flag_specs, strftime_flag_specs, format_types): Update for these new structure members and flags. (time_char_table): Make const. (strfmon_length_specs, strfmon_flag_specs, strfmon_flag_pairs, monetary_char_table): New. (format_types): Add details of strfmon formats. (init_function_format_info): Create default attribute for strfmon. (check_format_info_main): Check the new flags. Handle skip_next_char and left precision. * toplev.c (documented_lang_options): Update description of -Wformat. * extend.texi: Document strfmon format attributes. Document attribute forms such as __printf__. Clarify format_arg attribute documentation. * invoke.texi (-Wformat): Update for strfmon formats. testsuite: * gcc.dg/format-strfmon-1.c: New test. From-SVN: r38512
2000-12-08Fix spelling typoNick Clifton1-2/+2
From-SVN: r38137
2000-12-08Add support for interrupt function attributeNick Clifton1-17/+25
From-SVN: r38134
2000-12-03builtins.c (expand_builtin_strcat, [...]): New functions.Kaveh R. Ghazi1-3/+8
* builtins.c (expand_builtin_strcat, expand_builtin_strncat, expand_builtin_strspn, expand_builtin_strcspn): New functions. (expand_builtin): Handle BUILT_IN_STRCAT, BUILT_IN_STRNCAT, BUILT_IN_STRSPN and BUILT_IN_STRCSPN. * builtins.def (BUILT_IN_STRCAT, BUILT_IN_STRNCAT, BUILT_IN_STRSPN, BUILT_IN_STRCSPN): New entries. * c-common.c (c_common_nodes_and_builtins): Declare builtin strcat, strncat, strspn and strcspn. (string_ftype_string_cstring): Renamed from `string_ftype_ptr_ptr'. * extend.texi (strcat, strcspn, strncat, strspn): Document new builtins. testsuite: * gcc.c-torture/execute/string-opt-9.c: New test. * gcc.c-torture/execute/string-opt-10.c: Likewise. * gcc.c-torture/execute/string-opt-11.c: Likewise. * gcc.c-torture/execute/string-opt-12.c: Likewise. From-SVN: r37964
2000-12-01builtins.def (BUILT_IN_IMAXABS): Add.Joseph Myers1-1/+3
* builtins.def (BUILT_IN_IMAXABS): Add. * builtins.c (expand_builtin): Also abort on BUILT_IN_IMAXABS. * c-common.c (c_common_nodes_and_builtins): Create builtin functions __builtin_imaxabs, and plain imaxabs unless flag_no_nonansi_builtin outside C99 mode. (expand_tree_builtin): Handle BUILT_IN_IMAXABS. * extend.texi: Document builtin imaxabs. From-SVN: r37932
2000-11-30* extend.texi: Update documentation for attributes.Joseph Myers1-15/+28
From-SVN: r37861
2000-11-29* extend.texi: Update documentation for default format attributes.Joseph Myers1-5/+12
From-SVN: r37844
2000-11-27* extend.texi (Nested Functions): Update URL of Usenix paper.Matthias Klose1-1/+1
From-SVN: r37807
2000-11-27builtins.c (expand_builtin_strncmp, [...]): New functions.Kaveh R. Ghazi1-4/+7
* builtins.c (expand_builtin_strncmp, expand_builtin_strncpy): New functions. (expand_builtin): Handle BUILT_IN_STRNCPY and BUILT_IN_STRNCMP. * builtins.def (BUILT_IN_STRNCPY, BUILT_IN_STRNCMP): New entries. * c-common.c (c_common_nodes_and_builtins): Declare builtin strncpy and strncmp. * extend.texi (strncmp, strncpy): Document new builtins. testsuite: * gcc.c-torture/execute/string-opt-7.c: New test. * gcc.c-torture/execute/string-opt-8.c: Likewise. From-SVN: r37777
2000-11-19c-decl.c (grokdeclarator): Support flexible array members.Richard Henderson1-4/+17
* c-decl.c (grokdeclarator): Support flexible array members. Use open-ended ranges for these and zero-length arrays. * c-typeck.c (push_init_level): Validate the context of initialization of a zero-length array. * tree.c (int_fits_type_p): Be prepared for missing bounds. * varasm.c (array_size_for_constructor): New. (output_constructor): Use it for arrays of unspecified length. * extend.texi (Zero Length): Mention C99 flexible array members. Document initialization in a top-level struct as valid. From-SVN: r37576
2000-11-13c-parse.in (initelt): Give appropriate pedantic warnings...Joseph Myers1-12/+28
* c-parse.in (initelt): Give appropriate pedantic warnings, depending on flag_isoc99, for non-ISO syntax and for C99 syntax outside C99 mode. (designator): If pedantic, pedwarn for a designator specifying a range of elements. * c-typeck.c (set_init_index, set_init_label): Don't pedwarn for these cases. * extend.texi: Document the C99 syntax as the preferred syntax, and the pre-2.5 syntax as obsolete. Mention use of designator lists for nested subobjects. From-SVN: r37421
2000-11-13builtins.c (expand_builtin): Handle BUILT_IN_INDEX and BUILT_IN_RINDEX.Kaveh R. Ghazi1-3/+6
* builtins.c (expand_builtin): Handle BUILT_IN_INDEX and BUILT_IN_RINDEX. Add missing checks for BUILT_IN_STRCHR and BUILT_IN_STRRCHR. * builtins.def (BUILT_IN_INDEX, BUILT_IN_RINDEX): New entries. * c-common.c (c_common_nodes_and_builtins): Declare index and rindex when nonansi builtins are allowed. * extend.texi (index, rindex): Document new builtins. testsuite: * gcc.c-torture/execute/string-opt-3.c: Also test builtin rindex. * gcc.c-torture/execute/string-opt-4.c: Also test builtin index. From-SVN: r37416
2000-11-09c-tree.texi: Fix typos.Jan van Male1-2/+2
2000-11-08 Jan van Male <jan.vanmale@fenk.wau.nl> * c-tree.texi: Fix typos. * extend.texi: Likewise * gcov.texi: Likewise * rtl.texi: Likewise * tm.texi: Likewise From-SVN: r37362
2000-11-10extend.texi, [...]: Move documentation of builtin versions of C library ↵Joseph Myers1-9/+82
functions to one place and... * extend.texi, invoke.texi: Move documentation of builtin versions of C library functions to one place and update. From-SVN: r37355
2000-10-04Patched code to generate warning when trying to perform staticWill Cohen1-0/+4
initialization of zero-length arrays. From-SVN: r36714
2000-09-27extend.texi, [...]: Consistently use @uref for formatting URLs.Joseph Myers1-1/+1
* extend.texi, invoke.texi, gcc.texi, install.texi: Consistently use @uref for formatting URLs. From-SVN: r36653
2000-09-06extend.texi: Mark named return value extension as deprecated.Mark Mitchell1-115/+3
* extend.texi: Mark named return value extension as deprecated. * NEWS: Mention that the named return value extension has been deprecated. * cp-tree.h (original_result_rtx): Define. (TREE_REFERENCE_EXPR): Remove. (DECL_VPARENT): Likewise. (pushdecl_nonclass_level): Likewise. (store_return_init): Likewise. (reinit_lang_specific): Likewise. (genrtl_named_return_value): Change prototype. * decl.c (original_result_rtx): Remove. (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs. Do not generate RTL for local variables here. (store_return_init): Remove. * semantics.c (genrtl_named_return_value): Simplify. Fold in store_return_init. (finish_named_return_value): Adjust accordingly. Warn that this extension is deprecated. (lang_expand_stmt): Adjust call to genrtl_named_return_value. From-SVN: r36210
2000-08-11* extend.texi (Volatiles): Fix typos.Nathan Sidwell1-2/+2
From-SVN: r35632
2000-08-04Minor tweaksMark Mitchell1-14/+4
From-SVN: r35493
2000-08-03* extend.texi: Fix typo in last change.Mark Mitchell1-1/+1
From-SVN: r35466
2000-08-03ChangeLogMark Mitchell1-0/+43
From-SVN: r35463
2000-07-28install.texi (--enable-nls): Change the description of the NLS related ↵Philipp Thomas1-1/+1
configure options to match the... 2000-07-28 Philipp Thomas <pthomas@suse.de> * install.texi (--enable-nls): Change the description of the NLS related configure options to match the current state. (--with-included-gettext): Likewise. (--enable-maintainer-mode): New description added. * extend.texi (-fstrict-prototype): Add missing '.'. From-SVN: r35317
2000-07-25invoke.texi (strict-prototypes): Remove.Nathan Sidwell1-0/+38
* invoke.texi (strict-prototypes): Remove. * extend.texi (Deprecated Features): Add strict-prototypes. (Backwards Compatibility): New node. From-SVN: r35253
2000-07-18extend.texi (Extended Asm): Mention that a memory clobber does not count as ↵Geoff Keating1-1/+4
a side-effect. * extend.texi (Extended Asm): Mention that a memory clobber does not count as a side-effect. From-SVN: r35110
2000-07-17contrib.texi, [...]: Update references to C9X.Joseph Myers1-3/+3
* contrib.texi, cpp.texi, extend.texi, invoke.texi: Update references to C9X. Change references to -fstd and -flang-isoc9x to refer to -std. From-SVN: r35087
2000-07-11gcc.texi: Fix minor typosRodney Brown1-5/+5
* gcc.texi: Fix minor typos * extend.texi: Fix minor typos From-SVN: r34980
2000-05-30update explicit instantiation docsJason Merrill1-2/+6
From-SVN: r34264
2000-05-05extend.texi (Extended Asm): Document inability to give asm statements access ↵Geoff Berry1-0/+4
to condition codes. * extend.texi (Extended Asm): Document inability to give asm statements access to condition codes. From-SVN: r33709
2000-04-26extend.texi (Function Attributes): Fix description of pure attribute.Andreas Jaeger1-1/+1
2000-04-26 Andreas Jaeger <aj@suse.de> * extend.texi (Function Attributes): Fix description of pure attribute. From-SVN: r33445
2000-04-18Fix typo.Richard Henderson1-1/+1
From-SVN: r33229
2000-04-17builtins.c (expand_builtin_expect): New.Richard Henderson1-0/+35
* builtins.c (expand_builtin_expect): New. (expand_builtin): Call it. * builtins.def (BUILT_IN_EXPECT): New. * c-common.c (c_common_nodes_and_builtins): Declare __builtin_expect. * extend.texi: Document it. * predict.c (expected_value_to_br_prob): New. (find_expected_value): New. * basic-block.h (expected_value_to_br_prob): Declare. * toplev.c (rest_of_compilation): Invoke it. * rtl.h (NOTE_EXPECTED_VALUE): New. (NOTE_INSN_EXPECTED_VALUE): New. * rtl.c (note_insn_name): Update. * print-rtl.c (print_rtx): Reorg NOTE_LINE_NUMBER special cases; handle NOTE_INSN_EXPECTED_VALUE. From-SVN: r33211
2000-04-13alias.c (nonlocal_reference_p): Take a care for CALL_INSNS's fusage field.Jan Hubicka1-12/+28
* alias.c (nonlocal_reference_p): Take a care for CALL_INSNS's fusage field. * calls.c (ECF_PURE): New flag. (emit_call_1): Handle ECF_PURE calls. (initialize_argument_information): Unset ECF_PURE flag too. (precompute_arguments): Precompute for ECF_PURE too. (expand_call): Handle ECF_PURE calls too. (emit_library_call_value_1): Rename no_queue argument to fn_type, accept value of 2 as pure function. (emit_library_call_value, emit_library_call): Rename no_queue argument to fn_type. * optabs.c (prepare_cmp_insn): Pass fn_type 2 to memcmp call. * tree.h (DECL_IS_PURE): New macro. (struct tree_decl): Add pure_flag. * c-common.c (enum attrs): Add attribute "pure". (init_attributes): Initialize attribute "pure" (decl_attributes): Handle attribute "pure". * extend.texi (Attribute "pure"): Document. * calls.c (expand_call): Add (mem:BLK (scratch)) to "equal from" in pure function. (flags_from_decl_or_type): Support attribute "pure". From-SVN: r33138
2000-04-11extend.texi: ISO C99 is not a draft anymore.Martin v. Löwis1-1/+1
* extend.texi: ISO C99 is not a draft anymore. * invoke.texi: ISO C++ is not a draft anymore. * cpp.texi: __cplusplus is required by the ISO standard. From-SVN: r33073
2000-04-11Add missing table start back in.Martin v. Löwis1-0/+1
From-SVN: r33072