From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26083 invoked by alias); 29 Nov 2013 04:52: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 26043 invoked by uid 48); 29 Nov 2013 04:52:01 -0000 From: "mtewoodbury at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/58687] "#line __LINE__ ..." changes subsequent line numbers Date: Fri, 29 Nov 2013 04:52: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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mtewoodbury at gmail dot com X-Bugzilla-Status: SUSPENDED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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: 2013-11/txt/msg02967.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58687 --- Comment #21 from Max TenEyck Woodbury --- (In reply to Joseph S. Myers from comment #20) > Suspending pending a DR since I think the present code is correct and while > the standard is ambiguous I think the interpretation here strains the > wording of the standard. I'd proposed to close this if a DR (or other WG14 > document) isn't under consideration at the Parma meeting of WG14. A 'DR' is not necessary and is unlikely to be submitted. The ambiguity referred to is in the expansion of macros, not in the processing of directives. The elaborate description of the different forms of the '#line' (and other) directives makes it clear that expansion is not to take place until after the for the directive has been seen. Accepted usage is for '#line __LINE__' to leave the line numbering unchanged. Any other interpretation would require some form of expression evaluation in order to leave line numbering unchanged; a possibility that has been rejected.