* c-decl.c (last_function_parm_vars, current_function_parm_vars):
New static variables.
(struct c_scope): Add parms and warned_forward_parm_decls
fields; remove parm_order.
(storedecls, storetags): Delete.
(poplevel): Also clear bindings on the parms chain.
(pushdecl): Handle forward declarations of parameters, and
chain PARM_DECLs on the parms list, not the names list.
(lookup_name_current_level): Check for PARM_DECLs on the parms
list too.
(push_parm_decl): Don't update parm_order.
(clear_parm_order): Rename mark_forward_parm_decls. Issue the
warning, only once per parameter list, and set TREE_ASM_WRITTEN
on the decls here. Then move the forward decls to the names list.
(grokparms): Set last_function_parm_vars.
(get_parm_info): Don't use gettags or getdecls. No need to
extract non-parms from the parms list, or reorganize the parms
list. Feed nonparms back in the TREE_TYPE of the list node
returned. Issue only one error per parameter list for "void"
appearing more than once in said parameter list. Collapse
parmlist_tags_warning into this function to avoid double scan
of tags list.
(start_function): Set current_function_parm_vars.
(store_parm_decls_newstyle): Bypass pushdecl, manipulate scope
directly. Get non-parms from current_function_parm_vars; no
need to extract them from the parms chain. Properly bind tags
in the new scope.
(store_parm_decls_oldstyle): No need to extract non-parameters
from the parms chain, nor to store them back afterward. Move
declaration to top of function, restructure code reordering
DECL_ARGUMENTS.
(store_parm_decls): No need to save and restore warn_shadow.
* c-parse.in: Don't call parmlist_tags_warning nor
clear_parm_order. Call mark_forward_parm_decls when forward
parm decls are encountered.
* c-tree.h: Prototype mark_forward_parm_decls; not
clear_parm_order or parmlist_tags_warning.
testsuite:
* gcc.dg/struct-in-proto-1.c: New test.
From-SVN: r69945
2003-07-29 Phil Edwards <pme@gcc.gnu.org>
* config-ml.in: Use ac_configure_args directly instead of
ml_arguments. Only set ml_norecursion if --no[-]recursion is
actually seen.
From-SVN: r69934
cp:
PR c++/9447
* decl.c (add_binding): Add bval local variable.
(push_class_level_binding): Likewise. Allow a USING_DECL to be
pushed.
* decl2.c (do_class_using_decl): The type of a using decl is
unknown.
* parser.c (cp_parser_postfix_expression): Refactor unqualified-id
function call lookup code.
* pt.c (tsubst): A USING_DECL will have unknown type.
(tsubst_copy_and_build): Allow a using decl.
(type_dependent_expression_p): A USING_DECL will make it
dependent.
* semantics.c (finish_member_declaration): Push a dependent using
declaration.
testsuite:
PR c++/9447
* g++.dg/template/using1.C: New test.
* g++.dg/template/using2.C: New test.
* g++.dg/template/using3.C: New test.
* g++.dg/template/using4.C: New test.
From-SVN: r69921
PR c++/11530
* parser.c (cp_parser_postfix_expression): Do not call mark_used.
* semantics.c (finish_id_expression): Call mark_used for all
declarations.
PR c++/11530
* g++.dg/opt/call1.C: New test.
From-SVN: r69911
PR c++/11667
* c-common.c (shorten_compare): Take into account differences
between C and C++ representation for enumeration types.
* tree.h (set_min_and_max_values_for_integral_type): Declare.
* stor-layout.c (set_min_and_max_values_for_integral_type): New
function, broken out from ...
(fixup_signed_type): ... here and ...
(fixup_unsigned_type): ... here.
PR c++/11667
* call.c (standard_conversion): Allow all integral->enumeral
conversions, after marking them as bad.
* decl.c (finish_enum): Make sure that all enumerators are
properly converted to the underlying type.
(build_enumerator): Set DECL_CONTEXT for namespace-scope
enumeration types.
* pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
(tsubst_enum): Tidy.
* Make-lang.in (typeck.o): Depend on convert.h.
(class.o): Likewise.
(rtti.o): Likewise.
* call.c: Include convert.h.
(convert_arg_to_ellipsis): Use convert_to_real.
* class.c: Include convert.h.
(build_base_path): Use convert_to_integer.
* rtti.c: Include convert.h.
(build_headof): Use convert_to_integer.
* typeck.c: Include convert.h.
(decay_conversion): Use convert_to_integer.
(build_unary_op): Use build_nop.
(get_delta_difference): Use convert_to_integer.
(build_ptrmemfunc): Avoid unncessary conversions.
From-SVN: r69909
* c-decl.c: Update commentary, adjust blank lines throughout.
(struct c_scope): Fix indentation. Reorder members so
outer-context pointers come first, booleans last.
(duplicate_decls, define_label): Use a 'locus' variable for
diagnostic locations in a few more places.
(warn_if_shadowing): Un-split a conditional that fits on one line.
(c_init_decl_processing): No need to clear current_scope and
current_function_scope.
(start_decl): Merge if/else if statements with same action.
(push_parm_decl): Rename old_immediate_size_expand to use
save_foo convention; save/restore around entire function.
(grokdeclarator): Remove unnecessary braces.
From-SVN: r69903
* java/lang/natString.cc (init(gnu.gcj.runtime.StringBuffer)):
New method.
Include gnu/gcj/runtime/StringBuffer.h.
* java/lang/String.java (init(gnu.gcj.runtime.StringBuffer)): New
native method.
(String(gnu.gcj.runtime.StringBuffer)): Use it.
From-SVN: r69890
* Makefile.tpl: Use 'mkinstalldirs' rather than 'mkdir' when
creating target and build subdirs to build all parent dirs as needed.
* Makefile.in: Rebuild.
* configure.in: Don't build dirs explicitly here.
* configure: Rebuild.
From-SVN: r69871
* fixinc/fixinc.svr4: Remove dead code. Remove now-unnecessary
cleanup of junk after #else and #endif directives. Collapse repeated
clauses into for statment.
* fixinc/fixincl.sh: GNU C -> GCC. Add usage comment.
From-SVN: r69870
* c-decl.c (struct c_scope): Remove keep_if_subblocks field.
(keep_next_if_subblocks): Rename next_is_function_body.
(pushlevel): Adjust commentary. Always set ->keep on the
outermost level of a function. Don't set ->keep_if_subblocks.
(poplevel): Adjust commentary. Don't look at ->keep_if_subblocks.
(store_parm_decls): Adjust to match.
(finish_function): Adjust to match.
Call poplevel with all three arguments zero.
From-SVN: r69865
* c-decl.c (store_parm_decls_newstyle, store_parm_decls_oldstyle):
New functions split out of store_parm_decls.
Avoid unnecessary work. Use local variables consistently.
(store_parm_decls): Likewise.
(finish_function): No need to set functionbody flag on call to
poplevel.
(struct language_function): Remove scope field.
(c_push_function_context, c_pop_function_context): No need to
save and restore current_scope.
From-SVN: r69862
2003-07-27 Thomas Fitzsimmons <fitzsim@redhat.com>
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c:
Create vbox and layout for GtkPlug.
From-SVN: r69861
Michael Koch <konqueror@gmx.de>
* gnu/java/awt/EmbeddedWindow.java
(EmbeddedWindow): Extends Frame instead of Window.
(window_id): New member variable to store the native window handle.
(create): Removed.
(EmbeddedWindow): New constructor.
(addNotify): New method.
(getHandler): Likewise.
(setWindowPeer): New native method.
* gnu/java/awt/EmbeddedWindowSupport.java
(EmbeddedWindowSupport): Fixed documentation.
(createEmbeddedWindow): Return EmbeddedWindowPeer instead of
WindowPeer, give it an EmbeddedWindow instance instead of the raw
window data.
* gnu/java/awt/natEmbeddedWindow.cc
(create): Removed.
(setWindowPeer): New method.
* gnu/java/awt/peer/EmbeddedWindowPeer.java,
gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.java,
jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c:
New files
* gnu/java/awt/peer/gtk/GtkToolkit.java
(GtkToolkit): Implements EmbeddedWindowSupport.
(createEmbeddedWindow): New method.
* java/awt/Window.java
(Window): Removed.
* Makefile.am
(java_source_files): Added EmbeddedWindowPeer.java.
(gtk_awt_peer_sources): Added GtkEmbeddedWindowPeer.java.
(gtk_c_source_files): Added gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c.
* Makefile.in: Regenerated.
Co-Authored-By: Michael Koch <konqueror@gmx.de>
From-SVN: r69859