🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Orlando Sotomayor-Diaz Sat, 10 May 1986 23:00
mod.std.c Digest V16#4
#123
Author: Orlando Sotomayor-Diaz
Date: Sat, 10 May 1986 23:00
203 lines
7539 bytes
From: Orlando Sotomayor-Diaz (The Moderator) <cbosgd!std-c>


mod.std.c Digest            Sat, 10 May 86       Volume 16 : Issue   4

Today's Topics:
 Differences from April 1985 to February 1986 Draft Standard, Part 3
----------------------------------------------------------------------

Date: Sun, 27 Apr 86 01:17:06 est
From: <ihnp4!utcsri!lsuc!msb%utcsri>
Subject: Differences from April 1985 to February 1986 Draft Standard, Part 3
To: cbosgd!std-c%utcsri

# C.1 Lexical elements The program fragment x+++++y is parsed  as
x  ++  ++ + y, which {is a syntax error --> violates a constraint
on increment operators}, even though the parse x ++ + ++ y  might
yield a correct expression.

  *    Forward references: expressions (#C.3)  {-->,  postfix  increment
       and decrement operators (#C.3.2.4)}.

Remark: A number of things have been reclassified from syntax  to
constraints in this fashion.



# C.1.2 Identifiers

  *    An identifier denotes ... one of the following ...  a  {type  -->
       typedef} name ...



# C.1.2.1 Scopes of identifiers

N-->   (A "function prototype" is a declaration of a function  that  de-
N-->   clares the types of its parameters.)



# C.1.2.2 Linkages of identifiers

In the set of source files  and
libraries that constitutes an entire program, every instance of a
particular identifier with "external linkage"  denotes  the  same
function or object.  If the declarations in two source files {-->
or in  disjoint  scopes  within  one  source  file}  differ,  the
behavior is undefined.



# C.1.2.2 Linkages of identifiers

       For an identifier of a function  or  object  declared  with  file
  *    scope,  if  its lexically first declaration {--> with file scope}
       in the source file contains the keyword  static,  the  identifier
       has internal linkage.



# C.1.2.4 Storage durations of objects [An] instance of an object
that  has "automatic storage duration" ... is discarded when exe-
cution of the block ends by  reaching  the  terminating  "}",  by
jumping  to  an enclosing block, or by executing a {--> break or}
return statement.



# C.1.2.5 Types An object declared as a character (char) is large
enough  to  store any member of the {execution character set that
can be specified as a single-character character constant without
using an octal or hexadecimal escape sequence --> required source
character set enumerated in #B.2.1}.



# C.1.2.5 Types

       There are four types of  signed  integers,  called  signed  char,
       short int, int, and long int.  A "plain" int has the natural size
  *    suggested by the architecture of the execution  environment  {-->
       (large  enough  to  contain  any  value  in  the range INT_MIN to
       INT_MAX as defined in the header <limits.h>)};  the  other  types
       are  provided  to  meet special needs.  The set of values of each
       signed integral type is a subset of the values of the  next  type
  *    in  the  list  above.   Even  if  the implementation defines {-->
       signed char,} short int, int, or long int to have the same set of
       values, they are nevertheless different types.



# C.1.2.5 Types

N-->   The set of non-negative values of a signed type is  a  subset  of
N-->   its corresponding unsigned type.



# C.1.3 Constants

<--O   If the value of a constant cannot be represented in  the  storage
<--O   appropriate  for  that  type  in  the  execution environment, the
<--O   behavior is undefined.

N-->   The value of a constant shall be representable in the storage ap-
N-->   propriate for its type in the execution environment.



# C.1.3.2 Integer constants

Remark: The notation [opt]  below  represents  a  subscript  opt,
which means optional.

<--O   integer-suffix:
<--O               integer-suffix-letter
<--O               integer-suffix-letter integer-suffix-letter

<--O   integer-suffix-letter: one of
<--O               u l U L

N-->   integer-suffix:
N-->               unsigned-suffix long-suffix[opt]
N-->               long-suffix unsigned-suffix[opt]

N-->   unsigned-suffix: one of
N-->               u U

N-->   long-suffix: one of
N-->               l L



# C.1.3.2 Integer constants The type of an  integer  constant  is
the  first  of  the  corresponding list in which its value can be
represented.  Unsuffixed decimal: int, long  int  {-->,  unsigned
long int}.  ...



# C.1.3.4 Character constants Even if eight bits are used for ob-
jects that have type char, the construction {'\xFF1' --> '\x123'}
specifies a character constant  containing  only  one  character.
(The   value   of   this   {-->   single-character}  constant  is
implementation-defined.) To specify a character constant contain-
ing  the  two  characters  {0xFF and 1 --> 0x12 and 3} , the con-
struction {'\x0FF1' --> '\x0123'} may be  used.   (The  value  of
this   {-->   two-character}  constant  is  also  implementation-
defined.)



# C.1.4 String literals A string literal has static storage dura-
tion and type "array of {const -->} char" ...

N-->   If the program attempts to modify a string literal, the  behavior
N-->   is undefined.



# C.1.5 Operators operator: one of
            ...
            , {--> # ##}

N-->   ...  The operators # and ## may occur in  macro-defining  prepro-
N-->   cessor directives only.



# C.1.6 Punctuators punctuator: one of
            [ ] ( ) { } * , : = ; ... # {## -->}

N-->   The punctuator # may occur in preprocessor directives only.



# C.2.1.1 Characters and integers

  *    A char, or a short int {-->,  or  an  int  bit-field},  or  their
       signed  or unsigned varieties, may be used in an expression wher-
       ever an int may be used.  In all cases the value is converted  to
       an  int  if an int can represent all values of the original type;
       otherwise it is converted to an unsigned int.  These  are  called
  *    the "integral {widening conversions --> promotions}".

Remark: The new term "promotion" is used throughout the document.

  *    When an integer is {converted --> demoted} to a shorter  unsigned
  *    integer  {-->  or  unsigned  int bit-field} or unsigned char, the
       result is the remainder modulo the largest unsigned  number  that
  *    can  be  represented plus one.  When an integer is {converted -->
  *    demoted} to a shorter signed integer {--> or  int  bit-field}  or
       signed  char,  if  the  value cannot be represented the result is
       implementation-defined.

------------------------------

End of mod.std.c Digest - Sat, 10 May 86 19:00:12 EDT
******************************
USENET -> posting only through cbosgd!std-c.
ARPA -> ... through cbosgd!std-c@BERKELEY.ARPA (NOT to INFO-C)
In all cases, you may also reply to the author(s) above.
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