OLD | NEW |
1 /* Call-backs for C++ error reporting. | 1 /* Call-backs for C++ error reporting. |
2 This code is non-reentrant. | 2 This code is non-reentrant. |
3 Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, | 3 Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, |
4 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 | 4 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 |
5 Free Software Foundation, Inc. | 5 Free Software Foundation, Inc. |
6 This file is part of GCC. | 6 This file is part of GCC. |
7 | 7 |
8 GCC is free software; you can redistribute it and/or modify | 8 GCC is free software; you can redistribute it and/or modify |
9 it under the terms of the GNU General Public License as published by | 9 it under the terms of the GNU General Public License as published by |
10 the Free Software Foundation; either version 3, or (at your option) | 10 the Free Software Foundation; either version 3, or (at your option) |
(...skipping 1521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1532 pp_cxx_right_paren (cxx_pp); | 1532 pp_cxx_right_paren (cxx_pp); |
1533 } | 1533 } |
1534 } | 1534 } |
1535 | 1535 |
1536 /* Handle the function name for a FUNCTION_DECL node, grokking operators | 1536 /* Handle the function name for a FUNCTION_DECL node, grokking operators |
1537 and destructors properly. */ | 1537 and destructors properly. */ |
1538 | 1538 |
1539 static void | 1539 static void |
1540 dump_function_name (tree t, int flags) | 1540 dump_function_name (tree t, int flags) |
1541 { | 1541 { |
1542 tree name = DECL_NAME (t); | 1542 tree name; |
| 1543 |
| 1544 /* For function versions, use the assembler name as the decl name is |
| 1545 the same for all versions. */ |
| 1546 if (DECL_FUNCTION_VERSIONED (t)) |
| 1547 name = DECL_ASSEMBLER_NAME (t); |
| 1548 else |
| 1549 name = DECL_NAME (t); |
1543 | 1550 |
1544 /* We can get here with a decl that was synthesized by language- | 1551 /* We can get here with a decl that was synthesized by language- |
1545 independent machinery (e.g. coverage.c) in which case it won't | 1552 independent machinery (e.g. coverage.c) in which case it won't |
1546 have a lang_specific structure attached and DECL_CONSTRUCTOR_P | 1553 have a lang_specific structure attached and DECL_CONSTRUCTOR_P |
1547 will crash. In this case it is safe just to print out the | 1554 will crash. In this case it is safe just to print out the |
1548 literal name. */ | 1555 literal name. */ |
1549 if (!DECL_LANG_SPECIFIC (t)) | 1556 if (!DECL_LANG_SPECIFIC (t)) |
1550 { | 1557 { |
1551 pp_cxx_tree_identifier (cxx_pp, name); | 1558 pp_cxx_tree_identifier (cxx_pp, name); |
1552 return; | 1559 return; |
(...skipping 1881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3434 { | 3441 { |
3435 error_at (location, "%qD is not a member of %qD", name, scope); | 3442 error_at (location, "%qD is not a member of %qD", name, scope); |
3436 suggest_alternatives_for (location, name); | 3443 suggest_alternatives_for (location, name); |
3437 } | 3444 } |
3438 else | 3445 else |
3439 { | 3446 { |
3440 error_at (location, "%<::%D%> has not been declared", name); | 3447 error_at (location, "%<::%D%> has not been declared", name); |
3441 suggest_alternatives_for (location, name); | 3448 suggest_alternatives_for (location, name); |
3442 } | 3449 } |
3443 } | 3450 } |
OLD | NEW |