This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11703] New: Problem with using enum in placement delete


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]