[Bug c++/31729] New: Nonconforming std::map

2007-04-27 Thread leg0 at hot dot ee
erase member functions of std::map class template do not conform to standard:

std::map...::erase(iterator) and std::map...::erase(iterator, iterator)
both return void when they should return iterator (23.3.1):

bits/stl_map.h:444

  void
  erase(iterator __position)
  { _M_t.erase(__position); }

bits/stl_map.h:474

  void
  erase(iterator __first, iterator __last)
  { _M_t.erase(__first, __last); }


The standard requires signature of these functions to be:

  iterator erase(iterator);
  iterator erase(iterator, iterator);


-- 
   Summary: Nonconforming std::map
   Product: gcc
   Version: 4.1.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: leg0 at hot dot ee


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



[Bug libstdc++/31729] Nonconforming std::map

2007-04-27 Thread leg0 at hot dot ee


--- Comment #2 from leg0 at hot dot ee  2007-04-27 19:26 ---
According to the working drafts
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2009.pdf and 
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1905.pdf I am right.
But since they are drafts I may still be wrong.


-- 


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



[Bug other/29260] Calling member function of const object causes segmentation fault in compiler

2006-09-28 Thread leg0 at hot dot ee


--- Comment #2 from leg0 at hot dot ee  2006-09-28 11:38 ---
The compiler that does this is not a C nor C++ compiler. It's D compiler (gdc).


-- 

leg0 at hot dot ee changed:

   What|Removed |Added

  Component|c++ |other


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



[Bug other/29260] New: Calling member function of const object causes segmentation fault in compiler

2006-09-27 Thread leg0 at hot dot ee
When compiling code where there's call to a member function of a const object
the compiler fails with segmentation fault. The code that demonstrates the ill
behaviour:

--- main.d begins ---
class Y
{
private: int i;
public:
void f() { i = 90; }
};


void main()
{
const Y y;
y.f();
}
--- main.d ends ---

$ gdc main.d -v
Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs
Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libgphobos.spec
rename spec lib to liborig
Configured with: /gcc/gcc-3.4.4/gcc-3.4.4-1/configure --verbose --prefix=/usr
--exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib
--mandir=/usr/share/man --infodir=/usr/share/info
--enable-languages=c,ada,c++,d,f77,java,objc --enable-nls
--without-included-gettext --enable-version-specific-runtime-libs --without-x
--enable-libgcj --disable-java-awt --with-system-zlib --enable-interpreter
--disable-libgcj-debug --enable-threads=posix --enable-java-gc=boehm
--disable-win32-registry --enable-sjlj-exceptions --enable-hash-synchronization
--enable-libstdcxx-debug : (reconfigured) 
Thread model: posix
gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)
 /usr/lib/gcc/i686-pc-cygwin/3.4.4/cc1d.exe main.d -quiet -dumpbase main.d
-mtune=pentiumpro -auxbase main -version -o
/c/DOCUME~1/lego/LOCALS~1/Temp/ccS7UBD9.s
GNU D version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)
(i686-pc-cygwin)
compiled by GNU C version 3.4.4 (cygming special) (gdc 0.12, using dmd
0.125).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
main.d: In function `main':
main.d:11: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See URL:http://gcc.gnu.org/bugs.html for instructions.


-- 
   Summary: Calling member function of const object causes
segmentation fault in compiler
   Product: gcc
   Version: 3.4.4
Status: UNCONFIRMED
  Severity: blocker
  Priority: P3
 Component: other
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: leg0 at hot dot ee
 GCC build triplet: i686-pc-cygwin
  GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin


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