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


Groups > comp.lang.c > #103532

Re: How to find the problem in the object file

Path csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: How to find the problem in the object file
Date Thu, 09 Feb 2017 09:01:58 -0800
Organization None to speak of
Lines 65
Message-ID <ln60kjz4ah.fsf@kst-u.example.com> (permalink)
References <23ab01a2-5220-42cb-80b2-20a2b4a35d5c@googlegroups.com> <o6cut4$tfv$1@dont-email.me> <2beebc58-3f8f-46c6-bd10-e2ec3cf87906@googlegroups.com> <o6d0uj$5kt$1@dont-email.me> <lnfuk5eqeg.fsf@kst-u.example.com> <a84e9771-1ae7-4e4f-9602-259e6c25a7ce@googlegroups.com> <lny3xxd3ul.fsf@kst-u.example.com> <kfnfujwc1vn.fsf@x-alumni2.alumni.caltech.edu> <ln60ks78rd.fsf@kst-u.example.com> <kfna8a193yb.fsf@x-alumni2.alumni.caltech.edu> <lnshnt38oz.fsf@kst-u.example.com> <kfnfujo6ib1.fsf@x-alumni2.alumni.caltech.edu>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Injection-Info mx02.eternal-september.org; posting-host="ecbc845b6da81c9d4b7b978122232250"; logging-data="4496"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ADWAL8TvsVe/tUuUcaXKm"
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)
Cancel-Lock sha1:ANZuJ2QvBh6/z7A86xgSoZH1i64= sha1:CFjRt7Xrxnxu4yZrgDfG2PqUIA4=
Xref csiph.com comp.lang.c:103532

Show key headers only | View raw


Tim Rentsch <txr@alumni.caltech.edu> writes:
> Keith Thompson <kst-u@mib.org> writes:
>> Tim Rentsch <txr@alumni.caltech.edu> writes:
>> [...]
>>
>> (Context:  Removing non-prototype function declarations and definitions
>> from the language.)
>>
>>> My question here is a little different.  Knowing that other
>>> people consider them worth keeping, what explains the reaction
>>> of wanting to exclude them anyway?  Is it just a "my opinions
>>> count, and other people's don't" sort of attitude, or is it
>>> something else?
>>
>> I didn't say that other people's opinions don't count.  I have
>> my opinion, which I've already expressed, that old-style function
>> declarations and definitions should be removed from the language.
>
> I understand these comments.  You are expressing a personal value
> judgment.  Fine so far.
>
>> In C99, the committee removed implicit int from the language, and it
>> hadn't even been marked as obsolescent.  I agree with that decision,
>> and similar reasons apply to non-prototype function declarations
>> and definitions.  Removing them would make C a better language.
>
> These comments are what I don't understand.  Essentially everyone
> agreed that implicit int could be removed without any serious
> loss, especially since there was something to replace it (eg,
> either 'int' or 'void', depending).  Not everyone agrees that
> non-prototype function declarations can be removed without any
> serious loss, and IIUC what you're suggesting is that they be
> removed without any sort of replacement for the capability.  The
> two cases don't seem that analogous.  So I don't see how you get
> to your conclusion, unless it is something like discounting of
> other people's opinions.

In my opinion, non-prototype function declarations are essentially
useless, and they exist only for compatibility with code that
was written before prototypes were available.  I have never seen
a convincing use for them that would not be met at least as well
by prototypes.  Note that C++ gets along just fine without them.

The ANSI C committee marked them as obsolescent in 1989.  I agree
with that decision; I take it you do not.

You did recently offer an example.  As I recall (please correct me
if I'm describing it incorrectly) it involved some code that was in
an early stage of development; you had written some function calls
but not yet implemented the functions, so you added non-prototype
declarations to allow the program to compile.  Surely it would have
been only very slightly more difficult to add prototypes that match
the actual calls -- which could also have caught any errors where
the function is called inconsistently.

Do you have a compelling example where old-style function
declarations are actually useful?  Perhaps you've already posted
it here, but if so I can't recall it.  I also invite anyone else
to post examples.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

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


Thread

How to find the problem in the object file Alla _ <modelling.data@gmail.com> - 2017-01-26 05:14 -0800
  Re: How to find the problem in the object file BartC <bc@freeuk.com> - 2017-01-26 13:22 +0000
    Re: How to find the problem in the object file BartC <bc@freeuk.com> - 2017-01-26 13:37 +0000
  Re: How to find the problem in the object file Richard Heathfield <rjh@cpax.org.uk> - 2017-01-26 13:53 +0000
    Re: How to find the problem in the object file Alla _ <modelling.data@gmail.com> - 2017-01-26 06:20 -0800
      Re: How to find the problem in the object file BartC <bc@freeuk.com> - 2017-01-26 14:28 +0000
        Re: How to find the problem in the object file Alla _ <modelling.data@gmail.com> - 2017-01-26 06:48 -0800
        Re: How to find the problem in the object file Keith Thompson <kst-u@mib.org> - 2017-01-26 08:29 -0800
          Re: How to find the problem in the object file BartC <bc@freeuk.com> - 2017-01-26 16:54 +0000
            Re: How to find the problem in the object file luser droog <luser.droog@gmail.com> - 2017-01-26 09:01 -0800
            Re: How to find the problem in the object file Keith Thompson <kst-u@mib.org> - 2017-01-26 11:20 -0800
            Re: How to find the problem in the object file David Brown <david.brown@hesbynett.no> - 2017-01-26 23:12 +0100
              Re: How to find the problem in the object file BartC <bc@freeuk.com> - 2017-01-27 01:32 +0000
                Re: How to find the problem in the object file David Brown <david.brown@hesbynett.no> - 2017-01-27 09:50 +0100
          Re: How to find the problem in the object file supercat@casperkitty.com - 2017-01-26 09:19 -0800
            Re: How to find the problem in the object file Keith Thompson <kst-u@mib.org> - 2017-01-26 11:21 -0800
              Re: How to find the problem in the object file Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-02 02:39 -0800
                Re: How to find the problem in the object file fir <profesor.fir@gmail.com> - 2017-02-02 04:08 -0800
                Re: How to find the problem in the object file fir <profesor.fir@gmail.com> - 2017-02-02 04:31 -0800
                Re: How to find the problem in the object file Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-04 10:48 -0800
                Re: How to find the problem in the object file fir <profesor.fir@gmail.com> - 2017-02-04 11:07 -0800
                Re: How to find the problem in the object file Keith Thompson <kst-u@mib.org> - 2017-02-02 10:22 -0800
                Re: How to find the problem in the object file Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-04 11:00 -0800
                Re: How to find the problem in the object file Keith Thompson <kst-u@mib.org> - 2017-02-04 14:14 -0800
                Re: How to find the problem in the object file Malcolm McLean <malcolm.mclean5@btinternet.com> - 2017-02-04 20:02 -0800
                Re: How to find the problem in the object file supercat@casperkitty.com - 2017-02-05 13:39 -0800
                Re: How to find the problem in the object file Malcolm McLean <malcolm.mclean5@btinternet.com> - 2017-02-05 13:44 -0800
                Re: How to find the problem in the object file Keith Thompson <kst-u@mib.org> - 2017-02-05 13:56 -0800
                Re: How to find the problem in the object file Ian Collins <ian-news@hotmail.com> - 2017-02-06 13:07 +1300
                Re: How to find the problem in the object file Keith Thompson <kst-u@mib.org> - 2017-02-05 16:14 -0800
                Re: How to find the problem in the object file Ian Collins <ian-news@hotmail.com> - 2017-02-06 13:24 +1300
                Re: How to find the problem in the object file David Brown <david.brown@hesbynett.no> - 2017-02-06 01:59 +0100
                Re: How to find the problem in the object file Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-08 21:32 -0800
                Re: How to find the problem in the object file Keith Thompson <kst-u@mib.org> - 2017-02-05 13:54 -0800
                Re: How to find the problem in the object file Ian Collins <ian-news@hotmail.com> - 2017-02-06 11:18 +1300
                Re: How to find the problem in the object file Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-08 21:32 -0800
                Re: How to find the problem in the object file David Brown <david.brown@hesbynett.no> - 2017-02-09 10:33 +0100
                Re: How to find the problem in the object file supercat@casperkitty.com - 2017-02-09 09:10 -0800
                Re: How to find the problem in the object file Ian Collins <ian-news@hotmail.com> - 2017-02-10 08:01 +1300
                Re: How to find the problem in the object file Keith Thompson <kst-u@mib.org> - 2017-02-09 09:01 -0800
                Re: How to find the problem in the object file supercat@casperkitty.com - 2017-02-09 09:35 -0800
                Re: How to find the problem in the object file Keith Thompson <kst-u@mib.org> - 2017-02-09 09:57 -0800
                Re: How to find the problem in the object file Jean-Marc Bourguet <jm@bourguet.org> - 2017-02-09 20:45 +0100
                Re: How to find the problem in the object file supercat@casperkitty.com - 2017-02-09 14:59 -0800
                Re: How to find the problem in the object file Keith Thompson <kst-u@mib.org> - 2017-02-09 15:20 -0800
                Re: How to find the problem in the object file supercat@casperkitty.com - 2017-02-09 16:12 -0800
                Re: How to find the problem in the object file David Brown <david.brown@hesbynett.no> - 2017-02-13 10:21 +0100
                Re: How to find the problem in the object file supercat@casperkitty.com - 2017-02-13 07:20 -0800
                Re: How to find the problem in the object file Keith Thompson <kst-u@mib.org> - 2017-02-13 09:28 -0800
                Re: How to find the problem in the object file David Brown <david.brown@hesbynett.no> - 2017-02-13 09:55 +0100
                Re: How to find the problem in the object file Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-16 03:36 -0800
                Re: How to find the problem in the object file Jean-Marc Bourguet <jm@bourguet.org> - 2017-02-09 20:56 +0100
                Re: How to find the problem in the object file Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-16 07:00 -0800
                Re: How to find the problem in the object file David Brown <david.brown@hesbynett.no> - 2017-02-16 20:03 +0100
                Re: How to find the problem in the object file Ian Collins <ian-news@hotmail.com> - 2017-02-17 09:22 +1300
                Re: How to find the problem in the object file Keith Thompson <kst-u@mib.org> - 2017-02-16 13:07 -0800
                Re: How to find the problem in the object file Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-24 09:21 -0800
                Re: How to find the problem in the object file Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-24 09:02 -0800
                Re: How to find the problem in the object file Ian Collins <ian-news@hotmail.com> - 2017-02-25 09:05 +1300
                Re: How to find the problem in the object file Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-24 09:26 -0800
                Re: How to find the problem in the object file David Brown <david.brown@hesbynett.no> - 2017-02-25 19:38 +0100
                Re: How to find the problem in the object file Ian Collins <ian-news@hotmail.com> - 2017-02-03 07:32 +1300
                Re: How to find the problem in the object file Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-04 11:24 -0800
                Re: How to find the problem in the object file Robert Wessel <robertwessel2@yahoo.com> - 2017-02-02 16:56 -0600
                Re: How to find the problem in the object file Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-04 11:12 -0800
                Re: How to find the problem in the object file Robert Wessel <robertwessel2@yahoo.com> - 2017-02-06 04:47 -0600
                Re: How to find the problem in the object file Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-08 21:59 -0800
                Re: How to find the problem in the object file Keith Thompson <kst-u@mib.org> - 2017-02-09 09:13 -0800
                Re: How to find the problem in the object file Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-15 19:28 -0800
                Re: How to find the problem in the object file Malcolm McLean <malcolm.mclean5@btinternet.com> - 2017-02-24 17:48 -0800
                Re: How to find the problem in the object file Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-25 17:36 -0800
      Re: How to find the problem in the object file David Brown <david.brown@hesbynett.no> - 2017-01-26 15:51 +0100
        Re: How to find the problem in the object file Alla _ <modelling.data@gmail.com> - 2017-01-26 08:29 -0800
          Re: How to find the problem in the object file Richard Heathfield <rjh@cpax.org.uk> - 2017-01-26 16:34 +0000
            Re: How to find the problem in the object file Alla _ <modelling.data@gmail.com> - 2017-01-26 09:48 -0800
          Re: How to find the problem in the object file Keith Thompson <kst-u@mib.org> - 2017-01-26 08:52 -0800
          Re: How to find the problem in the object file James Kuyper <jameskuyper@verizon.net> - 2017-01-26 13:53 -0500
            Re: How to find the problem in the object file supercat@casperkitty.com - 2017-01-26 11:00 -0800
          Re: How to find the problem in the object file David Brown <david.brown@hesbynett.no> - 2017-01-26 23:49 +0100
            Re: How to find the problem in the object file Alla _ <modelling.data@gmail.com> - 2017-01-27 06:08 -0800
              Re: How to find the problem in the object file David Brown <david.brown@hesbynett.no> - 2017-01-27 16:20 +0100
        Re: How to find the problem in the object file Keith Thompson <kst-u@mib.org> - 2017-01-26 08:41 -0800
          Re: How to find the problem in the object file m.labanowicz@gmail.com - 2017-01-27 01:26 -0800

csiph-web