This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug bootstrap/12100] time.h:402: error: previous declaration of `clock'evious declaration of `clock'


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12100



------- Additional Comments From drow at mvista dot com  2003-08-29 00:55 -------
Subject: Re:  New: time.h:402: error: previous declaration of `clock'evious declaration of `clock'

On Fri, Aug 29, 2003 at 12:44:25AM -0000, danglin at gcc dot gnu dot org wrote:
> | /* System header to define __stub macros and hopefully few prototypes,
> |     which can conflict with char clock (); below.
> |     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
> |     <limits.h> exists even on freestanding compilers.  */
> | #ifdef __STDC__
> | # include <limits.h>
> | #else
> | # include <assert.h>
> | #endif

> sys/time.h is included by limits.h when _HPUX_SOURCE is defined.

Blast.  I guess this is a bug in autoconf; you may wish to report it to
the autoconf developers.

In the meantime, it should be possible to avoid this by writing our own
test for clock (and any other affected functions) which does not
include <limits.h> if _HPUX_SOURCE is defined.  It looks like that's
only for the __stub macros, which are a glibcism anyway.  Or you could
copy/paste the definition of AC_LANG_FUNC_LINK_TRY(C) from c.m4 into
libiberty/aclocal.m4 and fix it there.  I just verified that that will
generate appropriate checks.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]