From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27060 invoked by alias); 3 Dec 2014 16:37:05 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 26971 invoked by uid 48); 3 Dec 2014 16:36:58 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM Date: Wed, 03 Dec 2014 16:37:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: preprocessor X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: emsr at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-12/txt/msg00391.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63831 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #16 from Jakub Jelinek --- That looks wrong. You really can't keep the __has_attribute__(...) in the preprocessed stream, it should either be not recognized at all (for languages other than C/C++ - like for CLK_ASM or when the callback is NULL (think about Fortran preprocessing; that is done as if it was C89, but of course the callback is not defined and expanding __has_attribute__ doesn't make much sense in that case). And, for C/C++ preprocessing without compilation, i.e. c-ppoutput.c, you should IMHO just do very similar if not the same thing as in c-lex.c. If something needs initializing and has not been initialized for the attribute lookup, just initialize it lazily.