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


Groups > comp.lang.c > #386905

Re: Baby X is bor nagain

From Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups comp.lang.c
Subject Re: Baby X is bor nagain
Date 2024-07-08 19:48 -0700
Organization A noiseless patient Spider
Message-ID <86sewj9t6x.fsf@linuxsc.com> (permalink)
References (16 earlier) <v5phah$168u$1@dont-email.me> <v5posa$2kq0$1@dont-email.me> <20240630121835.00000e48@yahoo.com> <v5rv37$j79k$1@dont-email.me> <20240630191018.00007961@yahoo.com>

Show all headers | View raw


Michael S <already5chosen@yahoo.com> writes:

> On Sun, 30 Jun 2024 17:54:14 +0200
> David Brown <david.brown@hesbynett.no> wrote:
>
>> On 30/06/2024 11:18, Michael S wrote:
>>
>>> On Sat, 29 Jun 2024 20:55:54 +0100
>>> bart <bc@freeuk.com> wrote:
>>>
>>>> On 29/06/2024 18:46, Richard Harnden wrote:
>>>>
>>>>> On 29/06/2024 15:14, bart wrote:
>>>>> [...]
>>>>>
>>>>>> My older bcc compiler reported 4 as a hard error unless an
>>>>>> override was used.
>>>>>
>>>>> But you didn't say anything about main's args.
>>>>
>>>> I did, indirectly.  The actual error was the use of "()" as an empty
>>>> parameter list (for any function, not just main, but my example
>>>> could also have been 'void H(){H(123);}').  If you tried to compile:
>>>>
>>>>      int main() {
>>>>          main(123);
>>>>      }
>>>>
>>>> then it wouldn't get past the () to the call.
>>>>
>>>> Eventually I dropped that restriction, and the reason was that so
>>>> much code used such parameter lists, for any function.
>>>>
>>>> Not because they wanted unchecked args (there are some legitimate
>>>> use-cases within function pointer types), but because so many
>>>> people assumed () meant zero parameters like (void).
>>>>
>>>> Why was such code so common?  Presumably because compilers said
>>>> nothing;  and they couldn't because the language allowed it.  If they
>>>> had required an override like mine did, more would have got the
>>>> message.
>>>
>>> I tried following code:
>>> int foo() { return 1; }
>>>
>>> Both MSVC and clang warn about it at high warnings level (-Wall for
>>> MSVC, -Wpedantic for clang).  But they dont warn at levels that most
>>> people use in practice (-W3 or -W4 for MSVC, -Wall for clang).
>>> gcc13 produces no warning even at -Wpedantic.  It does produce
>>> warning with '-Wpedantic -std=xxx' for all values of xxx except c23
>>> and gnu23.  The absence of warning for c23/gnu23 makes sense, the
>>> rest of gcc behavior - less so.
>>
>> gcc -Wpedantic makes very little sense without specifying a C
>> standard (rather than a gnu C standard).
>>
>> But why would you expect a warning from code that is perfectly legal
>> and well-defined C code, without explicitly enabling warnings that
>> check for particular style issues?  Non-prototype function
>> declarations are deprecated (since C99), but not removed from the
>> language until C23 (where that declaration is now a function
>> prototype).
>
> I expect warning at -Wall, because it is deprecated.  Those who do
> not want warning can turn it off explicitly with -Wno-strict-prototypes
> or whatever the name of the switch.

I would like to offer a different view.

To me the behavior of -Wall is kind of a "fuck you" from the gcc
people.  If a compile is done with, for example,

    gcc -std=c99 -pedantic -Wall ...

the empty () were not deprecated for C99 (and in fact still
are not since C23 hasn't been ratified yet).  The attitude
towards -Wall that it can change at any time - without regard
to what -std=c?? option is given - effectively makes it
useless, because it can't be relied on.  gcc has any number
of diagnostic options, but many or most of the prominent ones
change over time and so have to be avoided if one wants
repeatable behavior.  I would happily settle for things like,
say, -Wall99 or -Wall11 (that's two ells and two ones), but
of course gcc doesn't provide stable diagnostic aggregates,
only frustratingly ever-changing ones.

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


Thread

Re: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-06-24 16:09 +0300
  Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-24 15:00 +0100
    Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-06-24 17:09 +0200
      Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-24 17:19 +0100
        Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-06-24 19:15 +0200
          Re: Baby X is bor nagain scott@slp53.sl.home (Scott Lurndal) - 2024-06-24 17:25 +0000
            Re: Baby X is bor nagain "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-06-25 20:29 -0700
          Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-24 22:15 +0100
            Re: Baby X is bor nagain scott@slp53.sl.home (Scott Lurndal) - 2024-06-24 21:34 +0000
              Re: Baby X is bor nagain scott@slp53.sl.home (Scott Lurndal) - 2024-06-24 22:03 +0000
            Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-06-25 10:19 +0200
              Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-25 12:18 +0100
                Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-06-25 17:08 +0200
                Re: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-06-26 00:28 +0300
                Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-06-26 09:17 +0200
                Re: Baby X is bor nagain DFS <nospam@dfs.com> - 2024-06-25 12:52 -0400
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-25 20:39 +0100
                Re: Baby X is bor nagain DFS <nospam@dfs.com> - 2024-06-25 16:28 -0400
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-26 00:23 +0100
                Re: Baby X is bor nagain Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-06-25 13:13 -0700
                Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-06-26 09:23 +0200
                Re: Baby X is bor nagain Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-06-26 15:18 -0700
                Re: Baby X is bor nagain Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-06-27 15:45 -0700
                Re: Baby X is bor nagain Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-06-25 12:04 -0700
                Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-06-26 09:21 +0200
                Re: Baby X is bor nagain Kaz Kylheku <643-408-1753@kylheku.com> - 2024-06-26 08:31 +0000
      Re: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-06-25 13:15 +0300
        Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-06-25 12:56 +0200
    Re: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-06-24 18:10 +0300
      Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-24 17:51 +0100
        Re: Baby X is bor nagain scott@slp53.sl.home (Scott Lurndal) - 2024-06-24 17:02 +0000
          Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-24 18:50 +0100
            Re: Baby X is bor nagain scott@slp53.sl.home (Scott Lurndal) - 2024-06-24 18:10 +0000
              Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-24 20:33 +0100
              Re: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-06-25 11:36 +0300
                Re: Baby X is bor nagain scott@slp53.sl.home (Scott Lurndal) - 2024-06-25 13:48 +0000
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-25 15:56 +0100
                Re: Baby X is bor nagain scott@slp53.sl.home (Scott Lurndal) - 2024-06-25 15:08 +0000
                Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-06-25 17:12 +0200
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-25 16:59 +0100
                Re: Baby X is bor nagain scott@slp53.sl.home (Scott Lurndal) - 2024-06-25 16:27 +0000
                Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-06-25 19:51 +0200
                Re: Baby X is bor nagain scott@slp53.sl.home (Scott Lurndal) - 2024-06-25 18:11 +0000
                Re: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-06-26 00:42 +0300
                Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-06-26 09:35 +0200
                Re: Baby X is bor nagain Ben Bacarisse <ben@bsb.me.uk> - 2024-06-26 13:15 +0100
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-27 12:16 +0100
                Re: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-06-27 15:24 +0300
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-27 14:13 +0100
                Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-06-27 14:31 +0200
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-27 17:28 +0100
                Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-06-27 21:51 +0200
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-27 22:47 +0100
                Re: Baby X is bor nagain Kaz Kylheku <643-408-1753@kylheku.com> - 2024-06-28 03:23 +0000
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-28 11:19 +0100
                Re: Baby X is bor nagain Kaz Kylheku <643-408-1753@kylheku.com> - 2024-06-28 10:26 +0000
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-29 15:14 +0100
                Re: Baby X is bor nagain Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-06-29 08:38 -0700
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-29 17:11 +0100
                Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-06-29 19:42 +0200
                Re: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-06-29 21:49 +0300
                Re: Baby X is bor nagain Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-06-29 15:43 -0700
                Re: Baby X is bor nagain Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-06-30 01:43 -0700
                Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-06-30 11:23 +0200
                Re: Baby X is bor nagain Kaz Kylheku <643-408-1753@kylheku.com> - 2024-06-30 00:36 +0000
                Re: Baby X is bor nagain James Kuyper <jameskuyper@alumni.caltech.edu> - 2024-07-03 17:12 -0400
                Re: Baby X is bor nagain Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-06-30 01:49 -0700
                Re: Baby X is bor nagain Richard Harnden <richard.nospam@gmail.invalid> - 2024-06-29 18:46 +0100
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-29 20:55 +0100
                Re: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-06-30 12:18 +0300
                Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-06-30 17:54 +0200
                Re: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-06-30 19:10 +0300
                Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-07-01 00:20 +0200
                Re: Baby X is bor nagain Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-07-08 19:48 -0700
                Re: Baby X is bor nagain Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-06-29 16:23 -0700
                Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-06-29 10:47 +0200
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-29 12:11 +0100
                Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-06-30 11:05 +0200
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-30 11:48 +0100
                Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-06-30 17:47 +0200
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-07-01 12:22 +0100
                Re: Baby X is bor nagain Ben Bacarisse <ben@bsb.me.uk> - 2024-07-01 13:09 +0100
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-07-01 15:14 +0100
                Re: Baby X is bor nagain Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-07-01 14:20 -0700
                Re: Baby X is bor nagain Ben Bacarisse <ben@bsb.me.uk> - 2024-07-02 16:00 +0100
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-07-02 16:44 +0100
                Re: Baby X is bor nagain Ben Bacarisse <ben@bsb.me.uk> - 2024-07-03 00:58 +0100
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-07-03 01:23 +0100
                Re: Baby X is bor nagain Kaz Kylheku <643-408-1753@kylheku.com> - 2024-07-03 00:47 +0000
                Re: Baby X is bor nagain Kaz Kylheku <643-408-1753@kylheku.com> - 2024-07-03 01:18 +0000
                Re: Baby X is bor nagain Ben Bacarisse <ben@bsb.me.uk> - 2024-07-03 01:54 +0100
                Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-07-03 09:08 +0200
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-07-03 10:36 +0100
                Re: Baby X is bor nagain DFS <nospam@dfs.com> - 2024-07-03 09:41 -0400
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-07-03 17:58 +0100
                Re: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-07-03 21:33 +0300
                Re: Baby X is bor nagain Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2024-07-04 09:14 +0100
                Re: Baby X is bor nagain Ben Bacarisse <ben@bsb.me.uk> - 2024-07-03 22:58 +0100
                Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-07-04 10:24 +0200
                Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-07-04 10:18 +0200
                Re: Baby X is bor nagain Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2024-07-03 11:23 +0100
                Re: Baby X is bor nagain Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-07-03 13:13 -0700
                Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-06-28 06:56 +0200
                Re: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-06-28 11:20 +0300
                Re: Baby X is bor nagain scott@slp53.sl.home (Scott Lurndal) - 2024-06-28 13:52 +0000
                Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-06-29 11:05 +0200
                Re: Baby X is bor nagain Kaz Kylheku <643-408-1753@kylheku.com> - 2024-06-29 09:15 +0000
                Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-06-29 19:11 +0200
                Re: Baby X is bor nagain Richard Harnden <richard.nospam@gmail.invalid> - 2024-06-29 18:51 +0100
                Re: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-06-29 21:56 +0300
                Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-06-30 11:17 +0200
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-28 11:05 +0100
                Re: Baby X is bor nagain David Brown <david.brown@hesbynett.no> - 2024-06-28 06:57 +0200
                Re: Baby X is bor nagain Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-06-27 13:23 -0700
                Re: Baby X is bor nagain Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-06-27 15:44 -0700
                Re: Baby X is bor nagain Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-06-27 17:50 -0700
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-28 00:16 +0100
                Re: Baby X is bor nagain scott@slp53.sl.home (Scott Lurndal) - 2024-06-27 23:58 +0000
                Re: Baby X is bor nagain Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-06-27 18:21 -0700
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-28 11:15 +0100
                Re: Baby X is bor nagain scott@slp53.sl.home (Scott Lurndal) - 2024-06-28 13:53 +0000
                Re: Baby X is bor nagain Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-06-27 18:08 -0700
                Re: Baby X is bor nagain Kaz Kylheku <643-408-1753@kylheku.com> - 2024-06-28 03:30 +0000
                Re: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-06-28 11:11 +0300
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-28 11:41 +0100
                Re: Baby X is bor nagain scott@slp53.sl.home (Scott Lurndal) - 2024-06-28 13:48 +0000
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-28 15:36 +0100
                Re: Baby X is bor nagain scott@slp53.sl.home (Scott Lurndal) - 2024-06-28 15:48 +0000
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-28 20:37 +0100
                Re: Baby X is bor nagain bart <bc@freeuk.com> - 2024-06-28 15:42 +0100
                Re: Baby X is bor nagain scott@slp53.sl.home (Scott Lurndal) - 2024-06-28 16:01 +0000
                Re: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-06-28 19:45 +0300
                tcc - first impression. Was: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-07-01 20:09 +0300
                Re: tcc - first impression. Was: Baby X is bor nagain Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-07-01 12:14 -0700
                Re: tcc - first impression. Was: Baby X is bor nagain Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-07-01 14:48 -0700
                Re: tcc - first impression. Was: Baby X is bor nagain Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-07-01 15:09 -0700
                Re: tcc - first impression. Was: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-07-02 11:54 +0300
                Re: tcc - first impression. Was: Baby X is bor nagain bart <bc@freeuk.com> - 2024-07-02 12:22 +0100
                Re: tcc - first impression. Was: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-07-02 16:27 +0300
                Re: tcc - first impression. Was: Baby X is bor nagain bart <bc@freeuk.com> - 2024-07-02 15:18 +0100
                Re: tcc - first impression. Was: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-07-02 17:55 +0300
                Re: tcc - first impression. Was: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-07-03 13:57 +0300
                Re: tcc - first impression. Was: Baby X is bor nagain Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-07-02 06:50 -0700
                Re: tcc - first impression. Was: Baby X is bor nagain Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-07-02 06:47 -0700
                Re: tcc - first impression. Was: Baby X is bor nagain James Kuyper <jameskuyper@alumni.caltech.edu> - 2024-07-02 11:50 -0400
                Re: tcc - first impression. Was: Baby X is bor nagain Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2024-07-02 10:35 +0100
                Re: tcc - first impression. Was: Baby X is bor nagain scott@slp53.sl.home (Scott Lurndal) - 2024-07-02 14:33 +0000
                Re: tcc - first impression. Was: Baby X is bor nagain Ben Bacarisse <ben@bsb.me.uk> - 2024-07-02 15:43 +0100
                Re: tcc - first impression. Was: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-07-02 18:17 +0300
                Re: tcc - first impression. Was: Baby X is bor nagain Ben Bacarisse <ben@bsb.me.uk> - 2024-07-02 16:32 +0100
                Re: tcc - first impression. Was: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-07-02 18:45 +0300
                Re: tcc - first impression. Was: Baby X is bor nagain Ben Bacarisse <ben@bsb.me.uk> - 2024-07-02 17:12 +0100
                Re: tcc - first impression. Was: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-07-03 00:42 +0300
                Re: tcc - first impression. Was: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-07-04 00:04 +0300
                Re: tcc - first impression. Was: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-07-03 21:07 +0300
                Re: Baby X is bor nagain Ben Bacarisse <ben@bsb.me.uk> - 2024-06-27 23:24 +0100
                Re: Baby X is bor nagain Richard Harnden <richard.nospam@gmail.invalid> - 2024-06-28 00:44 +0100
        Re: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-06-24 20:41 +0300
      Re: Baby X is bor nagain Michael S <already5chosen@yahoo.com> - 2024-06-28 19:39 +0300

csiph-web