diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-08-10 10:02:58 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-08-10 10:02:58 +0000 |
commit | f1e49e11293fd417f83b36901bc319e0d7bd390d (patch) | |
tree | 74165d3e0ccbe55343eed00d11ba7b726a653424 /src | |
parent | 52140b22af73ac5ae4c6bbbb40217a609614e03f (diff) | |
download | mailfromd-f1e49e11293fd417f83b36901bc319e0d7bd390d.tar.gz mailfromd-f1e49e11293fd417f83b36901bc319e0d7bd390d.tar.bz2 |
* src/gram.y (on_cond): Fix coredump if target address is not
specified.
(vardecl): Signal error if an auto variable is doubly defined.
* tests/testsuite.at (EX_OK--EX_CONFIG): New defines
(MF_CHECK_TEXT): New macro
Add poll04.at and ashadow.at
* tests/ashadow.at, tests/poll04.at: New files
* doc/mailfromd.texi: Minor fixes
git-svn-id: file:///svnroot/mailfromd/trunk@1499 7a8a7f39-df28-0410-adc6-e0d955640f24
Diffstat (limited to 'src')
-rw-r--r-- | src/gram.y | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -1771,6 +1771,10 @@ on_cond : on pollstmt do branches DONE if ($2.client_addr) { head = tail = $2.client_addr; tail = $2.email; + if (!tail) { + parse_error(_("recipient address not specified in `on poll' construct")); + YYERROR; + } tail->next = NULL; head->next = tail; } else @@ -3479,6 +3483,17 @@ vardecl(const char *name, data_type_t type, storage_class_t sc, } else { switch (sc) { case storage_extern: + if (var->type != type) { + parse_error(_("Redeclaring `%s' as different " + "data type"), + name); + parse_error_locus(&var->locus, + _("This is the location of the " + "previous definition")); + return NULL; + } + break; + case storage_auto: if (var->type != type) { parse_error(_("Redeclaring `%s' as different " @@ -3488,6 +3503,9 @@ vardecl(const char *name, data_type_t type, storage_class_t sc, _("This is the location of the " "previous definition")); return NULL; + } else { + parse_error(_("Duplicate variable: %s"), name); + return NULL; } break; |