* mangle.c (mangle_decl): Fix mangled name change warning.
From-SVN: r238964
This commit is contained in:
parent
92d58deefa
commit
352b8babea
@ -1,5 +1,7 @@
|
||||
2016-08-01 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* mangle.c (mangle_decl): Fix mangled name change warning.
|
||||
|
||||
PR c++/72766
|
||||
* constexpr.c (cxx_eval_pointer_plus_expression): Check constancy
|
||||
of nelts.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Name mangling for the 3.0 C++ ABI.
|
||||
/* Name mangling for the 3.0 -*- C++ -*- ABI.
|
||||
Copyright (C) 2000-2016 Free Software Foundation, Inc.
|
||||
Written by Alex Samuel <samuel@codesourcery.com>
|
||||
|
||||
@ -3732,6 +3732,7 @@ mangle_decl (const tree decl)
|
||||
id2 = mangle_decl_string (decl);
|
||||
id2 = targetm.mangle_decl_assembler_name (decl, id2);
|
||||
}
|
||||
flag_abi_version = save_ver;
|
||||
|
||||
if (id2 == id)
|
||||
/* OK. */;
|
||||
@ -3740,8 +3741,8 @@ mangle_decl (const tree decl)
|
||||
warning_at (DECL_SOURCE_LOCATION (G.entity), OPT_Wabi,
|
||||
"the mangled name of %qD changed between "
|
||||
"-fabi-version=%d (%D) and -fabi-version=%d (%D)",
|
||||
G.entity, save_ver, id2,
|
||||
warn_abi_version, id);
|
||||
G.entity, warn_abi_version, id2,
|
||||
save_ver, id);
|
||||
else
|
||||
warning_at (DECL_SOURCE_LOCATION (G.entity), OPT_Wabi,
|
||||
"the mangled name of %qD changes between "
|
||||
|
@ -12,5 +12,5 @@ template <int &> struct S { };
|
||||
|
||||
// Expect the diagnostic to reference the ABI version specified via
|
||||
// -fabi-version=3 and the ABI version specified via -Wabi=2.
|
||||
void foo (S<N>) { } // { dg-warning "the mangled name of .void foo\\(S<N>\\). changed between -fabi-version=3 \\(_Z3foo1SILZ1NEE\\) and -fabi-version=2 \\(_Z3foo1SIL_Z1NEE\\)" }
|
||||
void foo (S<N>) { } // { dg-warning "the mangled name of .void foo\\(S<N>\\). changed between -fabi-version=2 \\(_Z3foo1SILZ1NEE\\) and -fabi-version=3 \\(_Z3foo1SIL_Z1NEE\\)" }
|
||||
|
||||
|
@ -12,5 +12,5 @@ template <int &> struct S { };
|
||||
|
||||
// Expect the diagnostic to reference the ABI version specified via
|
||||
// -fabi-version=2 and the ABI version specified via -Wabi=3.
|
||||
void foo (S<N>) { } // { dg-warning "the mangled name of .void foo\\(S<N>\\). changed between -fabi-version=2 \\(_Z3foo1SIL_Z1NEE\\) and -fabi-version=3 \\(_Z3foo1SILZ1NEE\\)" }
|
||||
void foo (S<N>) { } // { dg-warning "the mangled name of .void foo\\(S<N>\\). changes between -fabi-version=2 \\(_Z3foo1SILZ1NEE\\) and -fabi-version=3 \\(_Z3foo1SIL_Z1NEE\\)" }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user