https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92634

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
   Last reconfirmed|                            |2019-11-23
         Resolution|DUPLICATE                   |---
     Ever confirmed|0                           |1

--- Comment #5 from Alan Modra <amodra at gmail dot com> ---
How is it that "clang does this" overrides the C standard?

And yes, I quite realise that the C standard does not explicitly say &p->field
does not dereference p, but the analogy with &p[i] is strong and the fact is
that &p->field does not cause a dereference.  So it ought to be good when p is
null.

I'll note that we are talking C here, not C++.

If you're going to close this bug again then do so with an explanation from a
language viewpoint as to why

void
lang_for_each_input_file (void (*func) (lang_input_statement_type *))
{
  lang_input_statement_type *f;

  for (f = &input_file_chain.head->input_statement;
       f != NULL;
       f = f->next_real_file)
    if (f->flags.real)
      func (f);
}

is wrong.  I'm genuinely interested, not just pissed off that you've closed my
bug..

Reply via email to