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


Groups > comp.lang.c > #390293

Re: Two questions on arrays with size defined by variables

From Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups comp.lang.c
Subject Re: Two questions on arrays with size defined by variables
Date 2025-02-10 14:17 -0800
Organization None to speak of
Message-ID <87zfito36l.fsf@nosuchdomain.example.com> (permalink)
References (6 earlier) <vobol8$ts5l$1@dont-email.me> <vobuea$12bi8$2@dont-email.me> <voc76f$13jns$1@dont-email.me> <878qqep9rx.fsf@nosuchdomain.example.com> <vodgqk$1b1u0$1@dont-email.me>

Show all headers | View raw


Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
[...]
> I haven't checked what's actually valid in current or former
> "C" compilers or standards. As it's of minor relevance (to me)
> I just see whether the compiler accepts my main() declaration
> or not. (There was never a problem here, so why should I care.)

That was probably meant to be a rhetorical question, but ...

Because it might not always work in the future, when you port your
code to another system, when a new release of the compiler you're
using is installed, or during the next full moon.  If your code
has undefined behavior, it might appear to work perfectly until
it doesn't.

If your code is valid according to the C standard, you're less likely to
run into problems -- and if a compiler rejects your code you have a good
basis for a bug report.  If "void main()" or "main()" starts behaving
differently, or being rejected, you don't have much recourse.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

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


Thread

Two questions on arrays with size defined by variables Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-02-09 08:50 +0100
  Re: Two questions on arrays with size defined by variables Andrey Tarasevich <noone@noone.net> - 2025-02-09 00:06 -0800
    Re: Two questions on arrays with size defined by variables Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-02-09 10:54 +0100
      Re: Two questions on arrays with size defined by variables Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-02-09 02:25 -0800
        Re: Two questions on arrays with size defined by variables Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-02-09 18:17 +0100
          Re: Two questions on arrays with size defined by variables Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-02-09 16:38 -0800
            Re: Two questions on arrays with size defined by variables Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-02-10 03:35 +0100
              Re: Two questions on arrays with size defined by variables James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-02-09 23:03 -0500
              Re: Two questions on arrays with size defined by variables Andrey Tarasevich <noone@noone.net> - 2025-02-09 20:14 -0800
                Re: Two questions on arrays with size defined by variables Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-02-10 07:43 +0100
                Re: Two questions on arrays with size defined by variables Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-02-09 22:57 -0800
                Re: Two questions on arrays with size defined by variables Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-02-10 19:33 +0100
                Re: Two questions on arrays with size defined by variables Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-02-10 14:17 -0800
      Re: Two questions on arrays with size defined by variables Michael S <already5chosen@yahoo.com> - 2025-02-09 12:39 +0200
        Re: Two questions on arrays with size defined by variables Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-02-09 18:18 +0100
          Re: Two questions on arrays with size defined by variables Michael S <already5chosen@yahoo.com> - 2025-02-09 19:57 +0200
            Re: Two questions on arrays with size defined by variables Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-02-09 19:10 +0100
            Re: Two questions on arrays with size defined by variables Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-02-09 16:46 -0800
              Re: Two questions on arrays with size defined by variables Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-02-10 02:56 +0100
      Re: Two questions on arrays with size defined by variables antispam@fricas.org (Waldek Hebisch) - 2025-02-09 14:29 +0000
        Re: Two questions on arrays with size defined by variables Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-02-09 18:19 +0100
          Re: Two questions on arrays with size defined by variables Andrey Tarasevich <noone@noone.net> - 2025-02-09 09:29 -0800
            Re: Two questions on arrays with size defined by variables Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-02-09 18:46 +0100
              Re: Two questions on arrays with size defined by variables Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-02-09 18:53 +0100
                Re: Two questions on arrays with size defined by variables James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-02-09 15:55 -0500
                Re: Two questions on arrays with size defined by variables antispam@fricas.org (Waldek Hebisch) - 2025-02-10 01:36 +0000
                Re: Two questions on arrays with size defined by variables Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-02-10 03:01 +0100
                Re: Two questions on arrays with size defined by variables David Brown <david.brown@hesbynett.no> - 2025-02-10 11:39 +0100
                Re: Two questions on arrays with size defined by variables Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-02-10 18:57 +0100
                Re: Two questions on arrays with size defined by variables David Brown <david.brown@hesbynett.no> - 2025-02-10 19:19 +0100
              Re: Two questions on arrays with size defined by variables Michael S <already5chosen@yahoo.com> - 2025-02-09 20:19 +0200
                Re: Two questions on arrays with size defined by variables Opus <ifonly@youknew.org> - 2025-02-10 02:44 +0100
                Re: Two questions on arrays with size defined by variables Michael S <already5chosen@yahoo.com> - 2025-02-10 12:38 +0200
                Re: Two questions on arrays with size defined by variables Opus <ifonly@youknew.org> - 2025-02-10 23:08 +0100
          Re: Two questions on arrays with size defined by variables Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-02-09 15:50 -0800
            Re: Two questions on arrays with size defined by variables Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-02-10 03:12 +0100
              Re: Two questions on arrays with size defined by variables Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-02-10 07:27 +0100
                Re: Two questions on arrays with size defined by variables Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-02-09 22:49 -0800
                Re: Two questions on arrays with size defined by variables Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-02-10 19:14 +0100
      Re: Two questions on arrays with size defined by variables Andrey Tarasevich <noone@noone.net> - 2025-02-09 07:15 -0800
        Re: Two questions on arrays with size defined by variables Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-02-09 18:20 +0100
        Re: Two questions on arrays with size defined by variables James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-02-09 15:34 -0500
      Re: Two questions on arrays with size defined by variables James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-02-09 15:27 -0500
    Re: Two questions on arrays with size defined by variables James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-02-09 15:16 -0500
    Re: Two questions on arrays with size defined by variables Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-02-15 08:19 -0800

csiph-web