<br><br><div class="gmail_quote">On Mon, Nov 19, 2012 at 2:08 PM, Dmitri Gribenko <span dir="ltr"><<a href="mailto:gribozavr@gmail.com" target="_blank">gribozavr@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Mon, Nov 19, 2012 at 3:02 PM, Sujit Kamthe<br>
<<a href="mailto:Sujit.Kamthe@kpitcummins.com">Sujit.Kamthe@kpitcummins.com</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> While I was running clang on a QT code, It flagged a compilation error in<br>
> a standard QT header file.<br>
><br>
> include\QtCore/qvector.h:565:12: error: missing 'typename'<br>
><br>
> prior to dependent type name 'QVector<T>::iterator'<br>
><br>
> Q_TYPENAME QVector<T>::iterator QVector<T>::insert(iterator before,...<br>
><br>
> ^~~~~~~~~~~~~~~~~~~~<br>
><br>
> include\QtCore/qvector.h:599:12: error: missing 'typename'<br>
><br>
> prior to dependent type name 'QVector<T>::iterator'<br>
><br>
> Q_TYPENAME QVector<T>::iterator QVector<T>::erase(iterator abegin,...<br>
><br>
> ^~~~~~~~~~~~~~~~~~~~<br>
><br>
><br>
><br>
> Attaching the header file along.<br>
<br>
</div>Hi Sujit,<br>
<br>
Unfortunately, the header file alone is not helpful. It is not<br>
obvious what Q_TYPENAME expands to. Could you please provide a<br>
preprocessed file? (Just replace -c with -E on the compilation<br>
command line that is failing.)<br>
<br>
Dmitri<br>
<br>
--<br>
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if<br>
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>>*/<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br>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.<br><br>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.<br>
<br>-- Matthieu<br>