Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3691edf

Browse files
committed
pg_noreturn to replace pg_attribute_noreturn()
We want to support a "noreturn" decoration on more compilers besides just GCC-compatible ones, but for that we need to move the decoration in front of the function declaration instead of either behind it or wherever, which is the current style afforded by GCC-style attributes. Also rename the macro to "pg_noreturn" to be similar to the C11 standard "noreturn". pg_noreturn is now supported on all compilers that support C11 (using _Noreturn), as well as GCC-compatible ones (using __attribute__, as before), as well as MSVC (using __declspec). (When PostgreSQL requires C11, the latter two variants can be dropped.) Now, all supported compilers effectively support pg_noreturn, so the extra code for !HAVE_PG_ATTRIBUTE_NORETURN can be dropped. This also fixes a possible problem if third-party code includes stdnoreturn.h, because then the current definition of #define pg_attribute_noreturn() __attribute__((noreturn)) would cause an error. Note that the C standard does not support a noreturn attribute on function pointer types. So we have to drop these here. There are only two instances at this time, so it's not a big loss. In one case, we can make up for it by adding the pg_noreturn to a wrapper function and adding a pg_unreachable(), in the other case, the latter was already done before. Reviewed-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://www.postgresql.org/message-id/flat/pxr5b3z7jmkpenssra5zroxi7qzzp6eswuggokw64axmdixpnk@zbwxuq7gbbcw
1 parent cc5d985 commit 3691edf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+118
-118
lines changed

contrib/dblink/dblink.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,7 @@ xpstrdup(const char *in)
160160
return pstrdup(in);
161161
}
162162

163-
static void
164-
pg_attribute_noreturn()
163+
pg_noreturn static void
165164
dblink_res_internalerror(PGconn *conn, PGresult *res, const char *p2)
166165
{
167166
char *msg = pchomp(PQerrorMessage(conn));
@@ -170,8 +169,7 @@ dblink_res_internalerror(PGconn *conn, PGresult *res, const char *p2)
170169
elog(ERROR, "%s: %s", p2, msg);
171170
}
172171

173-
static void
174-
pg_attribute_noreturn()
172+
pg_noreturn static void
175173
dblink_conn_not_avail(const char *conname)
176174
{
177175
if (conname)

contrib/pgcrypto/px.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ int px_find_hmac(const char *name, PX_HMAC **res);
181181
int px_find_cipher(const char *name, PX_Cipher **res);
182182
int px_find_combo(const char *name, PX_Combo **res);
183183

184-
void px_THROW_ERROR(int err) pg_attribute_noreturn();
184+
pg_noreturn void px_THROW_ERROR(int err);
185185
const char *px_strerror(int err);
186186

187187
const char *px_resolve_alias(const PX_Alias *list, const char *name);

src/backend/access/transam/xlogrecovery.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -4778,8 +4778,7 @@ check_primary_slot_name(char **newval, void **extra, GucSource source)
47784778
* that we have odd behaviors such as unexpected GUC ordering dependencies.
47794779
*/
47804780

4781-
static void
4782-
pg_attribute_noreturn()
4781+
pg_noreturn static void
47834782
error_multiple_recovery_targets(void)
47844783
{
47854784
ereport(ERROR,

src/backend/backup/basebackup_incremental.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ static void manifest_process_wal_range(JsonManifestParseContext *context,
139139
TimeLineID tli,
140140
XLogRecPtr start_lsn,
141141
XLogRecPtr end_lsn);
142-
static void manifest_report_error(JsonManifestParseContext *context,
143-
const char *fmt,...)
144-
pg_attribute_printf(2, 3) pg_attribute_noreturn();
142+
pg_noreturn static void manifest_report_error(JsonManifestParseContext *context,
143+
const char *fmt,...)
144+
pg_attribute_printf(2, 3);
145145
static int compare_block_numbers(const void *a, const void *b);
146146

147147
/*

src/backend/postmaster/autovacuum.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ int AutovacuumLauncherPid = 0;
317317

318318
static Oid do_start_worker(void);
319319
static void ProcessAutoVacLauncherInterrupts(void);
320-
static void AutoVacLauncherShutdown(void) pg_attribute_noreturn();
320+
pg_noreturn static void AutoVacLauncherShutdown(void);
321321
static void launcher_determine_sleep(bool canlaunch, bool recursing,
322322
struct timeval *nap);
323323
static void launch_worker(TimestampTz now);

src/backend/postmaster/launch_backend.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ static pid_t internal_forkexec(const char *child_kind, int child_slot,
171171
typedef struct
172172
{
173173
const char *name;
174-
void (*main_fn) (const void *startup_data, size_t startup_data_len) pg_attribute_noreturn();
174+
void (*main_fn) (const void *startup_data, size_t startup_data_len);
175175
bool shmem_attach;
176176
} child_process_kind;
177177

src/backend/postmaster/postmaster.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ static void LogChildExit(int lev, const char *procname,
425425
static void PostmasterStateMachine(void);
426426
static void UpdatePMState(PMState newState);
427427

428-
static void ExitPostmaster(int status) pg_attribute_noreturn();
428+
pg_noreturn static void ExitPostmaster(int status);
429429
static int ServerLoop(void);
430430
static int BackendStartup(ClientSocket *client_sock);
431431
static void report_fork_failure_to_client(ClientSocket *client_sock, int errnum);

src/backend/replication/logical/tablesync.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,7 @@ static StringInfo copybuf = NULL;
139139
/*
140140
* Exit routine for synchronization worker.
141141
*/
142-
static void
143-
pg_attribute_noreturn()
142+
pg_noreturn static void
144143
finish_sync_worker(void)
145144
{
146145
/*

src/backend/replication/walsender.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ typedef void (*WalSndSendDataCallback) (void);
237237
static void WalSndLoop(WalSndSendDataCallback send_data);
238238
static void InitWalSenderSlot(void);
239239
static void WalSndKill(int code, Datum arg);
240-
static void WalSndShutdown(void) pg_attribute_noreturn();
240+
pg_noreturn static void WalSndShutdown(void);
241241
static void XLogSendPhysical(void);
242242
static void XLogSendLogical(void);
243243
static void WalSndDone(WalSndSendDataCallback send_data);

src/backend/utils/adt/ri_triggers.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,10 @@ static bool ri_PerformCheck(const RI_ConstraintInfo *riinfo,
235235
static void ri_ExtractValues(Relation rel, TupleTableSlot *slot,
236236
const RI_ConstraintInfo *riinfo, bool rel_is_pk,
237237
Datum *vals, char *nulls);
238-
static void ri_ReportViolation(const RI_ConstraintInfo *riinfo,
239-
Relation pk_rel, Relation fk_rel,
240-
TupleTableSlot *violatorslot, TupleDesc tupdesc,
241-
int queryno, bool is_restrict, bool partgone) pg_attribute_noreturn();
238+
pg_noreturn static void ri_ReportViolation(const RI_ConstraintInfo *riinfo,
239+
Relation pk_rel, Relation fk_rel,
240+
TupleTableSlot *violatorslot, TupleDesc tupdesc,
241+
int queryno, bool is_restrict, bool partgone);
242242

243243

244244
/*

src/backend/utils/fmgr/dfmgr.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ static DynamicFileList *file_tail = NULL;
6767
char *Dynamic_library_path;
6868

6969
static void *internal_load_library(const char *libname);
70-
static void incompatible_module_error(const char *libname,
71-
const Pg_magic_struct *module_magic_data) pg_attribute_noreturn();
70+
pg_noreturn static void incompatible_module_error(const char *libname,
71+
const Pg_magic_struct *module_magic_data);
7272
static char *expand_dynamic_library_name(const char *name);
7373
static void check_restricted_library_name(const char *name);
7474
static char *substitute_libpath_macro(const char *name);

src/backend/utils/hash/dynahash.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ static HASHBUCKET get_hash_entry(HTAB *hashp, int freelist_idx);
272272
static void hdefault(HTAB *hashp);
273273
static int choose_nelem_alloc(Size entrysize);
274274
static bool init_htab(HTAB *hashp, long nelem);
275-
static void hash_corrupted(HTAB *hashp) pg_attribute_noreturn();
275+
pg_noreturn static void hash_corrupted(HTAB *hashp);
276276
static uint32 hash_initial_lookup(HTAB *hashp, uint32 hashvalue,
277277
HASHBUCKET **bucketptr);
278278
static long next_pow2_long(long num);

src/backend/utils/mmgr/slab.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -601,8 +601,8 @@ SlabAllocFromNewBlock(MemoryContext context, Size size, int flags)
601601
* want to avoid that.
602602
*/
603603
pg_noinline
604+
pg_noreturn
604605
static void
605-
pg_attribute_noreturn()
606606
SlabAllocInvalidSize(MemoryContext context, Size size)
607607
{
608608
SlabContext *slab = (SlabContext *) context;

src/bin/pg_combinebackup/load_manifest.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ static void combinebackup_per_wal_range_cb(JsonManifestParseContext *context,
6868
TimeLineID tli,
6969
XLogRecPtr start_lsn,
7070
XLogRecPtr end_lsn);
71-
static void report_manifest_error(JsonManifestParseContext *context,
72-
const char *fmt,...)
73-
pg_attribute_printf(2, 3) pg_attribute_noreturn();
71+
pg_noreturn static void report_manifest_error(JsonManifestParseContext *context,
72+
const char *fmt,...)
73+
pg_attribute_printf(2, 3);
7474

7575
/*
7676
* Load backup_manifest files from an array of backups and produces an array

src/bin/pg_dump/pg_backup_utils.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ extern const char *progname;
2929

3030
extern void set_dump_section(const char *arg, int *dumpSections);
3131
extern void on_exit_nicely(on_exit_nicely_callback function, void *arg);
32-
extern void exit_nicely(int code) pg_attribute_noreturn();
32+
pg_noreturn extern void exit_nicely(int code);
3333

3434
/* In pg_dump, we modify pg_fatal to call exit_nicely instead of exit */
3535
#undef pg_fatal

src/bin/pg_upgrade/pg_upgrade.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ int get_user_info(char **user_name_p);
481481
void check_ok(void);
482482
void report_status(eLogType type, const char *fmt,...) pg_attribute_printf(2, 3);
483483
void pg_log(eLogType type, const char *fmt,...) pg_attribute_printf(2, 3);
484-
void pg_fatal(const char *fmt,...) pg_attribute_printf(1, 2) pg_attribute_noreturn();
484+
pg_noreturn void pg_fatal(const char *fmt,...) pg_attribute_printf(1, 2);
485485
void end_progress_output(void);
486486
void cleanup_output_dirs(void);
487487
void prep_status(const char *fmt,...) pg_attribute_printf(1, 2);

src/bin/pg_verifybackup/pg_verifybackup.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ static void verifybackup_per_wal_range_cb(JsonManifestParseContext *context,
6969
TimeLineID tli,
7070
XLogRecPtr start_lsn,
7171
XLogRecPtr end_lsn);
72-
static void report_manifest_error(JsonManifestParseContext *context,
73-
const char *fmt,...)
74-
pg_attribute_printf(2, 3) pg_attribute_noreturn();
72+
pg_noreturn static void report_manifest_error(JsonManifestParseContext *context,
73+
const char *fmt,...)
74+
pg_attribute_printf(2, 3);
7575

7676
static void verify_tar_backup(verifier_context *context, DIR *dir);
7777
static void verify_plain_backup_directory(verifier_context *context,

src/bin/pg_verifybackup/pg_verifybackup.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ typedef struct verifier_context
9898
extern void report_backup_error(verifier_context *context,
9999
const char *pg_restrict fmt,...)
100100
pg_attribute_printf(2, 3);
101-
extern void report_fatal_error(const char *pg_restrict fmt,...)
102-
pg_attribute_printf(1, 2) pg_attribute_noreturn();
101+
pg_noreturn extern void report_fatal_error(const char *pg_restrict fmt,...)
102+
pg_attribute_printf(1, 2);
103103
extern bool should_ignore_relpath(verifier_context *context,
104104
const char *relpath);
105105

src/bin/pgbench/pgbench.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ struct PgBenchExprList
140140

141141
extern int expr_yyparse(PgBenchExpr **expr_parse_result_p, yyscan_t yyscanner);
142142
extern int expr_yylex(union YYSTYPE *yylval_param, yyscan_t yyscanner);
143-
extern void expr_yyerror(PgBenchExpr **expr_parse_result_p, yyscan_t yyscanner, const char *message) pg_attribute_noreturn();
144-
extern void expr_yyerror_more(yyscan_t yyscanner, const char *message,
145-
const char *more) pg_attribute_noreturn();
143+
pg_noreturn extern void expr_yyerror(PgBenchExpr **expr_parse_result_p, yyscan_t yyscanner, const char *message);
144+
pg_noreturn extern void expr_yyerror_more(yyscan_t yyscanner, const char *message,
145+
const char *more);
146146
extern bool expr_lex_one_word(PsqlScanState state, PQExpBuffer word_buf,
147147
int *offset);
148148
extern yyscan_t expr_scanner_init(PsqlScanState state,
@@ -153,9 +153,9 @@ extern char *expr_scanner_get_substring(PsqlScanState state,
153153
int start_offset,
154154
bool chomp);
155155

156-
extern void syntax_error(const char *source, int lineno, const char *line,
157-
const char *command, const char *msg,
158-
const char *more, int column) pg_attribute_noreturn();
156+
pg_noreturn extern void syntax_error(const char *source, int lineno, const char *line,
157+
const char *command, const char *msg,
158+
const char *more, int column);
159159

160160
extern bool strtoint64(const char *str, bool errorOK, int64 *result);
161161
extern bool strtodouble(const char *str, bool errorOK, double *dv);

src/common/parse_manifest.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ static void json_manifest_finalize_wal_range(JsonManifestParseState *parse);
114114
static void verify_manifest_checksum(JsonManifestParseState *parse,
115115
const char *buffer, size_t size,
116116
pg_cryptohash_ctx *incr_ctx);
117-
static void json_manifest_parse_failure(JsonManifestParseContext *context,
118-
char *msg);
117+
pg_noreturn static void json_manifest_parse_failure(JsonManifestParseContext *context,
118+
char *msg);
119119

120120
static int hexdecode_char(char c);
121121
static bool hexdecode_string(uint8 *result, char *input, int nbytes);
@@ -889,6 +889,7 @@ static void
889889
json_manifest_parse_failure(JsonManifestParseContext *context, char *msg)
890890
{
891891
context->error_cb(context, "could not parse backup manifest: %s", msg);
892+
pg_unreachable();
892893
}
893894

894895
/*

src/include/bootstrap/bootstrap.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ extern PGDLLIMPORT Form_pg_attribute attrtypes[MAXATTR];
3333
extern PGDLLIMPORT int numattr;
3434

3535

36-
extern void BootstrapModeMain(int argc, char *argv[], bool check_only) pg_attribute_noreturn();
36+
pg_noreturn extern void BootstrapModeMain(int argc, char *argv[], bool check_only);
3737

3838
extern void closerel(char *relname);
3939
extern void boot_openrel(char *relname);
@@ -64,6 +64,6 @@ typedef void *yyscan_t;
6464
extern int boot_yyparse(yyscan_t yyscanner);
6565
extern int boot_yylex_init(yyscan_t *yyscannerp);
6666
extern int boot_yylex(union YYSTYPE *yylval_param, yyscan_t yyscanner);
67-
extern void boot_yyerror(yyscan_t yyscanner, const char *message) pg_attribute_noreturn();
67+
pg_noreturn extern void boot_yyerror(yyscan_t yyscanner, const char *message);
6868

6969
#endif /* BOOTSTRAP_H */

src/include/c.h

+24-10
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,26 @@
145145
#define pg_nodiscard
146146
#endif
147147

148+
/*
149+
* pg_noreturn corresponds to the C11 noreturn/_Noreturn function specifier.
150+
* We can't use the standard name "noreturn" because some third-party code
151+
* uses __attribute__((noreturn)) in headers, which would get confused if
152+
* "noreturn" is defined to "_Noreturn", as is done by <stdnoreturn.h>.
153+
*
154+
* In a declaration, function specifiers go before the function name. The
155+
* common style is to put them before the return type. (The MSVC fallback has
156+
* the same requirement. The GCC fallback is more flexible.)
157+
*/
158+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
159+
#define pg_noreturn _Noreturn
160+
#elif defined(__GNUC__) || defined(__SUNPRO_C)
161+
#define pg_noreturn __attribute__((noreturn))
162+
#elif defined(_MSC_VER)
163+
#define pg_noreturn __declspec(noreturn)
164+
#else
165+
#define pg_noreturn
166+
#endif
167+
148168
/*
149169
* This macro will disable address safety instrumentation for a function
150170
* when running with "-fsanitize=address". Think twice before using this!
@@ -213,30 +233,24 @@
213233
#define pg_attribute_printf(f,a)
214234
#endif
215235

216-
/* GCC and Sunpro support aligned, packed and noreturn */
236+
/* GCC and Sunpro support aligned and packed */
217237
#if defined(__GNUC__) || defined(__SUNPRO_C)
218238
#define pg_attribute_aligned(a) __attribute__((aligned(a)))
219-
#define pg_attribute_noreturn() __attribute__((noreturn))
220239
#define pg_attribute_packed() __attribute__((packed))
221-
#define HAVE_PG_ATTRIBUTE_NORETURN 1
222240
#elif defined(_MSC_VER)
223241
/*
224-
* MSVC supports aligned. noreturn is also possible but in MSVC it is
225-
* declared before the definition while pg_attribute_noreturn() macro
226-
* is currently used after the definition.
242+
* MSVC supports aligned.
227243
*
228244
* Packing is also possible but only by wrapping the entire struct definition
229245
* which doesn't fit into our current macro declarations.
230246
*/
231247
#define pg_attribute_aligned(a) __declspec(align(a))
232-
#define pg_attribute_noreturn()
233248
#else
234249
/*
235250
* NB: aligned and packed are not given default definitions because they
236251
* affect code functionality; they *must* be implemented by the compiler
237252
* if they are to be used.
238253
*/
239-
#define pg_attribute_noreturn()
240254
#endif
241255

242256
/*
@@ -858,8 +872,8 @@ typedef NameData *Name;
858872
* we should declare it as long as !FRONTEND.
859873
*/
860874
#ifndef FRONTEND
861-
extern void ExceptionalCondition(const char *conditionName,
862-
const char *fileName, int lineNumber) pg_attribute_noreturn();
875+
pg_noreturn extern void ExceptionalCondition(const char *conditionName,
876+
const char *fileName, int lineNumber);
863877
#endif
864878

865879
/*

src/include/commands/defrem.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,6 @@ extern List *defGetQualifiedName(DefElem *def);
160160
extern TypeName *defGetTypeName(DefElem *def);
161161
extern int defGetTypeLength(DefElem *def);
162162
extern List *defGetStringList(DefElem *def);
163-
extern void errorConflictingDefElem(DefElem *defel, ParseState *pstate) pg_attribute_noreturn();
163+
pg_noreturn extern void errorConflictingDefElem(DefElem *defel, ParseState *pstate);
164164

165165
#endif /* DEFREM_H */

src/include/common/parse_manifest.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ typedef void (*json_manifest_per_wal_range_callback) (JsonManifestParseContext *
3434
TimeLineID tli,
3535
XLogRecPtr start_lsn, XLogRecPtr end_lsn);
3636
typedef void (*json_manifest_error_callback) (JsonManifestParseContext *,
37-
const char *fmt,...) pg_attribute_printf(2, 3)
38-
pg_attribute_noreturn();
37+
const char *fmt,...) pg_attribute_printf(2, 3);
3938

4039
struct JsonManifestParseContext
4140
{

src/include/mb/pg_wchar.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -768,9 +768,9 @@ extern void check_encoding_conversion_args(int src_encoding,
768768
int expected_src_encoding,
769769
int expected_dest_encoding);
770770

771-
extern void report_invalid_encoding(int encoding, const char *mbstr, int len) pg_attribute_noreturn();
772-
extern void report_untranslatable_char(int src_encoding, int dest_encoding,
773-
const char *mbstr, int len) pg_attribute_noreturn();
771+
pg_noreturn extern void report_invalid_encoding(int encoding, const char *mbstr, int len);
772+
pg_noreturn extern void report_untranslatable_char(int src_encoding, int dest_encoding,
773+
const char *mbstr, int len);
774774

775775
extern int local2local(const unsigned char *l, unsigned char *p, int len,
776776
int src_encoding, int dest_encoding,

src/include/parser/parse_relation.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ extern bool isLockedRefname(ParseState *pstate, const char *refname);
110110
extern void addNSItemToQuery(ParseState *pstate, ParseNamespaceItem *nsitem,
111111
bool addToJoinList,
112112
bool addToRelNameSpace, bool addToVarNameSpace);
113-
extern void errorMissingRTE(ParseState *pstate, RangeVar *relation) pg_attribute_noreturn();
114-
extern void errorMissingColumn(ParseState *pstate,
115-
const char *relname, const char *colname, int location) pg_attribute_noreturn();
113+
pg_noreturn extern void errorMissingRTE(ParseState *pstate, RangeVar *relation);
114+
pg_noreturn extern void errorMissingColumn(ParseState *pstate,
115+
const char *relname, const char *colname, int location);
116116
extern void expandRTE(RangeTblEntry *rte, int rtindex, int sublevels_up,
117117
VarReturningType returning_type,
118118
int location, bool include_dropped,

src/include/parser/scanner.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,6 @@ extern void setup_scanner_errposition_callback(ScannerCallbackState *scbstate,
145145
core_yyscan_t yyscanner,
146146
int location);
147147
extern void cancel_scanner_errposition_callback(ScannerCallbackState *scbstate);
148-
extern void scanner_yyerror(const char *message, core_yyscan_t yyscanner) pg_attribute_noreturn();
148+
pg_noreturn extern void scanner_yyerror(const char *message, core_yyscan_t yyscanner);
149149

150150
#endif /* SCANNER_H */

src/include/postmaster/autovacuum.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ extern void autovac_init(void);
5858
/* called from postmaster when a worker could not be forked */
5959
extern void AutoVacWorkerFailed(void);
6060

61-
extern void AutoVacLauncherMain(const void *startup_data, size_t startup_data_len) pg_attribute_noreturn();
62-
extern void AutoVacWorkerMain(const void *startup_data, size_t startup_data_len) pg_attribute_noreturn();
61+
pg_noreturn extern void AutoVacLauncherMain(const void *startup_data, size_t startup_data_len);
62+
pg_noreturn extern void AutoVacWorkerMain(const void *startup_data, size_t startup_data_len);
6363

6464
extern bool AutoVacuumRequestWork(AutoVacuumWorkItemType type,
6565
Oid relationId, BlockNumber blkno);

0 commit comments

Comments
 (0)