Re: Compiler warnings with --enable-dtrace

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Compiler warnings with --enable-dtrace
Дата
Msg-id 23524.1525711378@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Compiler warnings with --enable-dtrace  (Thomas Munro <thomas.munro@enterprisedb.com>)
Ответы Re: Compiler warnings with --enable-dtrace  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Compiler warnings with --enable-dtrace  (Peter Geoghegan <pg@bowt.ie>)
Список pgsql-hackers
Thomas Munro <thomas.munro@enterprisedb.com> writes:
> --enable-dtrace produces compiler warnings about const correctness,
> except on macOS.  That's because Apple's dtrace produces function
> declarations in probes.h that take strings as const char * whereas
> AFAIK on all other operating systems they take char * (you can see
> that possibly recent difference in Apple's version of dt_header_decl()
> in dt_program.c).  People have complained before[1].

Yeah, it's a bit annoying, although AFAICT hardly anyone uses dtrace.

> Maybe we should do what the Perl people do[2] and post-process the
> generated header file to add const qualifiers?  Please see attached.

+1 for the idea.  I notice that Perl's version of this is careful
not to munge lines that already contain "const" ... do we need to
worry about that?

            regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: doc fixes: vacuum_cleanup_index_scale_factor
Следующее
От: Юрий Соколов
Дата:
Сообщение: Re: [HACKERS] Clock with Adaptive Replacement