develooper Front page | perl.perl5.porters | Postings from September 2003

Re: Interesting - [ A user's experiences with GCC-3.4 snapshots]

Thread Previous | Thread Next
Chip Salzenberg
September 16, 2003 14:55
Re: Interesting - [ A user's experiences with GCC-3.4 snapshots]
Message ID:
According to Enache Adrian:
> On Tue, Sep 16, 2003 at 02:31:58PM -0500, Art Haas wrote:
> > $ cat try.c
> > #include <stdio.h>
> > int main() { extern void *setproctitle(); if(&setproctitle) return(0); else return(1); }
> The C standard guarantees that the address of a function will never
> compare equal to NULL.

Hm, I wonder ... does ELF have a way to say "I want the value of this
symbol, but if it's not defined, then I'll take zero instead"?  If so,
and if the declaration of setproctitle() had such a qualifier on it,
then this test would be reasonable.

Not that I'm suggesting it's valid as it stands.
Chip Salzenberg               - a.k.a. -               <>
"I wanted to play hopscotch with the impenetrable mystery of existence,
    but he stepped in a wormhole and had to go in early."  // MST3K

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About