Andrew Bachmann | 1 Jan 2004 02:20
Picon

Re: -Wmissing-prototypes

"Axel Dörfler" <axeld@...> wrote:
> "Andrew Bachmann" <shatty@...> wrote:
> > This seems like the winning suggestion to me.  Just another wacky C 
> > thing.
> > This is why I don't do drivers I guess. (heh)
> 
> That's not wacky, that's a useful feature. It's even something that's 
> missing (a bug in the specs as I would see it) in C++; you cannot 
> define a class only locally - it's always visible from the outside 
> until you strip the symbols manually.

This is not quite correct, I can have two files separately define the
same class with no qualifiers and have no problems linking-- or so
it seemed in my test case.  Personally I think that declaring things
to be static is the backwards way, [instead of explicitly granting
visibility] but my personal opinion doesn't count for much in this
arena. :-)

Andrew

Nathan Whitehorn | 1 Jan 2004 03:38
Favicon

Re: -Wmissing-prototypes

> "Axel Dörfler" <axeld@...> wrote:
> > "Andrew Bachmann" <shatty@...> wrote:
> > > This seems like the winning suggestion to me.  Just another wacky 
> > > C 
> > > thing.
> > > This is why I don't do drivers I guess. (heh)
> > 
> > That's not wacky, that's a useful feature. It's even something 
> > that's 
> > missing (a bug in the specs as I would see it) in C++; you cannot 
> > define a class only locally - it's always visible from the outside 
> > until you strip the symbols manually.
> 
> This is not quite correct, I can have two files separately define the
> same class with no qualifiers and have no problems linking-- or so
> it seemed in my test case.  Personally I think that declaring things
> to be static is the backwards way, [instead of explicitly granting
> visibility] but my personal opinion doesn't count for much in this
> arena. :-)

This is why mwcc is a better compiler than gcc :P
-Nathan 

Jerome Duval | 2 Jan 2004 11:41
Favicon

compiling c++ classes with virtual functions

Hello,

i'm compiling several c++ classes and i'm getting warnings about
functions hidden by others in child classes.

Class A
virtual void function1(int, int, int);
virtual void function1();

Class B : Class A
virtual void function1();

the warning i'm getting says :
void function1(int, int, int) in class A is hidden by void function1() in
class B.

What do you think i can do to avoid this warning ? Renaming the
function isn't the best mean because this shouldn't happen in my mind.
Maybe it is a bug of the compiler ?

--

-- 
Best regards,
 Jerome                          mailto:korli@...

Mahmoud Al Gammal | 2 Jan 2004 14:27

Re: compiling c++ classes with virtual functions

I'm borrowing these words from the BeBook:
"due to the peculiarities of C++, overriding any version of an overloaded 
function hides all versions of the function".
So, in order to access the hidden function you can either explicitly call 
A::function1(x, y, z), or have function1(int, int, int) implemented in class 
B again.

Mahmoud Al Gammal

>Hello,

>i'm compiling several c++ classes and i'm getting warnings about
>functions hidden by others in child classes.

>Class A
>virtual void function1(int, int, int);
>virtual void function1();

>Class B : Class A
>virtual void function1();

>the warning i'm getting says :
>void function1(int, int, int) in class A is hidden by void function1() in
>class B.

>What do you think i can do to avoid this warning ? Renaming the
>function isn't the best mean because this shouldn't happen in my mind.
>Maybe it is a bug of the compiler ?

>-- 
(Continue reading)

Matthijs Hollemans | 2 Jan 2004 12:29

Re: compiling c++ classes with virtual functions

> i'm compiling several c++ classes and i'm getting warnings about
> functions hidden by others in child classes.

[...]

> Maybe it is a bug of the compiler ?

IIRC, this is a C++ feature. If you want users of class B to be able to call
function1(int, int, int), you also have to provide it in class B.
Alternatively, give the two functions different names.

-Matthijs

kevin.lawton | 2 Jan 2004 16:29
Favicon

Re: Fat muesli-induced troll - Was: Locale Kit

| -----Original Message-----
| From: openbeos-bounce@...
| [mailto:openbeos-bounce@...]On Behalf Of Helmar Rudolph
| Sent: 23 December 2003 12:48
| To: openbeos@...
| Subject: [openbeos] Fat muesli-induced troll - Was: Locale Kit
| 
| Kevin wrote:
| 
| > Consider why America speaks a form of English, as opposed
| > to one of the native American Indian tribal dialects or
| > even Norse (as there were Viking settlers in the US
| > centuries before Columbus arrived). 
| 
| IIRC it was only one (1) vote that decided on English as the
| main language for the USA and not German. That was more than
| 200 years ago, and they haven't recovered since! Shows you
| what kind of implications a simple mistake like that can
| have on humankind. 
My point was that neither English nor German is one of the native Northern American languages. 
BTW: Immediately before the vote was taken, what language were they all speaking ? 
| 
| English is chockfull with idiosyncrasies that don't make
| sense to anyone; even words where only the first letter is
| different are pronounced differently. It's "pear" [pâr] but
| "fear" [fîr]. 
Yes, but 'pare' and 'fare' rhyme as do 'pair' and 'fair'. Two out of three ain't bad !  
What else would you reasonably expect from a language which has evolved to adsorb many immigrant words into
its vocabulary ? 
Just because those language 'features' don't make sense to your limited comprehension doesn't mean that
(Continue reading)

Ingo Weinhold | 2 Jan 2004 18:30
Picon

Re: Fat muesli-induced troll - Was: Locale Kit

On 2004-01-02 at 16:29:16 [+0100], kevin.lawton@... wrote:
[...]
> | Have a peaceful festive season.
> Right !  The festering season is over now so let's get back to the healthy 
> discussions.

Or stop it altogether on this list. I thought we were already through with 
that it doesn't belong here. If you think, you can add something productive, 
please join the OT devel list as Axel suggested in the first place. Note 
though, that the list is development focussed. Discussions whether Americans 
mistreat the English language, whether German should be abolished, or whether 
Afrikaans is easy to learn and should be made the world language don't belong 
there either.

CU, Ingo

kevin.lawton | 2 Jan 2004 19:39
Favicon

Re: Fat muesli-induced troll - Was: Locale Kit

Ingo, 
If you are the list moderator then I suggest that you either do something about the muesli-munching troll
who insulted me or at least allow me the right of reply. 
'OT devel list' - sorry, can't find it - any chance of a link ? 
BTW: When you use the acronym 'OT', do you mean 'On Topic', 'Off Topic' or something completely different ? 
Thanks,
Kevin. 

| -----Original Message-----
| From: openbeos-bounce@...
| [mailto:openbeos-bounce@...]On Behalf Of Ingo Weinhold
| Sent: 02 January 2004 17:31
| To: openbeos@...
| Subject: [openbeos] Re: Fat muesli-induced troll - Was: Locale Kit
| 
| 
| On 2004-01-02 at 16:29:16 [+0100], kevin.lawton@... wrote:
| [...]
| > | Have a peaceful festive season.
| > Right !  The festering season is over now so let's get back 
| to the healthy 
| > discussions.
| 
| Or stop it altogether on this list. I thought we were already 
| through with 
| that it doesn't belong here. If you think, you can add 
| something productive, 
| please join the OT devel list as Axel suggested in the first 
| place. Note 
| though, that the list is development focussed. Discussions 
(Continue reading)

Michael Phipps | 2 Jan 2004 19:41
Picon

Re: Fat muesli-induced troll - Was: Locale Kit

I am list moderator and I didn't respond because Ingo did a superb job 
of it.
This stuff is way off topic.
As far as "right of reply", well, no. Someone, at some point, has to cut 
it off and that is here and now. No more.
OT == OpenTracker. But, honestly, I doubt that this thread even has any 
value there. You can't and won't change the world's preferences on 
language through an email forum. Axel (and he alone) may feel free to 
correct me on this, but I would believe that that list, like this one, 
is for real discussions about things that are within our scope and 
control. The languages that people speak and the operating systems that 
they choose to run are not within scope or control. Therefore, they are 
off topic.

Michael

kevin.lawton@... wrote:

>Ingo, 
>If you are the list moderator then I suggest that you either do something about the muesli-munching troll
who insulted me or at least allow me the right of reply. 
>'OT devel list' - sorry, can't find it - any chance of a link ? 
>BTW: When you use the acronym 'OT', do you mean 'On Topic', 'Off Topic' or something completely different ? 
>Thanks,
>Kevin. 
> 
>
>| -----Original Message-----
>| From: openbeos-bounce@...
>| [mailto:openbeos-bounce@...]On Behalf Of Ingo Weinhold
(Continue reading)

Axel Dörfler | 2 Jan 2004 20:07
Picon

Re: Fat muesli-induced troll - Was: Locale Kit

<kevin.lawton@...> wrote:
> If you are the list moderator then I suggest that you either do 
> something 
> about the muesli-munching troll who insulted me or at least allow me 
> the 
> right of reply. 

In that case, you should have written this message privately to Ingo. 
And we like insults, we just don't like off-topic (well, to a degree 
:)).
Just don't lose your humor.

Bye,
   Axel.


Gmane