delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/07/22:30:46

From: jxh AT cs DOT wustl DOT edu (James Hu)
Newsgroups: comp.os.msdos.djgpp,comp.lang.c
Subject: Re: Can't get external variables to work!??
Date: 8 Feb 1998 03:21:46 GMT
Organization: Washington University in St. Louis
Lines: 19
Message-ID: <slrn6dq969.l72.jxh@lambada.cs.wustl.edu>
References: <34DC7457 DOT 6A0A7521 AT iafrica DOT com> <slrn6dp2f4 DOT j5q DOT jxh AT lambada DOT cs DOT wustl DOT edu> <34DCAE69 DOT F64D9DCE AT acm DOT org>
NNTP-Posting-Host: lambada.cs.wustl.edu
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Sat, 07 Feb 1998 13:56:41 -0500, Pete Becker <petebecker AT acm DOT org> wrote:
>James Hu wrote:
>> 
>> This problem could have been diagnosed if you had #include'd kbd.h into
>> kbd.c.
>
>Well, no. It's perfectly legal to have an extern declaration followed by
>a static definition. So the compiler is not required to say anything if
>you do this.

As Lawrence has pointed out, the behavior is undefined.  But, I'll amend
my statement to "might have been diagnosed".



-- 
James C. Hu <jxh AT cs DOT wustl DOT edu>       Computer Science Doctoral Student 
http://www.cs.wustl.edu/~jxh/        Washington University in Saint Louis
>>>>>>>>>>>>> I use *SpamBeGone* <URL:http://www.internz.com/SpamBeGone/>

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019