int main() { int a = 1, b; a = 8, b = 9; return(0); }
/* I believe that the a = 8, b = 9 should result in an error but it does not. I believe that the comma cannot be used in a non-initializing context according to the C++ Standard. gcc -v shows: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info -- enable-shared --enable-threads=posix --disable-checking --disable-libunwind-exceptions --with- system-zlib --enable-__cxa_atexit --host=i386-redhat-linux Thread model: posix gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7) Thanks for your time, Shane */ -- Summary: spurious commas? Product: gcc Version: 3.3.3 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: euclidonomy at hotmail dot com CC: euclidonomy at hotmail dot com,gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18365