FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian GCC

 
 
LinkBack Thread Tools
 
Old 01-08-2010, 08:40 PM
Sławomir Domagała
 
Default Bug#564274: g++-4.4: Program is compiling by g++, even there is a bad conversion

Package: g++-4.4
Version: 4.4.2-8
Severity: normal

I can't make shorter source code, where is this error, thus I've got all source code from my programme, but I've written which lines is the error.

Line from 156 to 161 in engine.cpp:

SingleWord sword;
//definition class SingleWord is in file "SingleWord.h"
for(ushort i = 0; i < number_words; i++) {
atime = time(NULL);
sword = courses[activ_course]->getSingleWord(swords[i]);
//courses is vector<Kurs>, definition class Kurs in file "kurs.hpp"
sword.setSpelling("cat");

But definition function getSingleWord(swords[i]) is:
SingleWord const* Kurs::getSingleWord(ushort number) const
{
if(number >= qAllSingleWords)throw Error::newError(Error::BAD_ARGUMENT, "", __LINE__, __FILE__);
return number < wordl1.size() ? wordl1[number] : wordl2[number-wordl1.size()];
}

The source code is compiling with no errors: "g++-4.4 -pedantic main.cpp engine.cpp nakladka2.cpp kurs.cpp SingleWord.cpp RegisterOfErrors.cpp -lboost_regex-mt -o main.e"

File are on http://godlark.com/upload/, example godlark.com/upload/main.cpp


-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages g++-4.4 depends on:
ii gcc-4.4 4.4.2-8 The GNU C compiler
ii gcc-4.4-base 4.4.2-8 The GNU Compiler Collection (base
ii libc6 2.10.2-5 Embedded GNU C Library: Shared lib
ii libgmp3c2 2:4.3.1+dfsg-3 Multiprecision arithmetic library
ii libmpfr1ldbl 2.4.2-3 multiple precision floating-point
ii libstdc++6-4.4-dev 4.4.2-8 The GNU Standard C++ Library v3 (d

g++-4.4 recommends no packages.

Versions of packages g++-4.4 suggests:
pn g++-4.4-multilib <none> (no description available)
pn gcc-4.4-doc <none> (no description available)
pn libstdc++6-4.4-dbg <none> (no description available)

-- no debconf information



--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-09-2010, 12:30 PM
Falk Hueffner
 
Default Bug#564274: g++-4.4: Program is compiling by g++, even there is a bad conversion

tags 564274 + moreinfo
thanks

On Fri, Jan 08, 2010 at 10:40:07PM +0100, S??awomir Domaga??a wrote:
> I can't make shorter source code, where is this error, thus I've got all source code from my programme, but I've written which lines is the error.
>
> Line from 156 to 161 in engine.cpp:
>
> SingleWord sword;
> //definition class SingleWord is in file "SingleWord.h"
> for(ushort i = 0; i < number_words; i++) {
> atime = time(NULL);
> sword = courses[activ_course]->getSingleWord(swords[i]);
> //courses is vector<Kurs>, definition class Kurs in file "kurs.hpp"
> sword.setSpelling("cat");
>
> But definition function getSingleWord(swords[i]) is:
> SingleWord const* Kurs::getSingleWord(ushort number) const
> {
> if(number >= qAllSingleWords)throw Error::newError(Error::BAD_ARGUMENT, "", __LINE__, __FILE__);
> return number < wordl1.size() ? wordl1[number] : wordl2[number-wordl1.size()];
> }
>
> The source code is compiling with no errors: "g++-4.4 -pedantic main.cpp engine.cpp nakladka2.cpp kurs.cpp SingleWord.cpp RegisterOfErrors.cpp -lboost_regex-mt -o main.e"

Please be more specific where you see a problem here. SingleWord has a
constructor which takes SingleWord const*, which will be invoked in
the assignment.

Falk



--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100309133015.GA15108@minet.uni-jena.de">http://lists.debian.org/20100309133015.GA15108@minet.uni-jena.de
 

Thread Tools




All times are GMT. The time now is 08:57 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org