[cfe-dev] Clang: QT header compilation error

Sujit Kamthe Sujit.Kamthe at kpitcummins.com
Tue Nov 20 22:46:43 PST 2012


Hi Matthieu, Dmitri,
I had sent some more inputs in attachments.
The email is being held until moderators approve it.

Regards,
Sujit Kamthe
BuildBox|KPITCummins Infosystems Ltd|Extn:3102 |Mobile:7709076120

From: Sujit Kamthe
Sent: Wednesday, November 21, 2012 9:32 AM
To: 'Matthieu Monrocq'; Dmitri Gribenko
Cc: Clang Developers
Subject: RE: [cfe-dev] Clang: QT header compilation error
Importance: High

Hi Matthieu, Dmitri,
Attaching the text file (log.txt) which has the output generated by command using -E option.
After some time clang thrown an exception and stopped working.
The console output is:
1 warning generated.
clang++: error: clang frontend command failed due to signal (use -v to see invoc
ation)
clang version 3.2 (trunk 167107)
Target: i686-pc-win32
Thread model: posix
clang++: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bug
s/ and include the crash backtrace, preprocessed source, and associated run scri
pt.
clang++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: C:/Users/AUTO~1.BUI/AppData/Local/Temp/XvvHmiLogi
c-246825.cpp
clang++: note: diagnostic msg: C:/Users/AUTO~1.BUI/AppData/Local/Temp/XvvHmiLogi
c-246825.sh
clang++: note: diagnostic msg:

********************


Attaching files specified in console output too.
Files are attached in zip format.
Please let me know in case more inputs are required.
I can run clang on some other file which generates same error message.
Thanks :)

Regards,
Sujit Kamthe
BuildBox|KPITCummins Infosystems Ltd|Extn:3102 |Mobile:7709076120

From: Matthieu Monrocq [mailto:matthieu.monrocq at gmail.com]
Sent: Monday, November 19, 2012 11:40 PM
To: Dmitri Gribenko
Cc: Sujit Kamthe; Clang Developers
Subject: Re: [cfe-dev] Clang: QT header compilation error


On Mon, Nov 19, 2012 at 2:08 PM, Dmitri Gribenko <gribozavr at gmail.com<mailto:gribozavr at gmail.com>> wrote:
On Mon, Nov 19, 2012 at 3:02 PM, Sujit Kamthe
<Sujit.Kamthe at kpitcummins.com<mailto:Sujit.Kamthe at kpitcummins.com>> wrote:
>
> Hi,
>
> While I was running clang on a QT code, It flagged a compilation error in
> a standard QT header file.
>
> include\QtCore/qvector.h:565:12: error: missing 'typename'
>
>       prior to dependent type name 'QVector<T>::iterator'
>
> Q_TYPENAME QVector<T>::iterator QVector<T>::insert(iterator before,...
>
>            ^~~~~~~~~~~~~~~~~~~~
>
> include\QtCore/qvector.h:599:12: error: missing 'typename'
>
>       prior to dependent type name 'QVector<T>::iterator'
>
> Q_TYPENAME QVector<T>::iterator QVector<T>::erase(iterator abegin,...
>
>            ^~~~~~~~~~~~~~~~~~~~
>
>
>
> Attaching the header file along.
Hi Sujit,

Unfortunately, the header file alone is not helpful.  It is not
obvious what Q_TYPENAME expands to.  Could you please provide a
preprocessed file?  (Just replace -c with -E on the compilation
command line that is failing.)

Dmitri

--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com<mailto:gribozavr at gmail.com>>*/
_______________________________________________
cfe-dev mailing list
cfe-dev at cs.uiuc.edu<mailto:cfe-dev at cs.uiuc.edu>
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

At a glance (given the diagnostic and the macro) I suppose that Q_TYPENAME should have expanded into typename (which would have made the code correct) and did not.

As such, the preprocessed source will only be of moderate usefulness (confirming the diagnosis) and we will also need the definition of this Q_TYPENAME macro. It's probably defined differently depending on the platform and mistake clang for a non-compliant compiler.

-- Matthieu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121121/a872b69b/attachment.html>


More information about the cfe-dev mailing list