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


Groups > comp.lang.c > #147805

Re: One works, the other doesn't?

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: One works, the other doesn't?
Date 2019-11-08 19:10 -0800
Organization None to speak of
Message-ID <ln5zjt4udk.fsf@kst-u.example.com> (permalink)
References (16 earlier) <YVYwF.401248$7ei.277876@fx36.am4> <lnimnv3q75.fsf@kst-u.example.com> <9PaxF.51636$vV6.4236@fx17.am4> <lneeyi45hh.fsf@kst-u.example.com> <sDjxF.77622$GwW.9533@fx08.am4>

Show all headers | View raw


Bart <bc@freeuk.com> writes:
> On 08/11/2019 17:56, Keith Thompson wrote:
>> Bart <bc@freeuk.com> writes:
>>> On 08/11/2019 05:14, Keith Thompson wrote:
>>>> Bart <bc@freeuk.com> writes:
>>>> [...]
>>>>> Tcc's treatment is a bit of a cheat, as its windows.h file is one header
>>>>> of 26K lines, while gcc's windows.h file involves nearly 100 headers,
>>>>> hundreds of nested #includes, and 200K lines (all IIRC).
>>>>
>>>> gcc has no windows.h file.
>>>
>>> Then how the hell does it manage to compile this program:
>>>
>>>      #include <windows.h>
>>>
>>> By magic? Stop being so bloody pedantic.
>>
>> By using a windows.h header provided by something other than gcc.
>> That's why your "program" failed to compile on my Ubuntu system with
>> "fatal error: windows.h: No such file or directory".
>
> The person I was replying to has acknowledged that adding windows.h to
> a program slows down gcc.

I don't doubt that.  What does it have to do with the point I was making?

> The probability is that anyone running gcc on Windows and using
> windows.h will be compiling the rather elaborate version that is
> normally used with that compiler.

Which version?

I have a Windows 10 laptop with Cygwin.  I have several different gcc
compilers installed under Cygwin:

    i586-pc-msdosdjgpp-gcc.exe
    i686-w64-mingw32-gcc.exe
    x86_64-pc-cygwin-gcc.exe (the default)
    x86_64-w64-mingw32-gcc.exe

If I run
    gcc -E c.c | wc
where c.c contains a single line:
    #include <windows.h>
I can see how much code the <windows.h> header expands to.
i586-pc-msdosdjgpp-gcc.exe can't find a <windows.h> header.  The others
all show different sizes.  These compilers are all gcc.  In all cases,
the <windows.h> header is not provided by gcc; it's provided by a
different Cygwin package.

If I run
    clang -E c.c | wc
it shows yet another different size.  It uses the same <windows.h>
header used with gcc -- which, again, is not provided by gcc (or
by clang).

Presumably I'd get similar results if I looked at C implementations
installed on Windows outside of Cygwin.

> I was pointing out that other compilers can come with more lightweight
> versions of windows.h, which coupled with a brisker compiler anyway,
> gives them a bit of misleading advantage.

Sure, some compilers are packaged with a windows.h header, among
other things.  gcc is not.  There are packages that include both
a version of gcc and a windows.h header.  There are also packages
that include just one or the other.

gcc does not provide <windows.h>.  It's likely that whatever package
you're using provides both gcc and <windows.h>.  That package is
not gcc.

> That windows.h doesn't normally compile on Linux with either tcc or
> gcc is not adding anything useful.

>> Stop pretending not to know things you obviously do know.
>
> No, just stop with the pedantics.

No, just stop trying to mislead people.

gcc has no windows.h file.  Someone who only read your posts wouldn't
know that.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for Philips Healthcare
void Void(void) { Void(); } /* The recursive call of the void */

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


Thread

One works, the other doesn't? DFS <nospam@dfs.com> - 2019-11-03 17:39 -0500
  Re: One works, the other doesn't? Bart <bc@freeuk.com> - 2019-11-04 00:20 +0000
  Re: One works, the other doesn't? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2019-11-04 06:53 +0000
  Re: One works, the other doesn't? James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-11-04 09:45 -0500
    Re: One works, the other doesn't? DFS <nospam@dfs.com> - 2019-11-05 10:34 -0500
      Re: One works, the other doesn't? mark.bluemel@gmail.com - 2019-11-05 07:45 -0800
        Re: One works, the other doesn't? DFS <nospam@dfs.com> - 2019-11-05 10:53 -0500
          Re: One works, the other doesn't? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2019-11-05 08:04 -0800
            Re: One works, the other doesn't? DFS <nospam@dfs.com> - 2019-11-05 11:29 -0500
              Re: One works, the other doesn't? David Brown <david.brown@hesbynett.no> - 2019-11-05 23:24 +0100
                Re: One works, the other doesn't? Bart <bc@freeuk.com> - 2019-11-05 23:06 +0000
                Re: One works, the other doesn't? Ian Collins <ian-news@hotmail.com> - 2019-11-06 12:31 +1300
                Re: One works, the other doesn't? Bart <bc@freeuk.com> - 2019-11-05 23:43 +0000
                Re: One works, the other doesn't? Ian Collins <ian-news@hotmail.com> - 2019-11-06 12:54 +1300
                Re: One works, the other doesn't? Bart <bc@freeuk.com> - 2019-11-06 01:35 +0000
                Re: One works, the other doesn't? Ian Collins <ian-news@hotmail.com> - 2019-11-06 15:16 +1300
                Re: One works, the other doesn't? Bart <bc@freeuk.com> - 2019-11-06 11:11 +0000
                Re: One works, the other doesn't? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2019-11-06 01:59 -0800
                Re: One works, the other doesn't? David Brown <david.brown@hesbynett.no> - 2019-11-06 11:35 +0100
                Re: One works, the other doesn't? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2019-11-06 08:57 -0800
                Re: One works, the other doesn't? Ian Collins <ian-news@hotmail.com> - 2019-11-07 07:24 +1300
                Re: One works, the other doesn't? David Brown <david.brown@hesbynett.no> - 2019-11-06 22:59 +0100
                Re: One works, the other doesn't? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2019-11-06 14:37 -0800
                Re: One works, the other doesn't? David Brown <david.brown@hesbynett.no> - 2019-11-07 00:58 +0100
                Re: One works, the other doesn't? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2019-11-07 02:08 -0800
                Re: One works, the other doesn't? David Brown <david.brown@hesbynett.no> - 2019-11-07 15:43 +0100
                Re: One works, the other doesn't? Robert Wessel <robertwessel2@yahoo.com> - 2019-11-07 16:15 -0600
                Re: One works, the other doesn't? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2019-11-10 20:01 +0000
                Re: One works, the other doesn't? Ian Collins <ian-news@hotmail.com> - 2019-11-11 15:26 +1300
                Re: One works, the other doesn't? David Brown <david.brown@hesbynett.no> - 2019-11-11 12:37 +0100
                Re: One works, the other doesn't? Ian Collins <ian-news@hotmail.com> - 2019-11-07 07:21 +1300
                Re: One works, the other doesn't? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2019-11-06 10:39 -0800
                Re: One works, the other doesn't? Ian Collins <ian-news@hotmail.com> - 2019-11-07 07:47 +1300
                Re: One works, the other doesn't? Ian Collins <ian-news@hotmail.com> - 2019-11-07 08:14 +1300
                Re: One works, the other doesn't? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2019-11-06 12:30 -0800
                Re: One works, the other doesn't? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2019-11-08 21:04 -0800
                Re: One works, the other doesn't? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2019-11-09 01:37 -0800
                Re: One works, the other doesn't? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2019-11-09 01:38 -0800
                Re: One works, the other doesn't? Ian Collins <ian-news@hotmail.com> - 2019-11-10 08:32 +1300
                Re: One works, the other doesn't? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2019-11-28 16:09 -0800
                Re: One works, the other doesn't? David Brown <david.brown@hesbynett.no> - 2019-11-29 11:33 +0100
                Re: One works, the other doesn't? Öö Tiib <ootiib@hot.ee> - 2019-11-30 14:20 -0800
                Re: One works, the other doesn't? Ian Collins <ian-news@hotmail.com> - 2019-12-01 12:15 +1300
                Re: One works, the other doesn't? David Brown <david.brown@hesbynett.no> - 2019-11-06 10:07 +0100
                Re: One works, the other doesn't? Bart <bc@freeuk.com> - 2019-11-06 10:58 +0000
                Re: One works, the other doesn't? David Brown <david.brown@hesbynett.no> - 2019-11-07 10:05 +0100
                Re: One works, the other doesn't? David Brown <david.brown@hesbynett.no> - 2019-11-06 09:52 +0100
                Re: One works, the other doesn't? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2019-11-06 00:56 -0800
                Re: One works, the other doesn't? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2019-11-06 01:00 -0800
                Re: One works, the other doesn't? Bart <bc@freeuk.com> - 2019-11-06 11:32 +0000
                Re: One works, the other doesn't? David Brown <david.brown@hesbynett.no> - 2019-11-06 23:11 +0100
                Re: One works, the other doesn't? Bart <bc@freeuk.com> - 2019-11-06 23:22 +0000
                Re: One works, the other doesn't? David Brown <david.brown@hesbynett.no> - 2019-11-07 01:04 +0100
                Re: One works, the other doesn't? Bart <bc@freeuk.com> - 2019-11-07 01:13 +0000
                Re: One works, the other doesn't? David Brown <david.brown@hesbynett.no> - 2019-11-07 10:22 +0100
                Re: One works, the other doesn't? Bart <bc@freeuk.com> - 2019-11-07 11:51 +0000
                Re: One works, the other doesn't? David Brown <david.brown@hesbynett.no> - 2019-11-07 15:58 +0100
                Re: One works, the other doesn't? Bart <bc@freeuk.com> - 2019-11-07 16:34 +0000
                Re: One works, the other doesn't? DFS <nospam@dfs.com> - 2019-11-07 12:40 -0500
                Re: One works, the other doesn't? Bart <bc@freeuk.com> - 2019-11-07 17:57 +0000
                Re: One works, the other doesn't? Keith Thompson <kst-u@mib.org> - 2019-11-07 21:14 -0800
                Re: One works, the other doesn't? Bart <bc@freeuk.com> - 2019-11-08 09:45 +0000
                Re: One works, the other doesn't? Keith Thompson <kst-u@mib.org> - 2019-11-08 09:56 -0800
                Re: One works, the other doesn't? Bart <bc@freeuk.com> - 2019-11-08 19:47 +0000
                Re: One works, the other doesn't? Ian Collins <ian-news@hotmail.com> - 2019-11-09 09:14 +1300
                Re: One works, the other doesn't? Keith Thompson <kst-u@mib.org> - 2019-11-08 19:10 -0800
                Re: One works, the other doesn't? Bart <bc@freeuk.com> - 2019-11-09 12:24 +0000
                Like an old married couple... (Was: One works, the other doesn't?) gazelle@shell.xmission.com (Kenny McCormack) - 2019-11-08 20:25 +0000
                Re: One works, the other doesn't? David Brown <david.brown@hesbynett.no> - 2019-11-07 19:58 +0100
                Re: One works, the other doesn't? Bart <bc@freeuk.com> - 2019-11-07 19:31 +0000
                Re: One works, the other doesn't? Ian Collins <ian-news@hotmail.com> - 2019-11-08 08:56 +1300
                Re: One works, the other doesn't? Bart <bc@freeuk.com> - 2019-11-07 20:06 +0000
                Re: One works, the other doesn't? Ian Collins <ian-news@hotmail.com> - 2019-11-08 09:21 +1300
                Re: One works, the other doesn't? Bart <bc@freeuk.com> - 2019-11-07 21:20 +0000
                Re: One works, the other doesn't? Ian Collins <ian-news@hotmail.com> - 2019-11-08 10:28 +1300
                Re: One works, the other doesn't? Bart <bc@freeuk.com> - 2019-11-07 22:35 +0000
                Re: One works, the other doesn't? Ian Collins <ian-news@hotmail.com> - 2019-11-09 09:22 +1300
                Re: One works, the other doesn't? jadill33@gmail.com - 2019-11-07 08:37 -0800
                Re: One works, the other doesn't? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2019-11-07 08:52 -0800
                Re: One works, the other doesn't? jadill33@gmail.com - 2019-11-07 09:52 -0800
                Re: One works, the other doesn't? David Brown <david.brown@hesbynett.no> - 2019-11-07 20:04 +0100
                Re: One works, the other doesn't? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2019-11-08 19:50 -0800
            Re: One works, the other doesn't? Bonita Montero <Bonita.Montero@gmail.com> - 2019-11-05 18:05 +0100
              Re: One works, the other doesn't? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2019-11-05 09:28 -0800
                Re: One works, the other doesn't? Bonita Montero <Bonita.Montero@gmail.com> - 2019-11-05 19:02 +0100
                Re: One works, the other doesn't? David Brown <david.brown@hesbynett.no> - 2019-11-05 23:21 +0100
                Re: One works, the other doesn't? Bonita Montero <Bonita.Montero@gmail.com> - 2019-11-06 18:36 +0100
      Re: One works, the other doesn't? James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-11-05 12:51 -0500
        Re: One works, the other doesn't? DFS <nospam@dfs.com> - 2019-11-05 18:35 -0500
          Re: One works, the other doesn't? Barry Schwarz <schwarzb@delq.com> - 2019-11-05 17:53 -0800
          Re: One works, the other doesn't? James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-11-06 09:33 -0500
      Re: One works, the other doesn't? Barry Schwarz <schwarzb@delq.com> - 2019-11-05 13:36 -0800
      Re: One works, the other doesn't? jak <nospam@please.ty> - 2019-11-07 10:17 +0100
        Re: One works, the other doesn't? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-11-07 12:19 +0000
          Re: One works, the other doesn't? jak <nospam@please.ty> - 2019-11-07 18:59 +0100
            Re: One works, the other doesn't? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-11-08 00:02 +0000
              Re: One works, the other doesn't? jak <nospam@please.ty> - 2019-11-20 10:54 +0100
                Re: One works, the other doesn't? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-11-20 11:14 +0000
                Re: One works, the other doesn't? jak <nospam@please.ty> - 2019-11-20 13:22 +0100
                Re: One works, the other doesn't? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2019-11-28 15:54 -0800
                Re: One works, the other doesn't? Keith Thompson <kst-u@mib.org> - 2019-11-20 08:42 -0800
                Re: One works, the other doesn't? Manfred <noname@add.invalid> - 2019-11-21 18:56 +0100
                Re: One works, the other doesn't? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-11-22 01:07 +0000
                Re: One works, the other doesn't? Manfred <noname@add.invalid> - 2019-11-22 15:27 +0100
                Re: One works, the other doesn't? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2019-11-28 15:47 -0800
        Re: One works, the other doesn't? DFS <nospam@dfs.com> - 2019-11-07 18:41 -0500
    Re: One works, the other doesn't? Bonita Montero <Bonita.Montero@gmail.com> - 2019-11-05 17:39 +0100
      Re: One works, the other doesn't? DFS <nospam@dfs.com> - 2019-11-05 11:47 -0500
        Re: One works, the other doesn't? Bonita Montero <Bonita.Montero@gmail.com> - 2019-11-05 17:54 +0100
          Re: One works, the other doesn't? luser droog <luser.droog@gmail.com> - 2019-11-05 09:00 -0800
        Re: One works, the other doesn't? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2019-11-08 21:02 -0800
          Re: One works, the other doesn't? DFS <nospam@dfs.com> - 2019-11-09 02:09 -0500

csiph-web