Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #173806
| From | Tim Rentsch <tr.17687@z991.linuxsc.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: C vs Haskell for XML parsing |
| Date | 2023-09-03 11:44 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <86il8rqeps.fsf@linuxsc.com> (permalink) |
| References | (16 earlier) <20230828182115.305@kylheku.com> <uckeel$26q6m$1@dont-email.me> <uckumo$29oe0$1@dont-email.me> <875y4xboly.fsf@nosuchdomain.example.com> <8734zv7cgb.fsf@nosuchdomain.example.com> |
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>
>> David Brown <david.brown@hesbynett.no> writes:
>> [...]
>>
>>> Being able to accept $ in identifiers is a convenient extension.
>>
>> Quibble: $ in identifiers is not an extension as specified in section 4
>> of the standard. Starting in C99, the set of characters accepted in
>> identifiers is implementation-defined. (I'm not sure what difference
>> that makes.)
>
> On further thought, there is a significant difference.
>
> An implementation that supports $ in identifiers via an via the
> "other implementation-defined characters" wording in the syntax
> of an identifier can accept foo$bar as an identifier without
> issuing a diagnostic. If it's an extension as defined in section 4
> (Conformance) of the standard, it can accept foo$bar but it must
> still issue a diagnostic (presumably a non-fatal warning).
I'm not sure that's right. Section 5.1.1.3 paragraph 1 says
A conforming implementation shall produce at least one
diagnostic message (identified in an implementation-defined
manner) if a preprocessing translation unit or translation
unit contains a violation of any syntax rule or constraint,
even if the behavior is also explicitly specified as
undefined or implementation-defined.
Note the last clause: "even if the behavior is also explicitly
specified as undefined or implementation-defined." This clause
suggests that accepting $ as one of the implementation-defined
characters still warrants a diagnostic.
(And as was pointed out, only if the compiler is invoked in what
is purported to be a conforming mode.)
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar
Re: C vs Haskell for XML parsing Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-09-03 03:55 -0700
Re: C vs Haskell for XML parsing Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-09-03 11:44 -0700
Re: C vs Haskell for XML parsing Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-09-03 16:20 -0700
Re: C vs Haskell for XML parsing Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-09-03 16:47 -0700
Re: C vs Haskell for XML parsing Richard Damon <Richard@Damon-Family.org> - 2023-09-03 17:24 -0700
Re: C vs Haskell for XML parsing Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-09-03 17:26 -0700
csiph-web