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.

Reply via email to