[Development] New BiC gotcha: adding noexcept

Thiago Macieira thiago.macieira at intel.com
Fri Dec 1 19:31:50 CET 2017


On Friday, 1 December 2017 06:41:18 PST Marc Mutz wrote:
> On 2017-12-01 15:21, Marc Mutz wrote:
> > Hi,
> > 
> > I just realised: Since C++17, noexcept is part of the mangled name.
> > That means that adding noexcept to an exported function is BiC now!
> 
> This is not correct, after all. The name mangling of functions does not
> change, since you can't overload on noexcept(true)/noexcept(false). It's
> the name of function pointer _types_ that change. That's not to say that
> there are no BiC issues lurking there (or, more probable, more SiC
> issues than what was fixed so far), but the above was false alarm. Pfew.

Right, you almost gave me a heart-attack!

The new mangling only shows up where __cpp_noexcept_function_type takes 
effect, which is on function pointers. So anything that takes a noexcept 
function pointer (including template parameters) can have different mangling.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list