examples/before/source1.cpp
author William Roberts <williamr@symbian.org>
Fri, 26 Mar 2010 16:25:15 +0000
changeset 1 fd0863fd52e5
parent 0 fe474e3b08fb
permissions -rw-r--r--
Add script to summarise GCC errors (and warnings) from the "*_failures.html" logs Add script to grab the various *_failures.html files based on the HTML page for a "list of gcce package builds" Add the result of applying the summarising script to the original gcce platform build

// 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());
	}