home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 242,939 of 243,242   
   Michael S to Kaz Kylheku   
   Re: On Undefined Behavior   
   10 Jan 26 18:41:06   
   
   From: already5chosen@yahoo.com   
      
   On Fri, 9 Jan 2026 20:14:04 -0000 (UTC)   
   Kaz Kylheku <046-301-5902@kylheku.com> wrote:   
      
   > On 2026-01-09, Michael S  wrote:   
   > > On Fri, 09 Jan 2026 01:42:53 -0800   
   > > Tim Rentsch  wrote:   
   > >   
   > >>   
   > >> The important thing to realize is that the fundamental issue here   
   > >> is not a technical question but a social question.  In effect what   
   > >> you are asking is "why doesn't gcc (or clang, or whatever) do what   
   > >> I want or expect?".  The answer is different people want or expect   
   > >> different things.  For some people the behavior described is   
   > >> egregiously wrong and must be corrected immediately.  For other   
   > >> people the compiler is acting just as they think it should,   
   > >> nothing to see here, just fix the code and move on to the next   
   > >> bug.  Different people have different priorities.   
   > >>   
   > >   
   > > I have hard time imagining sort of people that would have   
   > > objections in case compiler generates the same code as today, but   
   > > issues diagnostic.   
   >   
   > If false positives occur for the diagnostic frequently, there   
   > will be legitimate complaint.   
   >   
   > If there is only a simple switch for it, it will get turned off   
   > and then it no longer serves its purpose of catching errors.   
   >   
   > There are all kinds of optimizations compilers commonly do that could   
   > also be erroneous situations. For instance, eliminating dead code.   
   >   
      
      
      
   I am not talking about  some general abstraction, but about specific   
   case.   
   You example is irrelevant.   
   -Warray-bounds exists for a long time.   
   -Warray-bounds=1 is a part of -Wall set.   
   Message 'array subscript nnn is above array bounds' fits this   
   particular case as well as any other case when compiler does not forget   
   to issue it.   
   Defending gcc behavior of not issuing the enabled warning in situation   
   where compiler certainly detected out of bound access sounds like   
   Stockholm syndrome.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca