The spec says
"The common subset of the C and C++ languages consists of all
declarations, definitions, and expressions that may appear in a well
formed C++ program and also in a conforming C program."
However, that means that selected features of C++ such as overloading,
used by a C program which is accepted by a C compiler that treats
these features as conforming extensions, are among the "common
subset". That strikes me as incorrect, however. I think the spec
should instead say
"The common subset of the C and C++ languages consists of all
declarations, definitions, and expressions that may appear in a well
formed C++ program and also in a <ins>strictly</ins> conforming C
program."
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-discussion+unsubscribe@isocpp.org.
On 2016-11-17 10:57, 'Johannes Schaub' via ISO C++ Standard - Discussion
wrote:
> The term has a strict, err precise, definition: "The two forms of
> conforming implementation are hosted and freestanding. A conforming
> hosted implementation shall accept any strictly conforming program" /
> "A conforming program is one that is acceptable to a conforming
> implementation.". Therefore, overloading functions is not a problem
> for a conforming C program if a conforming C compiler accepts it.
I believe a more appropriate definition is that a conforming program is
one accepted by *all* conforming compilers. Moreover, both extant
conforming compilers and *hypothetical* conforming compilers.
On 2016-11-17 10:57, 'Johannes Schaub' via ISO C++ Standard - Discussion
wrote:
> The term has a strict, err precise, definition: "The two forms of
> conforming implementation are hosted and freestanding. A conforming
> hosted implementation shall accept any strictly conforming program" /
> "A conforming program is one that is acceptable to a conforming
> implementation.". Therefore, overloading functions is not a problem
> for a conforming C program if a conforming C compiler accepts it.
I believe a more appropriate definition is that a conforming program is
one accepted by *all* conforming compilers. Moreover, both extant
conforming compilers and *hypothetical* conforming compilers.
Let's say I wrote a conforming "C" compiler that, as a permitted
extension, also accepted Python code. Does that mean that Python code is
part of conforming C?
Certainly not. A conforming program is one that
*must* be accepted by the compiler in order for that compiler to be
conforming, i.e. any possible compiler which is conforming would
necessarily accept the program. Not *there exists* (or even, *might*
exist) a conforming compiler that would accept the program.
--
Matthew
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-discussion+unsubscribe@isocpp.org.