From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5391 invoked by alias); 1 Jul 2002 21:16:03 -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 5364 invoked by uid 71); 1 Jul 2002 21:16:02 -0000 Date: Mon, 01 Jul 2002 14:16:00 -0000 Message-ID: <20020701211602.5363.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Neil Booth Subject: Re: preprocessor/7029: preprocessor should ignore #warning with -M Reply-To: Neil Booth X-SW-Source: 2002-07/txt/msg00019.txt.bz2 List-Id: The following reply was made to PR preprocessor/7029; it has been noted by GNATS. From: Neil Booth To: wolfgang.bangerth@iwr.uni-heidelberg.de, Zack Weinberg Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org Subject: Re: preprocessor/7029: preprocessor should ignore #warning with -M Date: Mon, 1 Jul 2002 22:04:49 +0100 > IMHO, warnings generated by #warning may be omitted when not > actually compiling code, for example when using -M to > generate dependency lists. They seem inappropriate for this > task. > >How-To-Repeat: > program> echo "#warning Warn about something" > x.cc > program> gcc -M x.cc > x.cc:1:2: warning: #warning Warn about something > x.o: x.cc Warnings are sent to stderr and the dpendency information isn't; so if you don't want the warnings you are free to pipe stderr to /dev/null. If you still wanted to retain errors but not warnings you can use -w, or check the compiler return code. So I disagree that there is any reason to change the existing behaviour, and want to close this PR. Do you agree, Zack? Neil.