public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11703] New: Problem with using enum in placement delete
@ 2003-07-29  6:03 gcc-bugzilla at gcc dot gnu dot org
  2003-07-29 12:01 ` [Bug c++/11703] [3.4 Regression] " pinskia at physics dot uc dot edu
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2003-07-29  6:03 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11703

           Summary: Problem with using enum in placement delete
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: snyder at fnal dot gov
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


g++ gives an error for the code below, which i believe to be valid:

$ g++ -c -Iinclude x.cc
x.cc: In function `void make()':
x.cc:16: error: invalid conversion from `int' to `Refcount_Type'
$

I think this problem was introduced by the patch to fix c++/11667.

Environment:
System: Linux karma 2.4.19-emp_2419p5a829i #1 Tue Sep 3 17:42:17 EST 2002 i686 i686 i386 GNU/Linux
Architecture: i686

	<machine, os, target, libraries (multiple lines)>
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc/configure --prefix=/usr/local/gcc --enable-threads=posix --enable-long-long --enable-languages=c,c++,f77

How-To-Repeat:


-----------------------
typedef unsigned int size_t;

enum Refcount_Type {
  NO_REFCOUNT,
};

struct d0_Unknown_Object
{
  void* operator new (size_t, size_t,  Refcount_Type type);
  void operator delete (void*, size_t, Refcount_Type);
  d0_Unknown_Object ();
};

void make ()
{
  new (10, NO_REFCOUNT) d0_Unknown_Object;
}
-----------------------
------- Additional Comments From snyder at fnal dot gov  2003-07-29 06:03 -------
Fix:
	<how to correct or work around the problem, if known (multiple lines)>


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-08-12 22:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-29  6:03 [Bug c++/11703] New: Problem with using enum in placement delete gcc-bugzilla at gcc dot gnu dot org
2003-07-29 12:01 ` [Bug c++/11703] [3.4 Regression] " pinskia at physics dot uc dot edu
2003-08-02  4:15 ` pinskia at physics dot uc dot edu
2003-08-04 18:55 ` snyder at fnal dot gov
2003-08-04 19:20 ` pinskia at physics dot uc dot edu
2003-08-07 18:38 ` pinskia at physics dot uc dot edu
2003-08-11 21:40 ` janis187 at us dot ibm dot com
2003-08-12 22:26 ` cvs-commit at gcc dot gnu dot org
2003-08-12 22:28 ` mmitchel at gcc dot gnu dot org

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).