From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25678 invoked by alias); 19 Feb 2003 18:56:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 25663 invoked by uid 71); 19 Feb 2003 18:56:01 -0000 Date: Wed, 19 Feb 2003 18:56:00 -0000 Message-ID: <20030219185601.25662.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Mirsad Todorovac Subject: Re: c/2776: Wrong (misleading) error message in gcc 2.95.3 Reply-To: Mirsad Todorovac X-SW-Source: 2003-02/txt/msg00951.txt.bz2 List-Id: The following reply was made to PR c/2776; it has been noted by GNATS. From: Mirsad Todorovac To: Wolfgang Bangerth Cc: gcc-bugs@gcc.gnu.org, Subject: Re: c/2776: Wrong (misleading) error message in gcc 2.95.3 Date: Wed, 19 Feb 2003 19:48:38 +0100 (CET) On Wed, 19 Feb 2003, Wolfgang Bangerth wrote: > > > I apologize if I was wasting your precious timewith this as it now seems > > not so important issue, but I wasted so much time resolving it that I > > thought it was important to be resolved, or at least known issue. > > > > Thank you for your time. Mirsad > > No problem. This is just one of the cases where what you wanted would > require the compiler to second-guess what was your original intention. > Your example boiled down to > char *p = hip hop step; > The problem was the missing quotes (which the compiler can't know, since > the three tokens came from the preprocessor, and there might be many > possible interpretations of what the orginal intent was: > char *p = "hip hop step"; > char *p = hip+hop+step; // hip=char*, hop,step=int > char *p = hiphopstep; // hiphopstep=char* > etc. There is just not something sensible the compiler can say here, > except for "parse error" or so. > > With respect to the fact that the error message was totally > incomprehensible: most experienced programmers know that if something is > _really_ incomprehensible, the look at the preprocessed sources. I'd say > this is for exactly the same kind of experience you just made :-( Thank you for this explanation, which makes things much clearer. I understand that AI is probably not a good thing to install in a compiler, since a compiler has to be small and reliable, hasn't it? :-)) Be blessed, M.