Opened 10 years ago

Closed 10 years ago

#7306 closed Bugs (fixed)

Regression from Changeset 80234: preprocessor undefined behaviour in type_traits

Reported by: Hubert Tong <hstong@…> Owned by: John Maddock
Milestone: To Be Determined Component: type_traits
Version: Boost Development Trunk Severity: Regression
Keywords: Cc:

Description

process_jam_log refuses to build for the AIX runner. The build appears to be choking on undefined behaviour introduced in the subject changeset.

   306      BOOST_STATIC_CONSTANT(bool, value =
   307  #ifndef BOOST_NO_RVALUE_REFERENCES
   308          sizeof( _m_check(static_cast<rvalue_type>(_m_from)) ) == sizeof(::boost::type_traits::yes_type)
   309  #else
   310          sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type)
   311  #endif
   312          );

N3290 subclause 16.3 [cpp.replace] paragraph 11 (re: invocations of a function-like macro):

...

If there are sequences of preprocessing tokens within the list of arguments that would otherwise act as preprocessing directives, the behaviour is undefined.

Change History (2)

comment:1 by Michel Morin, 10 years ago

Thanks for the report, Hubert!

John, sorry for the bad patch. Since fixing this is trivial, I'll commit a fix.

comment:2 by Michel Morin, 10 years ago

Resolution: fixed
Status: newclosed

(In [80325]) Fix preprocessor usage (and synchronize the style); fixes #7306

Note: See TracTickets for help on using tickets.