On Monday, January 09, 2012 18:00:29 Gábor Lehel wrote:
> 2012/1/9 Gábor Lehel <illiss...@gmail.com>:
> > Perhaps we could use GCC's poison pragma[1] to make sure that no one
> > uses them? In some cases it would just be replacing one error message
> > with another (though perhaps a more user-friendly one), but in other
> > cases it would substitute an error for no error. Of course, it only
> > works with GCC. (TBF I haven't checked any other compilers.)
> > 
> > [1] http://gcc.gnu.org/onlinedocs/cpp/Pragmas.html
> 
> ...though that would also poison them for user code which I'm not sure
> we want, so I suppose you would only want to turn it on when building
> Qt itself.

I think this is a good idea. It doesn't matter that it only works with GCC. If 
any platform fails, the CI gate does not open for the patch.

There's a few more instances of 'check' in Qt, after clearing those up, I 
could write a patch to add the pragma to qglobal which user code could enable 
if desired (just like QT_STRICT_ITERATORS or QT_NO_KEYWORDS for example).

#ifdef QT_CHECK_MACRO_CONFLICTS
#pragma GCC poison check <others...>
#endif

Any suggestions for an alternative name to QT_CHECK_MACRO_CONFLICTS ? Simply 
'check' perhaps :) ?

Thanks,

-- 
Stephen Kelly <stephen.ke...@kdab.com> | Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-Independent Software Solutions

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to