[Issue N157480] qt 4.2 and 4.3 issue with gcc 3.3.6

qt-bugs at trolltech.com qt-bugs at trolltech.com
Wed Apr 4 15:01:30 BST 2007


Hi Marc,

On Tuesday, 03. Apr 2007 23:27 Marc Espie wrote:
> OpenBSD still uses gcc 3.3.6. The foreach construct defined in
> QtCore/qglobal.h
> can barf on some usages. To wit, kdevelop 3.80.3 is unhappy with it:
>
> [  7%] Building CXX object lib/sublime/CMakeFiles/sublime.dir/area.o
> /spare/ports/x11/kde4/velop/w-kdevelop-3.80.3/kdevelop-3.80.3/lib/sublime/areawalkers.h:51:
> sorry, unimplemented: `
>    method_call_expr' not supported by dump_expr
> /spare/ports/x11/kde4/velop/w-kdevelop-3.80.3/kdevelop-3.80.3/lib/sublime/areawalkers.h:51:
> sorry, unimplemented: `
>    method_call_expr' not supported by dump_expr
>
>
> Those messages are produced by g++, and can be tracked down to a
> fragment
> of gcc/cp/error.c:
> #define sorry_for_unsupported_tree(T)
> \
>    sorry ("`%s' not supported by %s", tree_code_name[(int) TREE_CODE
>    (T)], \
>              __FUNCTION__)
>
>
> as far as fixing this goes, the following patch does it:
> --- src/corelib/global/qglobal.h.orig	Tue Apr  3 23:03:33 2007
> +++ src/corelib/global/qglobal.h	Tue Apr  3 23:06:04 2007
> @@ -1678,7 +1678,7 @@ typedef uint Flags;
>
>  #endif /* Q_NO_TYPESAFE_FLAGS */
>
> -#if defined(Q_CC_GNU) && !defined(Q_CC_INTEL)
> +#if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) &&
> !defined(Q_OS_OPENBSD)
>  /* make use of typeof-extension */
>  template <typename T>
>  class QForeachContainer {
>
> unless you have an easy way to detect which version of gcc is used...

Thanks for the patch, I've passed this on to the people responsible for
foreach and they will look into fixing this.

--
Jan Erik Hanssen
Trolltech ASA - http://www.trolltech.com
======================================================================
Now Playing: Qt Application Testing Made Easy!
-------------------------
froglogic and Trolltech will be hosting two free webcasts on automated GUI
testing for Qt applications on April 17. Register now and attend to get a 10% 
discount on Squish. 
======================================================================




More information about the kde-core-devel mailing list