Subject: 24.0.50; Emacs cannot find errors reported by GCC 4.5

From: Paul Pogonyshev <[email-masked]>
Date: Wed, 1 Sep 2010 20:50:01 +0300

Save the following in 'test.cpp' file:

template <typename X>
struct foo
{
  typedef  typename X::bar  bar;
};

int
main ()
{
  foo <char>  x;
}

Now, type:

    C-u M-x compile
    gcc-4.5 test.cpp -o test

As the compilation results (with the expected errors) appear, invoke
'next-error' (with C-x `, say).  It will not be able to find the error
location and instead prompt in the minibuffer:

    Find this error in (default test.cpp:10): ~/test/

Note that using GCC 4.5 is essential, with 4.4 it works.