[Bug c++/17891] An expression accepted as lvalue by compiler but not assigned at run time

nathan at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Oct 8 11:14:00 GMT 2004


------- Additional Comments From nathan at gcc dot gnu dot org  2004-10-08 11:13 -------
The code is ill-formed, and requires a diagnostic.  

Gcc3.4 and later give the following errors

17891.ii:8: error: invalid initialization of non-const reference of type
'void*&' from a temporary of type 'void*'
17891.ii:1: error: in passing argument 1 of `void f1(void*&)'

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


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



More information about the Gcc-bugs mailing list