Re: patch to have configure check if CC is intel C compiler - Mailing list pgsql-patches

From Jeremy Drake
Subject Re: patch to have configure check if CC is intel C compiler
Date
Msg-id Pine.LNX.4.64.0604011529390.13056@frousa
Whole thread Raw
In response to Re: patch to have configure check if CC is intel C compiler  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-patches
On Sun, 2 Apr 2006, Peter Eisentraut wrote:

> Jeremy Drake wrote:
> > The intel C compiler for linux emulates gcc
> > by default, which means it defines that and looks very much like gcc
> > to configure.  However, it does not get along with the added -W flags
> > very well.  They don't seem to kill it, but some of them give
> > warnings about unsupported command line options and others produce
> > insane amounts of output from the compiler.
>
> Details please.  Which options are unsupported and what happens if you
> use them?

For an example I grabbed the output from compiling nbtsearch.c using
this configure line:
CC="icc" CFLAGS="-O3 -ip -parallel -xN" ./configure --with-perl --with-python --with-openssl

As you can tell, these make a lot of output.  I only include the line(s)
with each option which are added when the option is given.  So, with the
old configure, all of the warnings were concatenated (two instances of the
"argument required" warning plus the inlining report and the collection of
remark messages).




-Wmissing-prototypes and -Wpointer-arith do not appear to make any
difference, at least on this file.




-Wendif-labels:
iccbin: Command line warning: ignoring option '-W'; no argument required




-Wdeclaration-after-statement:
iccbin: Command line warning: ignoring option '-W'; no argument required




-Winline:
INLINING REPORT: (_bt_moveright)

  -> elog_finish(EXTERN)
  -> elog_start(EXTERN)
  -> _bt_relandgetbuf(EXTERN)
  -> ARGS_IN_REGS: _bt_compare.(3) (isz = 249) (sz = 269 (77+192))

INLINING REPORT: (_bt_binsrch)

  -> ARGS_IN_REGS: _bt_compare.(3) (isz = 249) (sz = 269 (77+192))

INLINING REPORT: (_bt_next)

  -> _bt_relbuf(EXTERN)
  -> _bt_checkkeys(EXTERN)
  -> ARGS_IN_REGS: _bt_step.(6) (isz = 486) (sz = 502 (171+331))

INLINING REPORT: (_bt_first)

  -> ARGS_IN_REGS: _bt_endpoint(9) (isz = 475) (sz = 489 (176+313))
  -> INLINE: _bt_next(11) (isz = 59) (sz = 73 (27+46))
    -> ARGS_IN_REGS: _bt_step.(6) (isz = 486) (sz = 502 (171+331))
    -> _bt_checkkeys(EXTERN)
    -> _bt_relbuf(EXTERN)
  -> _bt_relbuf(EXTERN)
  -> _bt_checkkeys(EXTERN)
  -> ARGS_IN_REGS: _bt_step.(6) (isz = 486) (sz = 502 (171+331))
  -> ARGS_IN_REGS: _bt_step.(6) (isz = 486) (sz = 502 (171+331))
  -> BufferGetBlockNumber(EXTERN)
  -> INLINE: _bt_binsrch(15) (isz = 104) (sz = 127 (41+86))
    -> ARGS_IN_REGS: _bt_compare.(3) (isz = 249) (sz = 269 (77+192))
  -> _bt_freestack(EXTERN)
  -> ARGS_IN_REGS: _bt_search.(0) (isz = 315) (sz = 335 (113+222))
  -> elog_finish(EXTERN)
  -> elog_start(EXTERN)
  -> memcpy(EXTERN)
  -> memcpy(EXTERN)
  -> ScanKeyEntryInitializeWithInfo(EXTERN)
  -> index_getprocinfo(EXTERN)
  -> ScanKeyEntryInitialize(EXTERN)
  -> get_opclass_proc(EXTERN)
  -> _bt_preprocess_keys(EXTERN)

INLINING REPORT: (_bt_step)

  -> BufferGetBlockNumber(EXTERN)
  -> _bt_relbuf(EXTERN)
  -> _bt_relandgetbuf(EXTERN)
  -> INLINE: _bt_walk_left(10) (isz = 210) (sz = 222 (77+145))
    -> BufferGetBlockNumber(EXTERN)
    -> _bt_relandgetbuf(EXTERN)
    -> _bt_relandgetbuf(EXTERN)
    -> _bt_relandgetbuf(EXTERN)
    -> elog_start(EXTERN)
    -> elog_finish(EXTERN)
    -> elog_start(EXTERN)
    -> elog_finish(EXTERN)
    -> _bt_relandgetbuf(EXTERN)
    -> _bt_relbuf(EXTERN)

INLINING REPORT: (_bt_search)

  -> _bt_relandgetbuf(EXTERN)
  -> memcpy(EXTERN)
  -> MemoryContextAlloc(EXTERN)
  -> BufferGetBlockNumber(EXTERN)
  -> INLINE: _bt_binsrch(14) (isz = 104) (sz = 127 (41+86))
    -> ARGS_IN_REGS: _bt_compare.(3) (isz = 249) (sz = 269 (77+192))
  -> INLINE: _bt_moveright(16) (isz = 92) (sz = 110 (37+73))
    -> ARGS_IN_REGS: _bt_compare.(3) (isz = 249) (sz = 269 (77+192))
    -> _bt_relandgetbuf(EXTERN)
    -> elog_start(EXTERN)
    -> elog_finish(EXTERN)
  -> _bt_getroot(EXTERN)

INLINING REPORT: (_bt_compare)

  -> FunctionCall2(EXTERN)
  -> nocache_index_getattr(EXTERN)
  -> nocache_index_getattr(EXTERN)

INLINING REPORT: (_bt_endpoint)

  -> INLINE: _bt_next(12) (isz = 59) (sz = 73 (27+46))
    -> ARGS_IN_REGS: _bt_step.(6) (isz = 486) (sz = 502 (171+331))
    -> _bt_checkkeys(EXTERN)
    -> _bt_relbuf(EXTERN)
  -> _bt_relbuf(EXTERN)
  -> _bt_checkkeys(EXTERN)
  -> ARGS_IN_REGS: _bt_step.(6) (isz = 486) (sz = 502 (171+331))
  -> elog_finish(EXTERN)
  -> elog_start(EXTERN)
  -> BufferGetBlockNumber(EXTERN)
  -> INLINE: _bt_get_endpoint(13) (isz = 199) (sz = 213 (76+137))
    -> _bt_gettrueroot(EXTERN)
    -> _bt_getroot(EXTERN)
    -> elog_start(EXTERN)
    -> elog_finish(EXTERN)
    -> _bt_relandgetbuf(EXTERN)
    -> elog_start(EXTERN)
    -> elog_finish(EXTERN)
    -> _bt_relandgetbuf(EXTERN)

INLINING REPORT: (_bt_get_endpoint)

  -> _bt_relandgetbuf(EXTERN)
  -> elog_finish(EXTERN)
  -> elog_start(EXTERN)
  -> _bt_relandgetbuf(EXTERN)
  -> elog_finish(EXTERN)
  -> elog_start(EXTERN)
  -> _bt_getroot(EXTERN)
  -> _bt_gettrueroot(EXTERN)




-Wall:
../../../../src/include/access/relscan.h(45): remark #1684: conversion
from pointer to same-sized integral type (potential portability problem)
      OffsetNumber rs_vistuples[MaxHeapTuplesPerPage];    /* their
offsets */
                                ^

../../../../src/include/access/relscan.h(45): remark #1684: conversion
from pointer to same-sized integral type (potential portability problem)
      OffsetNumber rs_vistuples[MaxHeapTuplesPerPage];    /* their
offsets */
                                ^

nbtsearch.c(242): remark #810: conversion from "int" to
"OffsetNumber={uint16={unsigned short}}" may lose significant bits
      low = P_FIRSTDATAKEY(opaque);
          ^

nbtsearch.c(243): remark #1684: conversion from pointer to same-sized
integral type (potential portability problem)
      high = PageGetMaxOffsetNumber(page);
             ^

nbtsearch.c(243): remark #1684: conversion from pointer to same-sized
integral type (potential portability problem)
      high = PageGetMaxOffsetNumber(page);
             ^

nbtsearch.c(243): remark #810: conversion from "unsigned int" to
"OffsetNumber={uint16={unsigned short}}" may lose significant bits
      high = PageGetMaxOffsetNumber(page);
           ^

nbtsearch.c(273): remark #810: conversion from "int" to
"OffsetNumber={uint16={unsigned short}}" may lose significant bits
          OffsetNumber mid = low + ((high - low) / 2);
                             ^

nbtsearch.c(280): remark #810: conversion from "int" to
"OffsetNumber={uint16={unsigned short}}" may lose significant bits
              low = mid + 1;
                  ^

nbtsearch.c(369): remark #1684: conversion from pointer to same-sized
integral type (potential portability problem)
          datum = index_getattr(itup, scankey->sk_attno, itupdesc,
&isNull);
                  ^

nbtsearch.c(505): remark #279: controlling expression is constant
      pgstat_count_index_scan(&scan->xs_pgstat_info);
      ^

nbtsearch.c(868): remark #810: conversion from
"BlockNumber={uint32={unsigned int}}" to "uint16={unsigned short}" may
lose significant bits
      ItemPointerSet(current, blkno, offnum);
      ^

nbtsearch.c(868): remark #810: conversion from "unsigned int" to
"uint16={unsigned short}" may lose significant bits
      ItemPointerSet(current, blkno, offnum);
      ^

nbtsearch.c(899): remark #1684: conversion from pointer to same-sized
integral type (potential portability problem)
          if (offnum > PageGetMaxOffsetNumber(page))
                       ^

nbtsearch.c(899): remark #1684: conversion from pointer to same-sized
integral type (potential portability problem)
          if (offnum > PageGetMaxOffsetNumber(page))
                       ^

nbtsearch.c(963): remark #1684: conversion from pointer to same-sized
integral type (potential portability problem)
      maxoff = PageGetMaxOffsetNumber(page);
               ^

nbtsearch.c(963): remark #1684: conversion from pointer to same-sized
integral type (potential portability problem)
      maxoff = PageGetMaxOffsetNumber(page);
               ^

nbtsearch.c(963): remark #810: conversion from "unsigned int" to
"OffsetNumber={uint16={unsigned short}}" may lose significant bits
      maxoff = PageGetMaxOffsetNumber(page);
             ^

nbtsearch.c(992): remark #1684: conversion from pointer to same-sized
integral type (potential portability problem)
                      maxoff =
PageGetMaxOffsetNumber(page);
                               ^

nbtsearch.c(992): remark #1684: conversion from pointer to same-sized
integral type (potential portability problem)
                      maxoff =
PageGetMaxOffsetNumber(page);
                               ^

nbtsearch.c(992): remark #810: conversion from "unsigned int" to
"OffsetNumber={uint16={unsigned short}}" may lose significant bits
                      maxoff =
PageGetMaxOffsetNumber(page);
                             ^

nbtsearch.c(993): remark #810: conversion from "int" to
"OffsetNumber={uint16={unsigned short}}" may lose significant bits
                      offnum = P_FIRSTDATAKEY(opaque);
                             ^

nbtsearch.c(1037): remark #1684: conversion from pointer to same-sized
integral type (potential portability problem)
                      maxoff =
PageGetMaxOffsetNumber(page);
                               ^

nbtsearch.c(1037): remark #1684: conversion from pointer to same-sized
integral type (potential portability problem)
                      maxoff =
PageGetMaxOffsetNumber(page);
                               ^

nbtsearch.c(1037): remark #810: conversion from "unsigned int" to
"OffsetNumber={uint16={unsigned short}}" may lose significant bits
                      maxoff =
PageGetMaxOffsetNumber(page);
                             ^

nbtsearch.c(1049): remark #810: conversion from
"BlockNumber={uint32={unsigned int}}" to "uint16={unsigned short}" may
lose significant bits
      ItemPointerSet(current, blkno, offnum);
      ^

nbtsearch.c(1049): remark #810: conversion from "unsigned int" to
"uint16={unsigned short}" may lose significant bits
      ItemPointerSet(current, blkno, offnum);
      ^

nbtsearch.c(1237): remark #1684: conversion from pointer to same-sized
integral type (potential portability problem)
              offnum = PageGetMaxOffsetNumber(page);
                       ^

nbtsearch.c(1237): remark #1684: conversion from pointer to same-sized
integral type (potential portability problem)
              offnum = PageGetMaxOffsetNumber(page);
                       ^

nbtsearch.c(1237): remark #810: conversion from "unsigned int" to
"OffsetNumber={uint16={unsigned short}}" may lose significant bits
              offnum = PageGetMaxOffsetNumber(page);
                     ^

nbtsearch.c(1239): remark #810: conversion from "int" to
"OffsetNumber={uint16={unsigned short}}" may lose significant bits
              offnum = P_FIRSTDATAKEY(opaque);
                     ^

nbtsearch.c(1299): remark #1684: conversion from pointer to same-sized
integral type (potential portability problem)
      maxoff = PageGetMaxOffsetNumber(page);
               ^

nbtsearch.c(1299): remark #1684: conversion from pointer to same-sized
integral type (potential portability problem)
      maxoff = PageGetMaxOffsetNumber(page);
               ^

nbtsearch.c(1299): remark #810: conversion from "unsigned int" to
"OffsetNumber={uint16={unsigned short}}" may lose significant bits
      maxoff = PageGetMaxOffsetNumber(page);
             ^

nbtsearch.c(1306): remark #810: conversion from "int" to
"OffsetNumber={uint16={unsigned short}}" may lose significant bits
          start = P_FIRSTDATAKEY(opaque);
                ^

nbtsearch.c(1312): remark #1684: conversion from pointer to same-sized
integral type (potential portability problem)
          start = PageGetMaxOffsetNumber(page);
                  ^

nbtsearch.c(1312): remark #1684: conversion from pointer to same-sized
integral type (potential portability problem)
          start = PageGetMaxOffsetNumber(page);
                  ^

nbtsearch.c(1312): remark #810: conversion from "unsigned int" to
"OffsetNumber={uint16={unsigned short}}" may lose significant bits
          start = PageGetMaxOffsetNumber(page);
                ^

nbtsearch.c(1314): remark #810: conversion from "int" to
"OffsetNumber={uint16={unsigned short}}" may lose significant bits
              start = P_FIRSTDATAKEY(opaque);
                    ^

nbtsearch.c(1322): remark #810: conversion from
"BlockNumber={uint32={unsigned int}}" to "uint16={unsigned short}" may
lose significant bits
      ItemPointerSet(current, blkno, start);
      ^

nbtsearch.c(1322): remark #810: conversion from "unsigned int" to
"uint16={unsigned short}" may lose significant bits
      ItemPointerSet(current, blkno, start);
      ^




--
Each team building another component has been using the most recent tested
version of the integrated system as a test bed for debugging its piece.  Their
work will be set back by having that test bed change under them.  Of course it
must.  But the changes need to be quantized.  Then each user has periods of
productive stability, interrupted by bursts of test-bed change.  This seems
to be much less disruptive than a constant rippling and trembling.
- Frederick Brooks Jr., "The Mythical Man Month"

pgsql-patches by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: patch to have configure check if CC is intel C compiler
Next
From: Neil Conway
Date:
Subject: Re: psql patch: new host/port without leaving session