View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013372GCC-XML(No Category)public2012-07-03 09:222012-07-26 10:36
ReporterChris Green 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Platformx86_64OSScientific Linux (based on RHEL)OS Version6.1
Summary0013372: gccxml cannot parse <limits> under GCC 4.7.1
DescriptionAn attempt to parse a header which includes <limits> under GCC 4.7.1 gives the following problem:

------------------------------------------------------------------------
/mnt/disk1/products/gcc/v4_7_1/Linux64bit+2.6-2.12/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/limits:1405: error: '__int128' was not declared in this scope
/mnt/disk1/products/gcc/v4_7_1/Linux64bit+2.6-2.12/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/limits:1405: error: template argument 1 is invalid
/mnt/disk1/products/gcc/v4_7_1/Linux64bit+2.6-2.12/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/limits:1479: error: template argument 1 is invalid
------------------------------------------------------------------------
Steps To ReproduceMake a file gccxml_test.h containing:
------------------------------------------------------------------------
#include <limits>
struct MyClass {
  int fred;
};
------------------------------------------------------------------------
Attempt to parse with:
gccxml gccxml_test.h
Additional InformationError can be made to go away by defining __STRICT_ANSI__, but not sure if this causes other problems.

Verified with HEAD downloaded 2012/07/02, compiled with GCC 4.7.1.
TagsNo tags attached.
Attached Files

 Relationships
related to 0012932closedBrad King gccxml lacks support for gcc 4.7 

  Notes
(0030128)
Brad King (manager)
2012-07-26 10:36

We simply need to disable __int128 in the libstdc++ configuration by overriding bits/c++config.h as follows:

$ cat GCC_XML/Support/GCC/4.7/bits/c++config.h
#include_next <bits/c++config.h>
/* GCC 4.2 parser does not support __int128 */
#undef _GLIBCXX_USE_INT128

/cvsroot/GCC_XML/gccxml/GCC_XML/Support/GCC/4.7/bits/c++config.h,v <-- c++config.h
initial revision: 1.1

 Issue History
Date Modified Username Field Change
2012-07-03 09:22 Chris Green New Issue
2012-07-26 08:02 Brad King Relationship added related to 0012932
2012-07-26 10:36 Brad King Note Added: 0030128
2012-07-26 10:36 Brad King Status new => resolved
2012-07-26 10:36 Brad King Resolution open => fixed
2012-07-26 10:36 Brad King Assigned To => Brad King


Copyright © 2000 - 2018 MantisBT Team