This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB 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]

testsuite/1742: gdb.mi/*.c does not compile with gcc HEAD 20040806


>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:


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