diff options
author | Peter Eisentraut | 2013-11-13 03:12:08 +0000 |
---|---|---|
committer | Peter Eisentraut | 2013-11-20 02:56:54 +0000 |
commit | b21de4e7b32f868a23bdc5507898d36cbe146164 (patch) | |
tree | 3a50b11defde12adf1f0755d8b1478825f948d1e /src/interfaces/ecpg/preproc/extern.h | |
parent | 22967d80035427f6e9e31210b7de2e45fafcbc0c (diff) |
ecpg: Split off mmfatal() from mmerror()
This allows decorating mmfatal() with noreturn compiler hints, leading
to better diagnostics.
Diffstat (limited to 'src/interfaces/ecpg/preproc/extern.h')
-rw-r--r-- | src/interfaces/ecpg/preproc/extern.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/interfaces/ecpg/preproc/extern.h b/src/interfaces/ecpg/preproc/extern.h index ccf5548f577..3bbb6a44737 100644 --- a/src/interfaces/ecpg/preproc/extern.h +++ b/src/interfaces/ecpg/preproc/extern.h @@ -73,10 +73,8 @@ extern int base_yylex(void); extern void base_yyerror(const char *); extern void *mm_alloc(size_t), *mm_realloc(void *, size_t); extern char *mm_strdup(const char *); -extern void -mmerror(int, enum errortype, const char *,...) -/* This extension allows gcc to check the format string */ -__attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 4))); +extern void mmerror(int errorcode, enum errortype type, const char *error, ...) __attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 4))); +extern void mmfatal(int errorcode, const char *error, ...) __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3),noreturn)); extern void output_get_descr_header(char *); extern void output_get_descr(char *, char *); extern void output_set_descr_header(char *); |