[Bug c++/79300] Wrong diagnostics position
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Feb 13 11:01:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79300
--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
I've got one similar:
$ cat tc.cpp
#define MOZALLOC_THROW_BAD_ALLOC_IF_HAS_EXCEPTIONS throw(std::bad_alloc)
MOZALLOC_THROW_BAD_ALLOC_IF_HAS_EXCEPTIONS
$ g++ tc.cpp
tc.cpp:1:52: error: expected unqualified-id before ‘throw’
#define MOZALLOC_THROW_BAD_ALLOC_IF_HAS_EXCEPTIONS throw(std::bad_alloc)
^
tc.cpp:2:1: note: in expansion of macro
‘MOZALLOC_THROW_BAD_ALLOC_IF_HAS_EXCEPTIONS’
MOZALLOC_THROW_BAD_ALLOC_IF_HAS_EXCEPTIONS
^
With your patch for the PR, I see:
./xg++ -B. /tmp/tc.cpp
/tmp/tc.cpp:1:52: error: expected unqualified-id before ‘throw’
#define MOZALLOC_THROW_BAD_ALLOC_IF_HAS_EXCEPTIONS throw(std::bad_alloc)
^~~~~
/tmp/tc.cpp:2:1: note: in expansion of macro
‘MOZALLOC_THROW_BAD_ALLOC_IF_HAS_EXCEPTIONS’
MOZALLOC_THROW_BAD_ALLOC_IF_HAS_EXCEPTIONS
^
and I'm wondering whether 'MOZALLOC_THROW_BAD_ALLOC_IF_HAS_EXCEPTIONS' should
be completely underlined or not? Thanks.
More information about the Gcc-bugs
mailing list