This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug inline-asm/34830] rejects "i"(const_var) without -O1
- From: "stsp at users dot sourceforge dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jan 2008 08:35:31 -0000
- Subject: [Bug inline-asm/34830] rejects "i"(const_var) without -O1
- References: <bug-34830-11104@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from stsp at users dot sourceforge dot net 2008-01-19 08:35 -------
Yes, but the point was that the same
code should not compile/reject depending
only on an optimizer options.
If this code is invalid, then with -O2 it
should give the error as well, or at least
a warning.
The optimizer can not silently turn the wrong
code into the right code and vice versa.
Also, g++ compiles it even without an optimization.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34830