projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
56e82a2
)
If a K&R function definition has a variadic prototype earlier, then make the function...
author
Christoph Mallon
<christoph.mallon@gmx.de>
Wed, 3 Jun 2009 10:19:58 +0000
(10:19 +0000)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Wed, 3 Jun 2009 10:19:58 +0000
(10:19 +0000)
[r26095]
parser.c
patch
|
blob
|
history
diff --git
a/parser.c
b/parser.c
index
008d118
..
d05ec2a
100644
(file)
--- a/
parser.c
+++ b/
parser.c
@@
-4811,6
+4811,10
@@
decl_list_end:
if (proto_type != NULL) {
type_t *proto_type_type = proto_type->declaration.type;
proto_parameter = proto_type_type->function.parameters;
if (proto_type != NULL) {
type_t *proto_type_type = proto_type->declaration.type;
proto_parameter = proto_type_type->function.parameters;
+ /* If a K&R function definition has a variadic prototype earlier, then
+ * make the function definition variadic, too. This should conform to
+ * §6.7.5.3:15 and §6.9.1:8. */
+ new_type->function.variadic = proto_type_type->function.variadic;
} else {
/* §6.9.1.7: A K&R style parameter list does NOT act as a function
* prototype */
} else {
/* §6.9.1.7: A K&R style parameter list does NOT act as a function
* prototype */