Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
6c6ed0ef
Commit
6c6ed0ef
authored
Oct 23, 2000
by
Jason Merrill
Committed by
Jason Merrill
Oct 23, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* call.c (equal_functions): Also call decls_match for extern "C" fns.
From-SVN: r37024
parent
57dd137f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
2 deletions
+28
-2
gcc/cp/ChangeLog
+9
-0
gcc/cp/call.c
+4
-2
gcc/testsuite/g++.old-deja/g++.other/externC3.C
+15
-0
No files found.
gcc/cp/ChangeLog
View file @
6c6ed0ef
2000-10-23 Jason Merrill <jason@redhat.com>
* call.c (equal_functions): Also call decls_match for extern "C" fns.
2000-10-22 Jason Merrill <jason@redhat.com>
* call.c (build_conditional_expr): Use ocp_convert to force
rvalue conversion.
2000-10-22 Mark Mitchell <mark@codesourcery.com>
* call.c (standard_conversion): Use RVALUE_CONVs for all
...
...
gcc/cp/call.c
View file @
6c6ed0ef
...
...
@@ -4931,14 +4931,16 @@ add_warning (winner, loser)
}
/* Returns true iff functions are equivalent. Equivalent functions are
not identical only if one is a function-local extern function. */
not '==' only if one is a function-local extern function or if
both are extern "C". */
static
inline
int
equal_functions
(
fn1
,
fn2
)
tree
fn1
;
tree
fn2
;
{
if
(
DECL_LOCAL_FUNCTION_P
(
fn1
)
||
DECL_LOCAL_FUNCTION_P
(
fn2
))
if
(
DECL_LOCAL_FUNCTION_P
(
fn1
)
||
DECL_LOCAL_FUNCTION_P
(
fn2
)
||
DECL_EXTERN_C_FUNCTION_P
(
fn1
))
return
decls_match
(
fn1
,
fn2
);
return
fn1
==
fn2
;
}
...
...
gcc/testsuite/g++.old-deja/g++.other/externC3.C
0 → 100644
View file @
6c6ed0ef
// Test that two extern "C" declarations of the same name in different
// namespaces are treated as declaring the same function.
namespace
foo
{
extern
"C"
int
f
();
}
extern
"C"
int
f
()
{
return
0
;
}
using
namespace
foo
;
int
main
()
{
f
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment