#include <string> using namespace std; void f () { string s; s += ""; } Compiled with -O1, this will generate /.../bits/atomicity.h:40: error: inconsistent operand constraints in an `asm'
Created attachment 7290 [details] proposed patch
Fixed for 3.4.0 and 4.0.0 by: 2003-12-19 Jason Merrill <jason@redhat.com> * config/cpu/cris/atomicity.h: Remove memory clobbers. * config/cpu/mips/atomicity.h: Likewise. * config/cpu/i486/atomicity.h: Remove memory clobbers. Split up read-write memory operand. * config/cpu/m68k/atomicity.h: Likewise. * config/cpu/powerpc/atomicity.h: Make memory I/O explicit. * config/cpu/s390/atomicity.h: Likewise. * config/cpu/sparc/atomicity.h: Likewise.
I thought this looked familiar..... I think this patch looks fine (backport of 3.4.x). I can't imagine Gaby not going for this for the next 3.3.x release. -benjamin
Fixed.