Compiling CVS HEAD with clang under OSX

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Compiling CVS HEAD with clang under OSX
Дата
Msg-id AANLkTi=SDfLWxrM0qr672sMXAt2YGjnFW9Sm9ag2-VoK@mail.gmail.com
обсуждение исходный текст
Ответы Re: Compiling CVS HEAD with clang under OSX  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Compiling CVS HEAD with clang under OSX  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Compiling CVS HEAD with clang under OSX  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Compiling CVS HEAD with clang under OSX  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I tried $subject recently, and noticed some minor issues:

(1) Two warnings that suggest bugs; in src/backend/utils/adt,

datetime.c:3101:27: warning: use of logical || with constant operand;
switch to bitwise | or remove constant

And similarly for src/interfaces/ecpg/pgtypeslib/interval.c. Attached
is a patch that replaces logical OR with bitwise OR, which seems to be
the intended coding.

(2) clang doesn't support (or require) "-no-cpp-precomp", which
src/template/darwin adds to $CC unconditionally. Adding the flag
unconditionally seems wrong regardless: e.g., -no-cpp-precomp isn't
supported by FSF GCC on OSX either. clang is happy to ignore the flag,
but it just emits countless "warning: argument unused during
compilation: '-no-cpp-precomp'" -- not sure the best way to fix this.
Perhaps have configure grep for "apple" in "gcc --version"?

(As an aside, is "no-cpp-precomp" still necessary for
reasonably-modern versions of Apple GCC?)

(3) There are countless warnings emitted during the compilation of
regcomp.c and related files, due to unused values returned by ERR(),
VERR(), FAILW(), and similar macros. Perhaps it is possible to rewrite
the macros to avoid the warning, although I didn't see an easy way to
do that. We could also specify -Wno-unused-value, but probably not
worth bothering just for clang.

Neil

Вложения

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

Предыдущее
От: Mike Fowler
Дата:
Сообщение: Initial review of xslt with no limits patch
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Compiling CVS HEAD with clang under OSX