public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/47467] New: [4.6 Regression] hwint.h:239:3: error: implicit declaration of function 'abs'
@ 2011-01-26  4:47 danglin at gcc dot gnu.org
  2011-01-26 11:39 ` [Bug other/47467] " rguenth at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: danglin at gcc dot gnu.org @ 2011-01-26  4:47 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.6 Regression] hwint.h:239:3: error: implicit
                    declaration of function 'abs'
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: danglin@gcc.gnu.org
              Host: i686-apple-darwin9
            Target: i686-apple-darwin9
             Build: i686-apple-darwin9


/Users/dave/gnu/gcc/objdir/./prev-gcc/xgcc
-B/Users/dave/gnu/gcc/objdir/./prev-g
cc/ -B/opt/gnu/gcc/gcc-4.6.0/i686-apple-darwin9/bin/
-B/opt/gnu/gcc/gcc-4.6.0/i6
86-apple-darwin9/bin/ -B/opt/gnu/gcc/gcc-4.6.0/i686-apple-darwin9/lib/ -isystem 
/opt/gnu/gcc/gcc-4.6.0/i686-apple-darwin9/include -isystem
/opt/gnu/gcc/gcc-4.6.
0/i686-apple-darwin9/sys-include    -c   -g -O2 -mdynamic-no-pic -gtoggle
-DIN_G
CC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes
-Wmissing-prototyp
es  -Wmissing-format-attribute -Wno-long-long -Wno-variadic-macros
-Wno-overleng
th-strings -Werror -Wold-style-definition -Wc++-compat -fno-common 
-DHAVE_CONFI
G_H -I.. -I. -Iada -I../../gcc/gcc -I../../gcc/gcc/ada
-I../../gcc/gcc/../includ
e -I../../gcc/gcc/../libcpp/include -I/opt/gnu/gcc/gcc-4.6.0/include 
-I../../gc
c/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber   
.
./../gcc/gcc/ada/gcc-interface/targtyps.c -o ada/targtyps.o
In file included from ../../gcc/gcc/system.h:254:0,
                 from ../../gcc/gcc/ada/targext.c:36:
../../gcc/gcc/hwint.h: In function 'gcd':
../../gcc/gcc/hwint.h:239:3: error: implicit declaration of function 'abs'
[-Wer
ror=implicit-function-declaration]
cc1: all warnings being treated as errors


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug other/47467] [4.6 Regression] hwint.h:239:3: error: implicit declaration of function 'abs'
  2011-01-26  4:47 [Bug other/47467] New: [4.6 Regression] hwint.h:239:3: error: implicit declaration of function 'abs' danglin at gcc dot gnu.org
@ 2011-01-26 11:39 ` rguenth at gcc dot gnu.org
  2011-01-26 12:39 ` rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-26 11:39 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.01.26 11:08:06
   Target Milestone|---                         |4.6.0
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-26 11:08:06 UTC ---
Confirmed.  Saw this on x86_64-linux as well.

In theory it should work, the file properly includes config.h, system.h
which includes stdlib.h before including hwint.h.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug other/47467] [4.6 Regression] hwint.h:239:3: error: implicit declaration of function 'abs'
  2011-01-26  4:47 [Bug other/47467] New: [4.6 Regression] hwint.h:239:3: error: implicit declaration of function 'abs' danglin at gcc dot gnu.org
  2011-01-26 11:39 ` [Bug other/47467] " rguenth at gcc dot gnu.org
@ 2011-01-26 12:39 ` rguenth at gcc dot gnu.org
  2011-01-26 12:51 ` rguenth at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-26 12:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-26 11:39:21 UTC ---
Ah.  gcc/ada/targext.c fails to include config.h.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug other/47467] [4.6 Regression] hwint.h:239:3: error: implicit declaration of function 'abs'
  2011-01-26  4:47 [Bug other/47467] New: [4.6 Regression] hwint.h:239:3: error: implicit declaration of function 'abs' danglin at gcc dot gnu.org
  2011-01-26 11:39 ` [Bug other/47467] " rguenth at gcc dot gnu.org
  2011-01-26 12:39 ` rguenth at gcc dot gnu.org
@ 2011-01-26 12:51 ` rguenth at gcc dot gnu.org
  2011-01-26 21:17 ` joel at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-26 12:51 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-26 11:53:54 UTC ---
Author: rguenth
Date: Wed Jan 26 11:53:51 2011
New Revision: 169285

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169285
Log:
2011-01-26  Richard Guenther  <rguenther@suse.de>

    PR bootstrap/47467
    * targext.c: Include config.h.
    * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
    dependency.

Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/gcc-interface/Make-lang.in
    trunk/gcc/ada/targext.c

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-26 11:54:08 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug other/47467] [4.6 Regression] hwint.h:239:3: error: implicit declaration of function 'abs'
  2011-01-26  4:47 [Bug other/47467] New: [4.6 Regression] hwint.h:239:3: error: implicit declaration of function 'abs' danglin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-01-26 12:51 ` rguenth at gcc dot gnu.org
@ 2011-01-26 21:17 ` joel at gcc dot gnu.org
  2011-01-26 21:50 ` joel at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: joel at gcc dot gnu.org @ 2011-01-26 21:17 UTC (permalink / raw)
  To: gcc-bugs

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

Joel Sherrill <joel at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |joel at gcc dot gnu.org
         Resolution|FIXED                       |

--- Comment #5 from Joel Sherrill <joel at gcc dot gnu.org> 2011-01-26 20:45:17 UTC ---
(In reply to comment #4)
> Fixed.

Unfortunately, this fix broke cross builds.  :(

/users/joel/test-gcc/b-gccada-i386/./gcc/xgcc
-B/users/joel/test-gcc/b-gccada-i386/./gcc/ -nostdinc
-B/users/joel/test-gcc/b-gccada-i386/i386-rtems4.11/newlib/ -isystem
/users/joel/test-gcc/b-gccada-i386/i386-rtems4.11/newlib/targ-include -isystem
/users/joel/test-gcc/gcc-svn/newlib/libc/include
-B/users/joel/test-gcc/install-svn/i386-rtems4.11/bin/
-B/users/joel/test-gcc/install-svn/i386-rtems4.11/lib/ -isystem
/users/joel/test-gcc/install-svn/i386-rtems4.11/include -isystem
/users/joel/test-gcc/install-svn/i386-rtems4.11/sys-include    -c
-DCROSS_DIRECTORY_STRUCTURE -DIN_GCC  `echo -g -O2  -fexceptions -DIN_RTS
-DHAVE_GETIPINFO -mtune=i486 |sed -e 's/-pedantic//g' -e 's/-Wtraditional//g'` 
\
         -I. -I.. -I../.. -I/users/joel/test-gcc/gcc-svn/gcc/ada
-I/users/joel/test-gcc/gcc-svn/gcc/../include
-I/users/joel/test-gcc/gcc-svn/gcc \
        targext.c -o targext.o
In file included from targext.c:37:0:
/users/joel/test-gcc/gcc-svn/gcc/system.h:369:23: fatal error: sys/mman.h: No
such file or directory

Apparently targext.c is compiled both cross and native.  RTEMS does not have
sys/mman.h.  config.h indicates that it is present.

I dropped targext.c from the target library list and got far enough to get an
ICE on something else.  I am building another target now.

Is targext.c really supposed to be part of LIBGNAT_SRCS for the target or is
this just a host side compiler helper?


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug other/47467] [4.6 Regression] hwint.h:239:3: error: implicit declaration of function 'abs'
  2011-01-26  4:47 [Bug other/47467] New: [4.6 Regression] hwint.h:239:3: error: implicit declaration of function 'abs' danglin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-01-26 21:17 ` joel at gcc dot gnu.org
@ 2011-01-26 21:50 ` joel at gcc dot gnu.org
  2011-01-26 22:10 ` ebotcazou at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: joel at gcc dot gnu.org @ 2011-01-26 21:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Joel Sherrill <joel at gcc dot gnu.org> 2011-01-26 21:23:59 UTC ---
Since i386-rtems* blew up with an ICE, I wanted to verify the Makefile change
with another target.  sparc-rtems* built Ada with this patch:

I really don't know why targext.c needs to be in the target library.

Index: gcc/ada/gcc-interface/Makefile.in
===================================================================
--- gcc/ada/gcc-interface/Makefile.in    (revision 169296)
+++ gcc/ada/gcc-interface/Makefile.in    (working copy)
@@ -2213,12 +2213,12 @@
   argv.c cio.c cstreams.c errno.c exit.c cal.c ctrl_c.c env.c env.h    \
   arit64.c raise.h raise.c sysdep.c aux-io.c init.c initialize.c    \
   locales.c seh_init.c final.c tracebak.c tb-alvms.c tb-alvxw.c         \
-  tb-gcc.c expect.c mkdir.c socket.c gsocket.h targext.c $(EXTRA_LIBGNAT_SRCS)
+  tb-gcc.c expect.c mkdir.c socket.c gsocket.h $(EXTRA_LIBGNAT_SRCS)

 LIBGNAT_OBJS = adadecode.o adaint.o argv.o cio.o cstreams.o ctrl_c.o    \
   errno.o exit.o env.o raise.o sysdep.o aux-io.o init.o initialize.o    \
   locales.o seh_init.o cal.o arit64.o final.o tracebak.o expect.o       \
-  mkdir.o socket.o targext.o $(EXTRA_LIBGNAT_OBJS)
+  mkdir.o socket.o $(EXTRA_LIBGNAT_OBJS)

 # NOTE ??? - when the -I option for compiling Ada code is made to work,
 #  the library installation will change and there will be a


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug other/47467] [4.6 Regression] hwint.h:239:3: error: implicit declaration of function 'abs'
  2011-01-26  4:47 [Bug other/47467] New: [4.6 Regression] hwint.h:239:3: error: implicit declaration of function 'abs' danglin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2011-01-26 21:50 ` joel at gcc dot gnu.org
@ 2011-01-26 22:10 ` ebotcazou at gcc dot gnu.org
  2011-01-26 22:12 ` joel at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2011-01-26 22:10 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot
                   |                            |gnu.org

--- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-01-26 21:49:12 UTC ---
> Is targext.c really supposed to be part of LIBGNAT_SRCS for the target or is
> this just a host side compiler helper?

Unfortunately the former.  The symbols defined in targext.c are included by
s-os_lib.adb, which is renamed to g-os_lib.adb for the library.

Does the following patch work?

Index: targext.c
===================================================================
--- targext.c   (revision 169285)
+++ targext.c   (working copy)
@@ -33,8 +33,13 @@
 /*  extension for object and executable files. It is used by the compiler,  */
 /*  binder and tools.                                                       */

+#ifdef IN_RTS
+#include "tconfig.h"
+#include "tsystem.h"
+#else
 #include "config.h"
 #include "system.h"
+#endif
 #include "coretypes.h"
 #include "tm.h"


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug other/47467] [4.6 Regression] hwint.h:239:3: error: implicit declaration of function 'abs'
  2011-01-26  4:47 [Bug other/47467] New: [4.6 Regression] hwint.h:239:3: error: implicit declaration of function 'abs' danglin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2011-01-26 22:10 ` ebotcazou at gcc dot gnu.org
@ 2011-01-26 22:12 ` joel at gcc dot gnu.org
  2011-01-26 22:41 ` ebotcazou at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: joel at gcc dot gnu.org @ 2011-01-26 22:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Joel Sherrill <joel at gcc dot gnu.org> 2011-01-26 22:01:56 UTC ---
(In reply to comment #7)
> > Is targext.c really supposed to be part of LIBGNAT_SRCS for the target or is
> > this just a host side compiler helper?
> 
> Unfortunately the former.  The symbols defined in targext.c are included by
> s-os_lib.adb, which is renamed to g-os_lib.adb for the library.
> 
> Does the following patch work?

It appears to.  My build tree now has these copies of targext.o.  I think you
can commit this and close this one.

$ find b-gccada-mips/ -name targext.o
b-gccada-mips/gcc/ada/rts_mips32_soft-float/targext.o
b-gccada-mips/gcc/ada/rts_mips3_el_soft-float/targext.o
b-gccada-mips/gcc/ada/targext.o
b-gccada-mips/gcc/ada/tools/targext.o

> Index: targext.c
> ===================================================================
> --- targext.c   (revision 169285)
> +++ targext.c   (working copy)
> @@ -33,8 +33,13 @@
>  /*  extension for object and executable files. It is used by the compiler,  */
>  /*  binder and tools.                                                       */
> 
> +#ifdef IN_RTS
> +#include "tconfig.h"
> +#include "tsystem.h"
> +#else
>  #include "config.h"
>  #include "system.h"
> +#endif
>  #include "coretypes.h"
>  #include "tm.h"


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug other/47467] [4.6 Regression] hwint.h:239:3: error: implicit declaration of function 'abs'
  2011-01-26  4:47 [Bug other/47467] New: [4.6 Regression] hwint.h:239:3: error: implicit declaration of function 'abs' danglin at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2011-01-26 22:12 ` joel at gcc dot gnu.org
@ 2011-01-26 22:41 ` ebotcazou at gcc dot gnu.org
  2011-01-26 22:45 ` ebotcazou at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2011-01-26 22:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-01-26 22:10:26 UTC ---
Author: ebotcazou
Date: Wed Jan 26 22:10:23 2011
New Revision: 169308

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169308
Log:
    PR bootstrap/47467
    * targext.c: Include target files if IN_RTS is defined.

Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/targext.c


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug other/47467] [4.6 Regression] hwint.h:239:3: error: implicit declaration of function 'abs'
  2011-01-26  4:47 [Bug other/47467] New: [4.6 Regression] hwint.h:239:3: error: implicit declaration of function 'abs' danglin at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2011-01-26 22:41 ` ebotcazou at gcc dot gnu.org
@ 2011-01-26 22:45 ` ebotcazou at gcc dot gnu.org
  2011-02-02 18:00 ` dnovillo at gcc dot gnu.org
  2011-02-02 18:11 ` dnovillo at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2011-01-26 22:45 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #10 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-01-26 22:12:08 UTC ---
Hopefully for real.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug other/47467] [4.6 Regression] hwint.h:239:3: error: implicit declaration of function 'abs'
  2011-01-26  4:47 [Bug other/47467] New: [4.6 Regression] hwint.h:239:3: error: implicit declaration of function 'abs' danglin at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2011-01-26 22:45 ` ebotcazou at gcc dot gnu.org
@ 2011-02-02 18:00 ` dnovillo at gcc dot gnu.org
  2011-02-02 18:11 ` dnovillo at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: dnovillo at gcc dot gnu.org @ 2011-02-02 18:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Diego Novillo <dnovillo at gcc dot gnu.org> 2011-02-02 17:52:42 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:52:33 2011
New Revision: 169616

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169616
Log:
2011-01-26  Richard Guenther  <rguenther@suse.de>

    PR bootstrap/47467
    * targext.c: Include config.h.
    * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
    dependency.

Modified:
    branches/google/integration/gcc/ada/ChangeLog
    branches/google/integration/gcc/ada/gcc-interface/Make-lang.in
    branches/google/integration/gcc/ada/targext.c


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug other/47467] [4.6 Regression] hwint.h:239:3: error: implicit declaration of function 'abs'
  2011-01-26  4:47 [Bug other/47467] New: [4.6 Regression] hwint.h:239:3: error: implicit declaration of function 'abs' danglin at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2011-02-02 18:00 ` dnovillo at gcc dot gnu.org
@ 2011-02-02 18:11 ` dnovillo at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: dnovillo at gcc dot gnu.org @ 2011-02-02 18:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Diego Novillo <dnovillo at gcc dot gnu.org> 2011-02-02 17:55:10 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:55:07 2011
New Revision: 169632

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169632
Log:
    PR bootstrap/47467
    * targext.c: Include target files if IN_RTS is defined.

Modified:
    branches/google/integration/gcc/ada/ChangeLog
    branches/google/integration/gcc/ada/targext.c


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-02-02 18:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-26  4:47 [Bug other/47467] New: [4.6 Regression] hwint.h:239:3: error: implicit declaration of function 'abs' danglin at gcc dot gnu.org
2011-01-26 11:39 ` [Bug other/47467] " rguenth at gcc dot gnu.org
2011-01-26 12:39 ` rguenth at gcc dot gnu.org
2011-01-26 12:51 ` rguenth at gcc dot gnu.org
2011-01-26 21:17 ` joel at gcc dot gnu.org
2011-01-26 21:50 ` joel at gcc dot gnu.org
2011-01-26 22:10 ` ebotcazou at gcc dot gnu.org
2011-01-26 22:12 ` joel at gcc dot gnu.org
2011-01-26 22:41 ` ebotcazou at gcc dot gnu.org
2011-01-26 22:45 ` ebotcazou at gcc dot gnu.org
2011-02-02 18:00 ` dnovillo at gcc dot gnu.org
2011-02-02 18:11 ` dnovillo at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).