public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* regression that caused PR c++/9165
@ 2003-01-06 22:48 Janis Johnson
  0 siblings, 0 replies; only message in thread
From: Janis Johnson @ 2003-01-06 22:48 UTC (permalink / raw)
  To: gcc, mark

The regression reported in PR c++/9165 showed up starting
with this patch:

2002-10-11  Mark Mitchell  <mark@codesourcery.com>

	* NEWS: Document removal of "new X = ..." extension.
	* class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
	brace-enclosed initializers.
	* cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
	(initialize_local_var): Remove declaration.
	(expand_static_init): Likewise.
	* decl.c (next_initializable_field): New function.
	(reshape_init): Likewise.
	(check_initializer): Use them.  Build dynamic initializer for
	aggregates here too.
	(initialize_local_var): Simplify, and incorporate cleanup
	insertion code as well.
	(destroy_local_var): Remove.
	(cp_finish_decl): Tidy.
	(expand_static_init): Fold checks for whether or not a variable
	needs initialization into this function.  Simplify.
	* decl2.c (do_static_initialization): Simplify.
	* init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
	be done for us automatically.
	(expand_default_init): Handle brace-enclosed initializers
	correctly.
	(expand_aggr_init_1): Remove RTL-generation code.
	(build_vec_init): Remove "new X = ..." support.
	* parse.y (new_initializer): Likewise.
	* rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
	brace-enclosed initializer.
	(create_pseudo_type_info): Likewise.
	* typeck2.c (store_init_value): Don't try to handle digest_init
	being called more than once.
	(digest_init): Tidy handling of brace-enclosed initializers.

Here's the test case from the PR:

-------------------
// false "defined but not used" warnings; regression from 3.2.1
// compile with -O -Wall; should get no warnings

void do_cleanups();

class Cleanup {
  public:
        ~Cleanup() { do_cleanups();}
};

static Cleanup dummy;
-------------------

Output from the compiler:

9165.C:11: warning: `Cleanup dummy' defined but not used

I've added this information to the PR.

Janis

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-01-06 22:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-06 22:48 regression that caused PR c++/9165 Janis Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).