[Bug c++/19092] g++ accepts code that violates 14.6.4.2

redi at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Jul 7 00:25:00 GMT 2005


------- Additional Comments From redi at gcc dot gnu dot org  2005-07-07 00:25 -------
Keywords should include "wrong-code", this program should return 0:

static int f(int i)
{
    return 1;
}

int f(long l)
{
    return 0;
}

template <typename T>
    int g(T t)
    {
       return f(t);
    }

int main()
{
   return g(0);
}


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |redi at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list