This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
testsuite/1742: gdb.mi/*.c does not compile with gcc HEAD 20040806
- From: mec dot gnu at mindspring dot com
- To: gdb-gnats at sources dot redhat dot com
- Date: 11 Aug 2004 13:06:32 -0000
- Subject: testsuite/1742: gdb.mi/*.c does not compile with gcc HEAD 20040806
- Reply-to: mec dot gnu at mindspring dot com
>Number: 1742
>Category: testsuite
>Synopsis: gdb.mi/*.c does not compile with gcc HEAD 20040806
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unasigned
>State: open
>Class: test-bug
>Submitter-Id: net
>Arrival-Date: Wed Aug 11 13:08:01 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: mec.gnu@mindspring.com
>Release: gdb HEAD 20040807
>Organization:
>Environment:
native i686-pc-linux-gnu
gdb HEAD 20040807
gcc HEAD 20040806
binutils 2.15
dwarf-2
>Description:
gcc HEAD added a new warning recently:
warning: incompatible implicit declaration of built-in function 'malloc'
This happens with any standard library function.
This really spikes the test suite. Most files in gdb.mi/*.c are affected.
My K&R 2nd edition, Appendex B, says:
"A header must be included outside of any external declaration or definition and before any use of anything it declares."
So I think the compiler is right and gdb.mi/*.c are wrong.
>How-To-Repeat:
Run the test suite with gcc HEAD.
>Fix:
(1) Rewrite gdb_get_line_number so it works with MI.
(2) Update the copyright years in gdb.mi/*.exp.
(3) Enhance gdb.mi/*.exp to use gdb_get_line_number instead of absolute line numbers.
(4) Add copyright notices to gdb.mi/*.c.
(5) Add "#include" lines to gdb.mi/*.c.
I've already done (1) and (2). (3) is in progress.
>Release-Note:
>Audit-Trail:
>Unformatted: