Re: Compiling CVS HEAD with clang under OSX
От | Tom Lane |
---|---|
Тема | Re: Compiling CVS HEAD with clang under OSX |
Дата | |
Msg-id | 21008.1280708741@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Compiling CVS HEAD with clang under OSX (Neil Conway <neil.conway@gmail.com>) |
Список | pgsql-hackers |
Neil Conway <neil.conway@gmail.com> writes: > 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. Yeah, this seems like an ancient typo. Will apply. > (2) clang doesn't support (or require) "-no-cpp-precomp", which > src/template/darwin adds to $CC unconditionally. > ... > (As an aside, is "no-cpp-precomp" still necessary for > reasonably-modern versions of Apple GCC?) Good question, but before thinking about removing it, we'd have to agree what is a "reasonably modern" version of Apple's gcc. OSX 10.4 is still in use in the wild, for sure. Is 10.3 still interesting? > (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. Perhaps a tack like this would shut it up? #define VERR(vv,e) ((vv)->nexttype = EOS, \ (vv)->err = ((vv)->err ? (vv)->err : (e))) What are you doing exactly to build with clang ... is "CC = clang" sufficient? regards, tom lane
В списке pgsql-hackers по дате отправления: