🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

5 total messages Started by Daniel R. Edelson Fri, 07 Aug 1992 12:24
legal declarations?
#61
Author: Daniel R. Edelson
Date: Fri, 07 Aug 1992 12:24
7 lines
564 bytes
Is "char char c;" a legal declaration?

Is there language in the draft standard
that prohibits "char int c;"?

Thanks,
daniel
Re: legal declarations?
#65
Author: mat
Date: Sat, 08 Aug 1992 15:40
16 lines
918 bytes
In article <4054@seti.UUCP>, Daniel.Edelson@inria.fr (Daniel R. Edelson) writes:
> Is "char char c;" a legal declaration?
> 
> Is there language in the draft standard
> that prohibits "char int c;"?

See 7.1.8 of the ARM, which states that with the exception of `long' and
`int', at most one _type-specifier_ may be present in a declaration.

I see no reason why x3j16/WG 22 would drop this requirement.  Whether it
will be rephrased, of course, is another question.
-- 
 (This man's opinions are his own.)
 From mole-end				Mark Terribile

 mat@mole-end.matawan.nj.us, Somewhere in Matawan, NJ
Re: legal declarations?
#62
Author: Steve Clamage
Date: Sat, 08 Aug 1992 20:26
15 lines
699 bytes
Daniel.Edelson@inria.fr (Daniel R. Edelson) writes:

>Is "char char c;" a legal declaration?

>Is there language in the draft standard
>that prohibits "char int c;"?

ARM section 7.1.6, p 108:

"[except for adding const and/or volatile], at most one
type-specifier may be given in a declaration."
-- 

Steve Clamage, TauMetric Corp, steve@taumet.com
Vice Chair, ANSI C++ Committee, X3J16
Re: legal declarations?
#67
Author: Jerry Schwarz
Date: Mon, 10 Aug 1992 00:52
19 lines
1215 bytes
In article <1992Aug8.154018.20331@mole-end.matawan.nj.us>, mat@mole-end.matawan.nj.us writes:
|> In article <4054@seti.UUCP>, Daniel.Edelson@inria.fr (Daniel R. Edelson) writes:
|> > Is "char char c;" a legal declaration?
|> > 
|> > Is there language in the draft standard
|> > that prohibits "char int c;"?
|> 
|> See 7.1.8 of the ARM, which states that with the exception of `long' and
|> `int', at most one _type-specifier_ may be present in a declaration.
|> 
|> I see no reason why x3j16/WG 22 would drop this requirement.  Whether it
|> will be rephrased, of course, is another question.

Previous empty message was result of incorrect button selection.

What I meant to say is 7.1.6/3 (there is no 7.1.8) contradicts
7.1.6/1 beacuse it allows "long int".

  -- Jerry 
Re: legal declarations?
#68
Author: Paul Wagland
Date: Mon, 10 Aug 1992 02:09
31 lines
1704 bytes
jss@lucid.com (Jerry Schwarz) writes:

>In article <1992Aug8.154018.20331@mole-end.matawan.nj.us>, mat@mole-end.matawan.nj.us writes:
>|> In article <4054@seti.UUCP>, Daniel.Edelson@inria.fr (Daniel R. Edelson) writes:
>|> > Is "char char c;" a legal declaration?
>|> > 
>|> > Is there language in the draft standard
>|> > that prohibits "char int c;"?
>|> 
>|> See 7.1.8 of the ARM, which states that with the exception of `long' and
>|> `int', at most one _type-specifier_ may be present in a declaration.
>|> 
>|> I see no reason why x3j16/WG 22 would drop this requirement.  Whether it
>|> will be rephrased, of course, is another question.

>Previous empty message was result of incorrect button selection.

>What I meant to say is 7.1.6/3 (there is no 7.1.8) contradicts
>7.1.6/1 beacuse it allows "long int".

Please correct me if I'm wrong :)

but isn't "long" just a type modifier?  which defaults to type int if
nothing else is given? (as does virtually everything else)

so "long" really means "long int" anyway, 
and what about "long double"?
-- 
Paul Wagland            | These opinions are mine and no-one elses
gupw@uniwa.uwa.edu.au   | Bingy Bingy Bingy Frogs Go round and round
------------------------+     -- Another silly quote from me  :-)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads