public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kaz Kylheku <kaz@cafe.net>
To: "'Gabriel Dos Reis'" <Gabriel.Dos-Reis@dptmaths.ens-cachan.fr>,
	Joe Buck <jbuck@synopsys.com>
Cc: "g++@cygnus.com" <g++@cygnus.com>, "egcs@cygnus.com" <egcs@cygnus.com>
Subject: RE: implicit declaration in C++ considered harmful
Date: Wed, 08 Apr 1998 21:20:00 -0000	[thread overview]
Message-ID: <01BD62F9.19A03370.kaz@cafe.net> (raw)

On Wednesday, April 08, 1998 7:31 AM, Gabriel Dos Reis 
[SMTP:Gabriel.Dos-Reis@dptmaths.ens-cachan.fr] wrote:

> I think EGCS should be standard conforming and flags implicit
> declaration as an error not a warning.

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''.  A C++
compiler could treat undeclared functions as being implicitly declared
int (...) provided that it emits a diagnostic.

A conforming C compiler is allowed to translate even a
*syntactically* incorrect program, provided that it diagnoses
the syntax violation!

I believe I have seen compilers that produce
an a.out executable from an empty translation unit even
after diagnosing the error!

Another good example is compilers which allow incompatible
pointer assignments to pass by with a mere warning.
This is a constraint violation that requires a diagnostic; it
is as serious as a syntax error. The warning message
serves as an adequate diagnostic, however.


             reply	other threads:[~1998-04-08 21:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-08 21:20 Kaz Kylheku [this message]
1998-04-08 17:25 ` Joe Buck
1998-04-09 18:29 ` Martin von Loewis
  -- 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=01BD62F9.19A03370.kaz@cafe.net \
    --to=kaz@cafe.net \
    --cc=Gabriel.Dos-Reis@dptmaths.ens-cachan.fr \
    --cc=egcs@cygnus.com \
    --cc=g++@cygnus.com \
    --cc=jbuck@synopsys.com \
    /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).