From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13067 invoked by alias); 19 Feb 2003 17:06:00 -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 13031 invoked by uid 71); 19 Feb 2003 17:06:00 -0000 Date: Wed, 19 Feb 2003 17:06:00 -0000 Message-ID: <20030219170600.13029.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Wolfgang Bangerth Subject: Re: c/2776: Wrong (misleading) error message in gcc 2.95.3 Reply-To: Wolfgang Bangerth X-SW-Source: 2003-02/txt/msg00942.txt.bz2 List-Id: The following reply was made to PR c/2776; it has been noted by GNATS. From: Wolfgang Bangerth To: Mirsad Todorovac Cc: gcc-bugs@gcc.gnu.org, Subject: Re: c/2776: Wrong (misleading) error message in gcc 2.95.3 Date: Wed, 19 Feb 2003 10:57:17 -0600 (CST) > 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 :-( W. ------------------------------------------------------------------------- Wolfgang Bangerth email: bangerth@ticam.utexas.edu www: http://www.ticam.utexas.edu/~bangerth/