[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hpux-cxx-dev
Subject:    Re: CXX-DEV: type qualifier on return type is meaningless
From:       "Boris Gubenko" <Boris.Gubenko () hp ! com>
Date:       2006-04-07 0:23:58
Message-ID: 003101c659d9$90493550$0300a8c0 () americas ! hpqcorp ! net
[Download RAW message or body]

> This compiler is broken.  ;-)

No, it is just trying to tell the user that the meaning of
foo() is different in C and C++ :-)

----- Original Message ----- 
From: "Dennis Handly" <dhandly@cup.hp.com>
To: <cxx-dev@cxx.cup.hp.com>; <cyrille.maucci@hp.com>
Sent: Thursday, April 06, 2006 8:09 PM
Subject: Re: CXX-DEV: type qualifier on return type is meaningless


> >From: "Boris Gubenko" <Boris.Gubenko@hp.com>
>>this is what C compiler on iVMS gives for your program example
> const pint f()
> ...........^
> %CC-I-NOPARMLIST, The declaration of the function f has an empty parameter
> list.  If the function has parameters, they should be declared here;
> if it has no parameters, "void" should be specified in the parameter list.
>
> This compiler is broken.  ;-)
> There is no reason to require (void) on definitions.
> Only declarations need it in C.  6.7.5.3(14):
> 14 ...  An empty list in a function declarator that is part of a
> definition of that function specifies that the function has no
> parameters.  The empty list in a function declarator that is not part of
> a definition of that function specifies that no information about the
> number or types of the parameters is supplied.
>
> And in C++, no need to use (void) at all.
> _________________________________________________________________
> To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
>    with the message UNSUBSCRIBE cxx-dev
> _________________________________________________________________
>
> 
 _________________________________________________________________
 To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
    with the message UNSUBSCRIBE cxx-dev
 _________________________________________________________________
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic