This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/18949] [4.0 Regression] C++ program no longer compiles


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-12-13 15:55 -------
I just got bitten by this bug, too.
Here's an even shorter testcase.
If I make bar a non-template function the code snippet compiles.

=====================================
struct A
{
    void foo();
};

template<int> void bar(const A& a)
{
    const_cast<A&>(a).foo();
}
=====================================


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
           Severity|normal                      |critical
           Keywords|                            |monitored
            Summary|[4.0 Regression] C++ program|[4.0 Regression] C++ program
                   |no longer compiles          |no longer compiles


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]