projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed3eea7
)
(build_c_cast): Bypass default_conversion when casting to void.
author
Richard Stallman
<rms@gnu.org>
Fri, 5 Feb 1993 23:00:46 +0000
(23:00 +0000)
committer
Richard Stallman
<rms@gnu.org>
Fri, 5 Feb 1993 23:00:46 +0000
(23:00 +0000)
From-SVN: r3423
gcc/c-typeck.c
patch
|
blob
|
history
diff --git
a/gcc/c-typeck.c
b/gcc/c-typeck.c
index 3cb6959e8764641c5e7897cf58679bb7afea7af3..7bbad1443bd3ad100151ae91489f370911b3d446 100644
(file)
--- a/
gcc/c-typeck.c
+++ b/
gcc/c-typeck.c
@@
-3756,6
+3756,12
@@
build_c_cast (type, expr)
else
{
tree otype;
+
+ /* If casting to void, avoid the error that would come
+ from default_conversion in the case of a non-lvalue array. */
+ if (type == void_type_node)
+ return build1 (CONVERT_EXPR, type, value);
+
/* Convert functions and arrays to pointers,
but don't convert any other types. */
if (TREE_CODE (TREE_TYPE (value)) == FUNCTION_TYPE