From: Martin von Loewis <martin@mira.isdn.cs.tu-berlin.de>
To: kaz@cafe.net
Cc: g++@cygnus.com, egcs@cygnus.com
Subject: Re: implicit declaration in C++ considered harmful
Date: Thu, 09 Apr 1998 18:29:00 -0000 [thread overview]
Message-ID: <199804091921.VAA00415@mira.isdn.cs.tu-berlin.de> (raw)
In-Reply-To: <01BD62F9.19A03370.kaz@cafe.net>
> The C and C++ standards don't distinguish errors and warnings,
> though I say this with somewhat less than full confidence because
> I'm not as familiar with the C++ draft as with the C standard.
>
> Both types of messages qualify as ``diagnostics''.
C++ is the same, here.
> A C++ compiler could treat undeclared functions as being implicitly
> declared int (...) provided that it emits a diagnostic.
Sure it could. I think Joe made his point: even though g++ is
currently compliant (in this respect), producing an error would be
also compliant.
The real question is which one is more desirable.
> A conforming C compiler is allowed to translate even a
> *syntactically* incorrect program, provided that it diagnoses the
> syntax violation!
Right. This doesn't mean the compiler *has* to produce a program from
incorrect source :-) It may provide some non-standard extensions,
whose usage it needs to diagnose. Users of these extensions would
expect that they get a working program.
The question is whether assuming implicit declarations for global
functions is a useful extension. I agree with Joe that it isn't.
Regards,
Martin
next prev parent reply other threads:[~1998-04-09 18:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-04-08 21:20 Kaz Kylheku
1998-04-08 17:25 ` Joe Buck
1998-04-09 18:29 ` Martin von Loewis [this message]
-- strict thread matches above, loose matches on Subject: below --
1998-04-08 2:13 Joe Buck
1998-04-08 7:35 ` Gabriel Dos Reis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199804091921.VAA00415@mira.isdn.cs.tu-berlin.de \
--to=martin@mira.isdn.cs.tu-berlin.de \
--cc=egcs@cygnus.com \
--cc=g++@cygnus.com \
--cc=kaz@cafe.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).