Re: [Cooker] Bug with G++ and 9.0

2003-04-01 Thread Gwenole Beauchesne
On Tue, 1 Apr 2003, Pascal Terjan wrote:

> That means a return is missing. That's not an error so I guess there is 
> a default value (maybe 0 or it is undefined, I don't know the norm) when 
> return is missing.

No, it returns current garbage.




Re: [Cooker] Bug with G++ and 9.0

2003-03-31 Thread Pascal Terjan
Josh Seidel wrote:
I have a source file that compiles, but there is a
syntax error in the file. I also compiled with an
older version of g++ (I think it was 2.1 or 1.2, some
obsolete version that is on a SunOS machine I don't
have access to). In .NET (I do not own it, it is my
professors computer) it throws a Syntax error on line
156, that there is not a return statement. When I fix
then add the return statement on line 156 in .NET it
then compiles and gives the same output as g++ in
mandrake 9.0 which does not throw the syntax error.
When you ask for warnings( what you should always do), last one is :

project1.cpp: In member function `bool RoundRobinBlockedList::isEmpty() 
const':
project1.cpp:157: warning: control reaches end of non-void function

That means a return is missing. That's not an error so I guess there is 
a default value (maybe 0 or it is undefined, I don't know the norm) when 
return is missing.




[Cooker] Bug with G++ and 9.0

2003-03-31 Thread Josh Seidel
I am currently using Linux mandrake 9.0, with g++
--version:
g++ (GCC) 3.2 (Mandrake Linux 9.0 3.2-1mdk)
Copyright (C) 2002 Free Software Foundation, Inc.

I have a source file that compiles, but there is a
syntax error in the file. I also compiled with an
older version of g++ (I think it was 2.1 or 1.2, some
obsolete version that is on a SunOS machine I don't
have access to). In .NET (I do not own it, it is my
professors computer) it throws a Syntax error on line
156, that there is not a return statement. When I fix
then add the return statement on line 156 in .NET it
then compiles and gives the same output as g++ in
mandrake 9.0 which does not throw the syntax error.
  If possible is it a weird esoteric situation in the
standards, or is it a bug? I know it is an old version
of mandrake, but I could not find the right person on
the mandrake website to submit the bug other than this
list, and I know it is odd the same situation occurs
on a SunOS machine.
Description of the files:
-
project1.cpp the source code with the problem
proj1.txt the input file that the program loads to run
the round-robin "process" dispatch algorithm on. This
file is only needed to run it.

-Josh

__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

project1.cpp
Description: project1.cpp
2
1 1 .5 .1
2 2 .5 .1