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
1e5a1107
Commit
1e5a1107
authored
Mar 03, 2000
by
Jason Merrill
Committed by
Jason Merrill
Mar 03, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* calls.c (special_function_p): operator new may not be malloc-like.
From-SVN: r32308
parent
09496b7c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
gcc/ChangeLog
+2
-0
gcc/calls.c
+5
-8
No files found.
gcc/ChangeLog
View file @
1e5a1107
2000
-
03
-
03
Jason
Merrill
<
jason
@casey
.
cygnus
.
com
>
*
calls
.
c
(
special_function_p
)
:
operator
new
may
not
be
malloc
-
like
.
*
gcse
.
c
(
dump_hash_table
)
:
Really
fix
error
in
last
change
.
2000
-
03
-
02
Denis
Chertykov
<
denisc
@overta
.
ru
>
...
...
gcc/calls.c
View file @
1e5a1107
...
...
@@ -634,16 +634,13 @@ special_function_p (fndecl, returns_twice, is_longjmp, fork_or_exec,
/* Do not add any more malloc-like functions to this list,
instead mark them as malloc functions using the malloc attribute.
Note, realloc is not suitable for attribute malloc since
it may return the same address across multiple calls. */
it may return the same address across multiple calls.
C++ operator new is not suitable because it is not required
to return a unique pointer; indeed, the standard placement new
just returns its argument. */
else
if
(
!
strcmp
(
tname
,
"malloc"
)
||
!
strcmp
(
tname
,
"calloc"
)
||
!
strcmp
(
tname
,
"strdup"
)
/* Note use of NAME rather than TNAME here. These functions
are only reserved when preceded with __. */
||
!
strcmp
(
name
,
"__vn"
)
/* mangled __builtin_vec_new */
||
!
strcmp
(
name
,
"__nw"
)
/* mangled __builtin_new */
||
!
strcmp
(
name
,
"__builtin_new"
)
||
!
strcmp
(
name
,
"__builtin_vec_new"
))
||
!
strcmp
(
tname
,
"strdup"
))
*
is_malloc
=
1
;
}
}
...
...
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