diff -r 000000000000 -r fe474e3b08fb examples/after/source1.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/after/source1.cpp Mon Mar 22 21:41:09 2010 +0000 @@ -0,0 +1,41 @@ +// Copyright (c) 2010 Symbian Foundation Ltd. +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Symbian Foundation - Initial contribution +// +// Description: +// Examples of things which GCC does not like in the Symbian codebase. +// See the corresponding file in "after" for the preferred way to do it + +// Over-qualified class names + +#include "example_classes.h" + +TClass1::TClass1(int a, int b) + : iA(a), iB(b) + {} + +int TClass1::Average() + { + return (iA+iB)/2; + } + +int helper1(int a) + { + TClass1 c(a,11); + return c.Average(); + } + + +//------------------------- +// Helper function to avoid things being optimised away +int source1(void) + { + extern int unknown(void); + return helper1(unknown()); + }