summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mi/match.c4
-rw-r--r--parse/stab.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/mi/match.c b/mi/match.c
index df335f8..6396dbb 100644
--- a/mi/match.c
+++ b/mi/match.c
@@ -565,6 +565,10 @@ static int addstruct(Node *pat, Node *val, Dtree *start, Dtree *accept, Node ***
tail = NULL;
ntail = 0;
+ if (!memb) {
+ memb = mkexpr(ty->sdecls[i]->loc, Ogap, NULL);
+ memb->expr.type = mty;
+ }
for (j = 0; j < nlast; j++) {
/* add a _ capture if we don't specify the value */
if (!memb) {
diff --git a/parse/stab.c b/parse/stab.c
index f1db002..c139e23 100644
--- a/parse/stab.c
+++ b/parse/stab.c
@@ -318,7 +318,7 @@ void updatetype(Stab *st, Node *n, Type *t)
int mergetype(Type *old, Type *new)
{
if (!new) {
- lfatal(new->loc, "double prototyping of %s", tystr(new));
+ lfatal(old->loc, "double prototyping of %s", tystr(new));
}
else if (old->vis == Visexport && new->vis != Visexport) {
if (!old->sub && new->sub) {