This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug preprocessor/20907] New: long comments throw off line numbers


It seems that long comment blocks can throw off gcc's notion of the source line number. Here is a 
sample test case (also attached in case the line breaks get messed up pasting in):
/*
This is a really long comment. This is a really long comment. This is a really long comment. This is a 
really long comment. This is a really long comment. This is a really long comment. This is a really long 
comment. This is a really long comment. This is a really long comment. This is a really long comment. 
This is a really long comment. This is a really long comment. This is a really long comment. This is a 
really long comment. This is a really long comment. This is a really long comment.
 */
#warning test warning
#include <stdio.h>

int main(int argc, char *argv)
{
        printf("This is line %d\n", __LINE__);
}

-- 
           Summary: long comments throw off line numbers
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dpatel at apple dot com
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20907


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]