MantisBT - GCC-XML
View Issue Details
0008068GCC-XMLpublic2008-11-10 06:222008-12-15 15:43
axel 
 
normalminoralways
closedfixed 
0008068: gccxml fails to parse MSVC9 STL with -D_DEBUG
Hi,

the following file
$ cat v.h
#include <vector>
cannot be parsed with the current trunk when selecting the debug STL implementation of MSVC9:
$ gccxml v.h -fxml=v.xml -D_DEBUG
In file included from C:/Program Files/Microsoft Visual Studio 9.0/VC/include/utility:6,
                 from F:/root/gccxml-2008-08-11-vc9/GCC_XML/Support/Vc9/Include/xutility:7,
                 from F:/root/gccxml-2008-08-11-vc9/GCC_XML/Support/Vc9/Include/iterator:6,
                 from F:/root/gccxml-2008-08-11-vc9/GCC_XML/Support/Vc9/Include/memory:6,
                 from F:/root/gccxml-2008-08-11-vc9/GCC_XML/Support/Vc9/Include/vector:6,
                 from v.h:1:
F:/root/gccxml-2008-08-11-vc9/GCC_XML/Support/Vc9/Include/iosfwd: In static member function 'static _Elem* std::char_traits<_Elem>::_Copy_s(_Elem*, size_t, const _Elem*, size_t)':
F:/root/gccxml-2008-08-11-vc9/GCC_XML/Support/Vc9/Include/iosfwd:253: error: there are no arguments to '__debugbreak' that depend on a template parameter, so a declaration of '__debugbreak' must be available

and many more. (Never mind the dir name of GCCXML in above example - it _is_ the current trunk.) I need to parse the debug version because it is binary incompatible with the release implementation. Hurray. Any chance of fixing that?

Cheers, Axel.
No tags attached.
diff crtdbg.h.diff (856) 2008-11-10 13:46
https://public.kitware.com/Bug/file/1842/crtdbg.h.diff
Issue History
2008-11-10 06:22axelNew Issue
2008-11-10 08:58Brad KingNote Added: 0014080
2008-11-10 13:46axelFile Added: crtdbg.h.diff
2008-11-10 13:47axelNote Added: 0014084
2008-12-02 06:54axelNote Added: 0014266
2008-12-15 15:43Brad KingNote Added: 0014352
2008-12-15 15:43Brad KingStatusnew => closed
2008-12-15 15:43Brad KingResolutionopen => fixed

Notes
(0014080)
Brad King   
2008-11-10 08:58   
Yes, of course, but I won't be able to get to it for a while. If you need a solution right away I suggest trying to fix it yourself (and I'll put a patch in when I get time to work on it).

Many of the headers I had to patch had this error for the release version. I thought I did the debug ones too. Is this a service pack or something? Anyway, you should find the declaration or definition of the missing templates elsewhere in the MS headers. Just copy it to create a forward declaration at the top of iosfwd or whatever header is complaining. Basically ths MS header has invalid C++ code but their compiler is okay with it.
(0014084)
axel   
2008-11-10 13:47   
No service pack, int'l version, nothing special. And I think you did add the decls - it still uses an undeclared intrinsic and a funny widened version of __FUNCTION__. Attached patch crtdbg.h.diff works for me.
(0014266)
axel   
2008-12-02 06:54   
Hi Brad,
any chance of getting this patch into the repository?
Cheers, Axel.
(0014352)
Brad King   
2008-12-15 15:43   
I've applied a similar patch and re-generated the patch gccxml applies on installation:

/cvsroot/GCC_XML/gccxml/GCC_XML/VcInstall/vc9Include.patch,v <-- GCC_XML/VcInstall/vc9Include.patch
new revision: 1.3; previous revision: 1.2