While attempting to compile Xerces 2.7 on MacOS, I discovered what I think
is a bug in gcc, which I'm using for all phases of build. The c++ preprocessor
is emitting line number statements which have an inconsistent number of
arguments after the file name, e.g.:

# 1 "/usr/include/xercesc/util/XMLEnumerator.hpp" 1 3 4

vs.

# 25 "/usr/include/xercesc/util/XMLEnumerator.hpp" 3 4

and, in the former case (with the extra number), it seems to introduce some
compiler behavior where a subsequent template class definition will be
rejected with the misguiding error message "template with C linkage".

I have whittled the problem down to a single preprocessed source file that
exhibits this 
problem - will try to attach it once I can figure out Bugzilla's UI.

Thanks for your help and advice!

Alan


-- 
           Summary: bogus "template with C linkage" from erroneous #line
                    directives
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pitaman at austin dot rr dot com
  GCC host triplet: Mac OS 10.4
GCC target triplet: native


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

Reply via email to