From: Kai Henningsen <kai.extern@googlemail.com>
To: Arthur Schwarz <aschwarz1309@verizon.net>
Cc: gcc@gcc.gnu.org
Subject: Re: messaging
Date: Tue, 14 Apr 2009 13:02:00 -0000 [thread overview]
Message-ID: <49E4295E.7090308@googlemail.com> (raw)
In-Reply-To: <558592.50028.qm@web84001.mail.mud.yahoo.com>
Arthur Schwarz schrieb:
> In the following code fragment:
>
> # include <ios>
> # include <fstream>
> # include <istream>
>
> using namespace std;
> void CommandLine(int argc, char** argv);
> int main(int argc, char** argv) {
> CommandLine(argc, argv[]);
> ifstream x.open(argv[1], ios:in);
> ofstream y.open(argv[1], ios::in);
>
> return 0;
> };
>
> g++-4 messaging is:
>>> g++-4 x.cpp
> x.cpp: In function 'int main(int, char**)':
> x.cpp:8: error: expected primary-expression before ']' token
> x.cpp:10: error: expected primary-expression before ':' token
>
> A recommendation and reason for change is:
> 1: x.cpp:8 error: illegal to pass an array without subscript value as an
> argument
> The given message is accurate but non-expressive of the reason
> for failure.
Actually, in this case I'd say that the original message is perfectly
fine, and your suggestion is rather confusing. However, what one could
say here is something like "[] is only allowed in declarations".
> 3: cpp:10 error: illegal scope resolution operator ':'
> From memory, there are three uses of ':' in C++
> ':' label terminator, <label>:
> ':' case in a switch statement, case <value>:
> ':' scope resolution operator, "::"
> The given diagnostic message is deceptive.
Could perhaps say "':' is not a scope resolution operator", unless
someone comes up with a use case where it is ...
next prev parent reply other threads:[~2009-04-14 6:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-13 22:30 messaging Arthur Schwarz
2009-04-14 13:02 ` Kai Henningsen [this message]
2009-04-23 5:50 ` messaging Ian Lance Taylor
2009-04-14 16:58 messaging aschwarz1309
2009-04-14 19:34 ` messaging Kai Henningsen
2009-04-15 3:21 ` messaging Jonathan Wakely
2009-04-14 22:21 ` messaging James Dennett
2009-04-15 6:51 messaging Arthur Schwarz
2009-04-15 6:51 ` messaging Manuel López-Ibáñez
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=49E4295E.7090308@googlemail.com \
--to=kai.extern@googlemail.com \
--cc=aschwarz1309@verizon.net \
--cc=gcc@gcc.gnu.org \
/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).