[Bug c++/42673] New: GLIBCXX_DEBUG off-by-one error for std::string operator[]

2010-01-09 Thread gccbug at oxyware dot com
#include 

int main()
{
std::string s = "foo";
s[3];   // doesn't throw and should
}

when compiled with g++ -D_GLIBCXX_DEBUG doesn't throw but should.  It does
throw with s[4] and s[-1], however.

test$ g++ -D_GLIBCXX_DEBUG gccbug.cpp && ./a.out

test$ g++ -v
Using built-in specs.
Target: i586-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-ppl --with-cloog --with-tune=generic --with-arch=i586
--build=i586-redhat-linux
Thread model: posix
gcc version 4.4.1 20090725 (Red Hat 4.4.1-2) (GCC) test

$ uname -a
Linux maisy.oxyware.net 2.6.30.10-105.fc11.i686.PAE #1 SMP Thu Dec 24 16:41:17
UTC 2009 i686 i686 i386 GNU/Linux

Fedora Core 11, 32-bit Intel x86, using distro rpm

test$ rpm -q gcc
gcc-4.4.1-2.fc11.i586


-- 
   Summary: GLIBCXX_DEBUG off-by-one error for std::string
operator[]
   Product: gcc
   Version: 4.4.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
    ReportedBy: gccbug at oxyware dot com


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



[Bug c/43893] Error: Invalid controlling predicate with -fopenmp

2010-06-07 Thread gccbug at oxyware dot com


--- Comment #9 from gccbug at oxyware dot com  2010-06-07 12:12 ---
The patch doesn't seem to handle != as a terminating condition:

#pragma omp parallel for
for (int i = 0; i != 1000; i++) {}

doesn't compile on 4.4.1, whereas i<1000 does.


-- 


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