Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #150136

Re: Const-qualified function return type in C - is it a part of function type?

From Andrey Tarasevich <andreytarasevich@hotmail.com>
Newsgroups comp.lang.c
Subject Re: Const-qualified function return type in C - is it a part of function type?
Date 2020-02-21 19:56 -0800
Organization A noiseless patient Spider
Message-ID <r2q8pd$7vj$1@dont-email.me> (permalink)
References <r2plun$4vl$1@dont-email.me> <45853431-d208-46e0-8945-78a42ed1a83e@googlegroups.com> <r2ps1k$54e$1@dont-email.me> <cN%3G.128006$8Y7.26554@fx05.iad>

Show all headers | View raw


On 2/21/2020 5:50 PM, Richard Damon wrote:
> On 2/21/20 7:19 PM, Andrey Tarasevich wrote:
>> On 2/21/2020 3:24 PM, James Kuyper wrote:
>>> "If the specification of a function type includes any type qualifiers,
>>> the behavior is undefined." (6.7.3p9).
>>
>> Um... That is completely irrelevant. What you quoted refers to 
>> qualifiers applied to the function type itself. My original example 
>> qualifies the function return type, not the function type itself.
>>
> But the return type is part of the type of the function.

So what? Almost any cv-qualifier anywhere in the function declaration is 
"part of the type of the function". Are you trying to say that this is 
undefined

    const int* foo(const void *bar);

???

To avoid any further wastage of time on this irrelevant matter I hereby 
postulate one more time: the above quoted passage refers to qualifiers 
applied to the function type itself (which, BTW, is only possible 
through typedef names). It has nothing to do with qualifiers used in 
function return type or in function parameter types.

-- 
Best regards,
Andrey Tarasevich

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Const-qualified function return type in C - is it a part of function type? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2020-02-21 14:35 -0800
  Const-qualified function return type in C - is it a part of function type? James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-02-21 15:24 -0800
    Re: Const-qualified function return type in C - is it a part of function type? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2020-02-21 16:19 -0800
      Re: Const-qualified function return type in C - is it a part of function type? Richard Damon <Richard@Damon-Family.org> - 2020-02-21 20:50 -0500
        Re: Const-qualified function return type in C - is it a part of function type? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2020-02-21 19:56 -0800
          Re: Const-qualified function return type in C - is it a part of function type? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-02-22 14:22 +0000
            Re: Const-qualified function return type in C - is it a part of function type? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-02-22 10:06 -0800
              Re: Const-qualified function return type in C - is it a part of function type? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-02-22 21:20 +0000
                Re: Const-qualified function return type in C - is it a part of function type? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-02-24 20:58 -0800
            Re: Const-qualified function return type in C - is it a part of function type? luser droog <luser.droog@gmail.com> - 2020-02-22 19:24 -0800
              Re: Const-qualified function return type in C - is it a part of function type? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-02-23 03:52 +0000
                Re: Const-qualified function return type in C - is it a part of function type? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-02-24 21:06 -0800
      Re: Const-qualified function return type in C - is it a part of function type? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-02-21 21:21 -0800
  Re: Const-qualified function return type in C - is it a part of function type? Bonita Montero <Bonita.Montero@gmail.com> - 2020-02-22 07:51 +0100
    Re: Const-qualified function return type in C - is it a part of function type? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2020-02-22 05:00 -0800
      Re: Const-qualified function return type in C - is it a part of function type? Bonita Montero <Bonita.Montero@gmail.com> - 2020-02-22 16:23 +0100
      Re: Const-qualified function return type in C - is it a part of function type? Guillaume <message@bottle.org> - 2020-02-22 20:37 +0100
        Re: Const-qualified function return type in C - is it a part of function type? Bonita Montero <Bonita.Montero@gmail.com> - 2020-02-22 20:50 +0100
          Re: Const-qualified function return type in C - is it a part of function type? David Brown <david.brown@hesbynett.no> - 2020-02-23 07:29 +0100
            Re: Const-qualified function return type in C - is it a part of function type? Bonita Montero <Bonita.Montero@gmail.com> - 2020-02-23 08:57 +0100
  Re: Const-qualified function return type in C - is it a part of function type? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-02-22 09:53 -0800

csiph-web