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


Groups > comp.lang.c > #152647

Re: longer 'char literals' meaning in c

From Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups comp.lang.c
Subject Re: longer 'char literals' meaning in c
Date 2020-06-03 09:08 -0700
Organization A noiseless patient Spider
Message-ID <86blm0p1wq.fsf@linuxsc.com> (permalink)
References (8 earlier) <87tv104ij2.fsf@nosuchdomain.example.com> <4lKqG.254784$mk2.321@fx21.am4> <87lfmc4dwh.fsf@nosuchdomain.example.com> <r8qd3b$hmi$1@z-news.wcss.wroc.pl> <r8qntq$p8s$1@dont-email.me>

Show all headers | View raw


James Kuyper <jameskuyper@alumni.caltech.edu> writes:

> Note: exceeding the minimum implementation limits for integers does
> not, in itself, prevent a program from being strictly conforming.
> Any program that involves an int value that is outside of the range
> -32767 to 32767 exceeds those limits, but a strictly conforming
> program can do that, so long as it does so only when compiled on
> implementations where INT_MIN or INT_MAX is large enough.  So long
> as the observable behavior does not depend upon the values of
> INT_MIN and INT_MAX, it's perfectly fine for the unobservable part
> of the program's behavior does depend on those values.

This claim is not consistent with the plain reading of text in the
Standard's definition, in 4 p5, of strictly conforming program.
Note the second sentence.  Breaking apart the two independent
clauses, and substituting for the pronoun "It", the second clause
says "A strictly conforming program shall not exceed any minimum
implementation limit."  There is nothing there about output or
observable behavior.  The clauses are independent because of how
the sentence is constructed, which means each must be true
independently of the other.  Exceeding a minimum implementation
limit always means a program is not strictly conforming, even
if that has no effect on program output.

If you want to argue that what the authors meant is something
other than what a plain reading says, fine, please go ahead and
make that argument.  At face value though the Standard rules out
any program that exceeds a minimum implementation limit from
being a strictly conforming program, regardless of whether the
act of exceeding has any effect on program output.

Back to comp.lang.c | Previous | Next | Find similar


Thread

Re: longer 'char literals' meaning in c Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-06-03 09:08 -0700

csiph-web