This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: Uninitialized variabales in glibc 2.1
- To: Philip Blundell <pb@nexus.co.uk>
- Subject: Re: Uninitialized variabales in glibc 2.1
- From: Jim Meyering <meyering@ascend.com>
- Date: 01 May 1998 15:10:31 -0500
- Cc: hjl@lucon.org (H.J. Lu), drepper@cygnus.com, libc-hacker@gnu.org (GNU C Library)
- References: <E0yUT46-0001Lh-00@spring.nexus.co.uk>
Philip Blundell <pb@nexus.co.uk> writes:
| In message <m0yUNMP-000597C@ocean.lucon.org>, H.J. Lu writes:
| >Many variables are not initialized. I don't think it is a good design
| >to pass the address to a dummy to a function. You don't know how it is
|
| Initialising an automatic requires the compiler to generate extra
| instructions, which is a waste of time and space. I don't think we should do
| this unless there is a real bug. When the variables are only passed to other
| glibc internal functions we can take care to avoid using the uninitialised
| value.
For cases like this, I put the initialization code inside
`#ifdef lint' ... `#endif'. Then those who want to eliminate
all warnings just compile with -Dlint.