Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #112156

Re: isspace() executes without ctype header?

From DFS <nospam@dfs.com>
Newsgroups comp.lang.c
Subject Re: isspace() executes without ctype header?
Date 2017-06-13 23:04 -0400
Organization A noiseless patient Spider
Message-ID <ohq8oe$mi3$1@dont-email.me> (permalink)
References <ohq29k$892$1@dont-email.me> <kfna85b8g3i.fsf@x-alumni2.alumni.caltech.edu>

Show all headers | View raw


On 6/13/2017 10:20 PM, Tim Rentsch wrote:
> DFS <nospam@dfs.com> writes:
> 
>> Seems strange, but the code compiles (Tiny C on Windows) and runs just
>> fine with only stdio.h and stdlib.h includes.
> 
> Do you mean it compiles without giving any diagnostics?

Yes.  No warnings or errors at all.



>> Online resources say ctype.h is the required header (which I didn't
>> know obviously).
>>
>> I compiled the program with Pelles and got warnings:
>>
>> Undeclared function 'isspace' (did you mean 'vsscanf'?); assuming
>> extern' returning 'int'.
>>
>>
>> Why is it working without ctype.h?
> 
> If Tiny C defaults to C89/C90, 

The website implies it defaults to C99.

One of the changelog entries of an earlier version says:

Define __STDC_VERSION__=199901L (477)


> then a call to isspace() without
> a prior declaration will implicitly declare the function, with
> a return type of int.  The linux tcc I have does not do that,
> but I expect it is a different version.


tcc version 0.9.26 (x86-64 Win64)


Do you get a function not declared warning?

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

isspace() executes without ctype header? DFS <nospam@dfs.com> - 2017-06-13 21:13 -0400
  Re: isspace() executes without ctype header? Ian Collins <ian-news@hotmail.com> - 2017-06-14 13:20 +1200
    Re: isspace() executes without ctype header? DFS <nospam@dfs.com> - 2017-06-13 21:33 -0400
      Re: isspace() executes without ctype header? Ian Collins <ian-news@hotmail.com> - 2017-06-14 13:35 +1200
        Re: isspace() executes without ctype header? DFS <nospam@dfs.com> - 2017-06-13 22:31 -0400
          Re: isspace() executes without ctype header? Ian Collins <ian-news@hotmail.com> - 2017-06-14 14:40 +1200
  Re: isspace() executes without ctype header? Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2017-06-13 21:49 -0400
  Re: isspace() executes without ctype header? Tim Rentsch <txr@alumni.caltech.edu> - 2017-06-13 19:20 -0700
    Re: isspace() executes without ctype header? DFS <nospam@dfs.com> - 2017-06-13 23:04 -0400
      Re: isspace() executes without ctype header? asetofsymbols@gmail.com - 2017-06-13 23:07 -0700
      Re: isspace() executes without ctype header? Tim Rentsch <txr@alumni.caltech.edu> - 2017-06-14 08:26 -0700
        Re: isspace() executes without ctype header? bartc <bc@freeuk.com> - 2017-06-14 17:29 +0100
          Re: isspace() executes without ctype header? Keith Thompson <kst-u@mib.org> - 2017-06-14 09:46 -0700
            Re: isspace() executes without ctype header? bartc <bc@freeuk.com> - 2017-06-14 17:54 +0100
              Re: isspace() executes without ctype header? Keith Thompson <kst-u@mib.org> - 2017-06-14 10:17 -0700
              Re: isspace() executes without ctype header? supercat@casperkitty.com - 2017-06-14 10:48 -0700
                Re: isspace() executes without ctype header? Keith Thompson <kst-u@mib.org> - 2017-06-14 12:03 -0700
                Re: isspace() executes without ctype header? supercat@casperkitty.com - 2017-06-14 12:48 -0700
                Re: isspace() executes without ctype header? Keith Thompson <kst-u@mib.org> - 2017-06-14 13:06 -0700
            Re: isspace() executes without ctype header? Tim Rentsch <txr@alumni.caltech.edu> - 2017-06-16 23:14 -0700
  Re: isspace() executes without ctype header? bartc <bc@freeuk.com> - 2017-06-14 11:18 +0100
    Re: isspace() executes without ctype header? Keith Thompson <kst-u@mib.org> - 2017-06-14 09:35 -0700
      Re: isspace() executes without ctype header? bartc <bc@freeuk.com> - 2017-06-14 17:47 +0100
        Re: isspace() executes without ctype header? supercat@casperkitty.com - 2017-06-14 10:19 -0700
          Re: isspace() executes without ctype header? Keith Thompson <kst-u@mib.org> - 2017-06-14 10:29 -0700
        Re: isspace() executes without ctype header? Keith Thompson <kst-u@mib.org> - 2017-06-14 10:21 -0700
          Re: isspace() executes without ctype header? bartc <bc@freeuk.com> - 2017-06-14 19:12 +0100
            Re: isspace() executes without ctype header? Keith Thompson <kst-u@mib.org> - 2017-06-14 12:12 -0700
            Re: isspace() executes without ctype header? joel.rees@gmail.com - 2017-06-16 17:56 -0700
              Re: isspace() executes without ctype header? supercat@casperkitty.com - 2017-06-17 10:20 -0700
                Re: isspace() executes without ctype header? Robert Wessel <robertwessel2@yahoo.com> - 2017-06-18 00:25 -0500
                Re: isspace() executes without ctype header? supercat@casperkitty.com - 2017-06-19 09:01 -0700
                Re: isspace() executes without ctype header? Robert Wessel <robertwessel2@yahoo.com> - 2017-06-19 21:59 -0500

csiph-web