[Bug c++/26962] New: program which crosses initialization compiles without error when it really should not
The following c++ program compiles without error even though it crosses an initialization. I only noticed this problem on g++ 3.4.4, 3.4.5. Versions before and after 3.4 appear to be okay. int g() { return 0; } int main() { goto L1; int i=g(); L1:; } -- Summary: program which crosses initialization compiles without error when it really should not Product: gcc Version: 3.4.5 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: gary dot lazer at yahoo dot com GCC build triplet: g++ (GCC) 3.4.5 20051201 (Red Hat 3.4.5-2) GCC host triplet: Linux version 2.6.9-34.ELsmp GCC target triplet: CentOS release 4.3 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26962
[Bug c++/26962] program which crosses initialization compiles without error when it really should not
--- Comment #1 from gary dot lazer at yahoo dot com 2006-03-31 16:10 --- more info: i686, intel dual xeon 2 GHz processors, dell precision 530 g++ output: Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.5/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26962