 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Timothy Madden Guest
|
Posted: Mon Oct 25, 2004 8:27 pm Post subject: What is a C++ program ? |
|
|
The standard only says:
"ill-formed program [defns.ill.formed]:
input to a C++ implementation [...]"
"If a program contains no violations of the rules [..]
an implementation shall [..] accept and correctly
execute that program "
Translation units and source files are defined only in
terms of 'the text of a program' so they do not tell us
what the program itself is.
An implementation is something that:
- has requirements states by the standard
- shall include documentation
- shall define 'implementation-defined behaviour'
- shall issue diagnostic messages when required
- translates the text of a C++ program
- defines a 'corresponding instance' of the abstract
machine defined by the standard
- accepts and executes C++ programs
Shouldn't the standard clearly define what a program is
and what an implementation is ?
For example a .dll could be as well considered a program
or as a part of a program if you ask me.
Timothy Madden
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
|
|
| Back to top |
|
 |
Victor Bazarov Guest
|
Posted: Mon Oct 25, 2004 10:36 pm Post subject: Re: What is a C++ program ? |
|
|
Timothy Madden wrote:
| Quote: | The standard only says:
"ill-formed program [defns.ill.formed]:
input to a C++ implementation [...]"
"If a program contains no violations of the rules [..]
an implementation shall [..] accept and correctly
execute that program "
Translation units and source files are defined only in
terms of 'the text of a program' so they do not tell us
what the program itself is.
An implementation is something that:
- has requirements states by the standard
- shall include documentation
- shall define 'implementation-defined behaviour'
- shall issue diagnostic messages when required
- translates the text of a C++ program
- defines a 'corresponding instance' of the abstract
machine defined by the standard
- accepts and executes C++ programs
Shouldn't the standard clearly define what a program is
and what an implementation is ?
For example a .dll could be as well considered a program
or as a part of a program if you ask me.
|
For a standard-compliant C++ implementation a C++ program is
a _declarations-seq_ (see Grammar, A.3) So, essentially a program
is a sequence of declarations. See more details in the A.6 and the
rest of the Annex A.
V
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
|
|
| Back to top |
|
 |
Bob Hairgrove Guest
|
Posted: Tue Oct 26, 2004 7:36 pm Post subject: Re: What is a C++ program ? |
|
|
On Mon, 25 Oct 2004 20:27:13 GMT, [email]batman (AT) rmv (DOT) spam.home.ro[/email] ("Timothy
Madden") wrote:
| Quote: | The standard only says:
"ill-formed program [defns.ill.formed]:
input to a C++ implementation [...]"
"If a program contains no violations of the rules [..]
an implementation shall [..] accept and correctly
execute that program "
Translation units and source files are defined only in
terms of 'the text of a program' so they do not tell us
what the program itself is.
An implementation is something that:
- has requirements states by the standard
- shall include documentation
- shall define 'implementation-defined behaviour'
- shall issue diagnostic messages when required
- translates the text of a C++ program
- defines a 'corresponding instance' of the abstract
machine defined by the standard
- accepts and executes C++ programs
Shouldn't the standard clearly define what a program is
and what an implementation is ?
For example a .dll could be as well considered a program
or as a part of a program if you ask me.
|
Perhaps one could define a program as a collection (or set) of
"translation units" together with the necessary accompanying headers
and libraries. "Translation units" is yet another buzz word which
usually just means ".cpp files". As I see it, "program" is just
whatever the programmer feeds to the compiler to translate, be it a
complete application or only part of one.
"Implementation" is confusing to everyone reading the standard for the
first time (at least to me it was). When you see that word, you can
usually just plug in "compiler" for it. That's what it most often
means, but it also includes things like the STL and the CRT which
usually ship together with the compiler.
The more precise the terminology becomes, the harder it is to
understand in plain language. But this is normal and IMHO necessary
for a definitive document such as the standard is.
--
Bob Hairgrove
[email]NoSpamPlease (AT) Home (DOT) com[/email]
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
|
|
| Back to top |
|
 |
James Kuyper Guest
|
Posted: Wed Oct 27, 2004 2:54 am Post subject: Re: What is a C++ program ? |
|
|
[email]batman (AT) rmv (DOT) spam.home.ro[/email] ("Timothy Madden") wrote in message news:<2u3s9iF25qo3aU1 (AT) uni-berlin (DOT) de>...
...
| Quote: | Shouldn't the standard clearly define what a program is
and what an implementation is ?
|
See section 3.5. Basically, a C++ program is a set of translation
units, all linked together. In general, it must contain a main()
function, and through that linkage it must include one and only one
definition of everything recursively used by main(). There's lots of
complications and exceptions to that "one and only one" issue, and 3.5
goes into them in a lot more detail than is needed here.
| Quote: | For example a .dll could be as well considered a program
or as a part of a program if you ask me.
|
Unless your dll has a main(), it can't qualify as a program in itself,
though it could be part of a program.
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
|
|
| Back to top |
|
 |
Timothy Madden Guest
|
Posted: Wed Oct 27, 2004 6:42 pm Post subject: Re: What is a C++ program ? |
|
|
"James Kuyper" <kuyper (AT) wizard (DOT) net> wrote
| Quote: | batman (AT) rmv (DOT) spam.home.ro ("Timothy Madden") wrote in message
news:<2u3s9iF25qo3aU1 (AT) uni-berlin (DOT) de>...
..
Shouldn't the standard clearly define what a program is
and what an implementation is ?
See section 3.5. Basically, a C++ program is a set of translation
units, all linked together.
Translation units are defined starting from 'the text of a program' ... |
| Quote: | In general, it must contain a main()
function, and through that linkage it must include one and only one
definition of everything recursively used by main(). There's lots of
complications and exceptions to that "one and only one" issue, and 3.5
goes into them in a lot more detail than is needed here.
|
Indeed, but at least thing are well defined in the One Definition Rule
(at least I understood the section 3.2 without much truoble).
| Quote: | For example a .dll could be as well considered a program
or as a part of a program if you ask me.
Unless your dll has a main(), it can't qualify as a program in itself,
though it could be part of a program.
|
Windows programs have a WinMain or _tmain function instead
and I think one could write compliant Windows programs in C++
..dlls with DllMain are no different. Maybe main is defined in
some library (I find this to be legal). If it is so, is a .dll a program ?
Timothy Madden
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
|
|
| Back to top |
|
 |
kanze@gabi-soft.fr Guest
|
Posted: Wed Oct 27, 2004 6:51 pm Post subject: Re: What is a C++ program ? |
|
|
[email]kuyper (AT) wizard (DOT) net[/email] (James Kuyper) wrote in message
news:<8b42afac.0410261833.62bd8cdd (AT) posting (DOT) google.com>...
| Quote: | batman (AT) rmv (DOT) spam.home.ro ("Timothy Madden") wrote in message
news:<2u3s9iF25qo3aU1 (AT) uni-berlin (DOT) de>...
..
Shouldn't the standard clearly define what a program is
and what an implementation is ?
See section 3.5. Basically, a C++ program is a set of translation
units, all linked together. In general, it must contain a main()
function, and through that linkage it must include one and only one
definition of everything recursively used by main(). There's lots of
complications and exceptions to that "one and only one" issue, and 3.5
goes into them in a lot more detail than is needed here.
|
I think a key issue here is that how you specify which translation units
are part of the program depends on the implementation.
| Quote: | For example a .dll could be as well considered a program
or as a part of a program if you ask me.
Unless your dll has a main(), it can't qualify as a program in itself,
though it could be part of a program.
|
If the implementation says so. And if it is effectively linked in a
manner that is transparent to the program, as if the link had actually
occurred before the program started.
--
James Kanze GABI Software http://www.gabi-soft.fr
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
|
|
| Back to top |
|
 |
Timothy Madden Guest
|
Posted: Thu Oct 28, 2004 11:11 am Post subject: Re: What is a C++ program ? |
|
|
"Bob Hairgrove" <invalid (AT) bigfoot (DOT) com> wrote
| Quote: | On Mon, 25 Oct 2004 20:27:13 GMT, [email]batman (AT) rmv (DOT) spam.home.ro[/email] ("Timothy
Madden") wrote:
The standard only says:
"ill-formed program [defns.ill.formed]:
input to a C++ implementation [...]"
"If a program contains no violations of the rules [..]
an implementation shall [..] accept and correctly
execute that program "
Translation units and source files are defined only in
terms of 'the text of a program' so they do not tell us
what the program itself is.
An implementation is something that:
- has requirements states by the standard
- shall include documentation
- shall define 'implementation-defined behaviour'
- shall issue diagnostic messages when required
- translates the text of a C++ program
- defines a 'corresponding instance' of the abstract
machine defined by the standard
- accepts and executes C++ programs
Shouldn't the standard clearly define what a program is
and what an implementation is ?
For example a .dll could be as well considered a program
or as a part of a program if you ask me.
Perhaps one could define a program as a collection (or set) of
"translation units" together with the necessary accompanying headers
and libraries. "Translation units" is yet another buzz word which
usually just means ".cpp files".
|
It is the other way around. Translation units are defined starting
from the definition of a program (except that the definition of a
program currently misses the standard).
| Quote: | As I see it, "program" is just
whatever the programmer feeds to the compiler to translate, be it a
complete application or only part of one.
|
'Compiler' is not a term really used in the standard and the compiler
takes as input source files, which are storage units for the text of a
program.
| Quote: | "Implementation" is confusing to everyone reading the standard for the
first time (at least to me it was). When you see that word, you can
usually just plug in "compiler" for it. That's what it most often
means, but it also includes things like the STL and the CRT which
usually ship together with the compiler.
|
To me it wasn't so this point is ok as for my question, except that it
also misses the definition. The implementation is just a general concept
(not necessary confusing one) which includes the operating system
because an implementation 'executes a program' .
For example 'platform' is a general concept which includes
operating system, target machine, compiler (and language),
etc and that is not confusing to me.
| Quote: | The more precise the terminology becomes, the harder it is to
understand in plain language. But this is normal and IMHO necessary
for a definitive document such as the standard is.
--
Bob Hairgrove
[email]NoSpamPlease (AT) Home (DOT) com[/email]
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
|
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
|
|
| Back to top |
|
 |
Timothy Madden Guest
|
Posted: Thu Oct 28, 2004 11:11 am Post subject: Re: What is a C++ program ? |
|
|
"Victor Bazarov" <v.Abazarov (AT) comAcast (DOT) net> wrote
| Quote: | Timothy Madden wrote:
[...]
Shouldn't the standard clearly define what a program is
and what an implementation is ?
For example a .dll could be as well considered a program
or as a part of a program if you ask me.
For a standard-compliant C++ implementation a C++ program is
a _declarations-seq_ (see Grammar, A.3) So, essentially a program
is a sequence of declarations. See more details in the A.6 and the
rest of the Annex A.
V
This is as regarding only the syntax and not every _declarations-seq_ |
could be a program.
Timothy Madden
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
|
|
| Back to top |
|
 |
James Kuyper Guest
|
Posted: Thu Oct 28, 2004 4:13 pm Post subject: Re: What is a C++ program ? |
|
|
[email]batman (AT) rmv (DOT) spam.home.ro[/email] ("Timothy Madden") wrote in message news:<2u91j8F26gekfU1 (AT) uni-berlin (DOT) de>...
| Quote: | "James Kuyper" <kuyper (AT) wizard (DOT) net> wrote in message
news:8b42afac.0410261833.62bd8cdd (AT) posting (DOT) google.com...
[email]batman (AT) rmv (DOT) spam.home.ro[/email] ("Timothy Madden") wrote in message
news:<2u3s9iF25qo3aU1 (AT) uni-berlin (DOT) de>...
..
Shouldn't the standard clearly define what a program is
and what an implementation is ?
See section 3.5. Basically, a C++ program is a set of translation
units, all linked together.
Translation units are defined starting from 'the text of a program'
|
Well, yes. How is that a problem? Where would you start the
definition?
...
| Quote: | Windows programs have a WinMain or _tmain function instead
and I think one could write compliant Windows programs in C++
|
a) That makes it a free-standing implementation of C++. The
requirement that main() be present only applies to hosted
implementations. I neglected to make that distinction.
b) Even if there is no main(), there must be some
implementation-defined starting routine. A complete program includes
the starting routine, and recursively everything it uses. It also
generally includes start-up code that calls main() or the the
implementation-defined alternative to main(). You need all of those
things before it qualifies as a program.
| Quote: | .dlls with DllMain are no different. Maybe main is defined in
some library (I find this to be legal). If it is so, is a .dll a program ?
|
I'm not too familiar with programming for dlls. I'm under the
impression that a dll can't be a complete program in itself, that it
requires an actual program to make use of it. Correct me if I'm wrong
about this.
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
|
|
| Back to top |
|
 |
kanze@gabi-soft.fr Guest
|
Posted: Thu Oct 28, 2004 4:31 pm Post subject: Re: What is a C++ program ? |
|
|
[email]batman (AT) rmv (DOT) spam.home.ro[/email] ("Timothy Madden") wrote in message
news:<2u91j8F26gekfU1 (AT) uni-berlin (DOT) de>...
| Quote: | "James Kuyper" <kuyper (AT) wizard (DOT) net> wrote in message
news:8b42afac.0410261833.62bd8cdd (AT) posting (DOT) google.com...
[email]batman (AT) rmv (DOT) spam.home.ro[/email] ("Timothy Madden") wrote in message
news:<2u3s9iF25qo3aU1 (AT) uni-berlin (DOT) de>...
..
Shouldn't the standard clearly define what a program is
and what an implementation is ?
See section 3.5. Basically, a C++ program is a set of translation
units, all linked together.
Translation units are defined starting from 'the text of a program' ...
In general, it must contain a main() function, and through that
linkage it must include one and only one definition of everything
recursively used by main(). There's lots of complications and
exceptions to that "one and only one" issue, and 3.5 goes into them
in a lot more detail than is needed here.
Indeed, but at least thing are well defined in the One Definition Rule
(at least I understood the section 3.2 without much truoble).
For example a .dll could be as well considered a program or as a
part of a program if you ask me.
Unless your dll has a main(), it can't qualify as a program in
itself, though it could be part of a program.
Windows programs have a WinMain or _tmain function instead
and I think one could write compliant Windows programs in C++
|
You think wrong.
In practice, I don't think one really writes 100% compliant programs in
any environment -- there's just too much necessary functionality
(e.g. GUI, sockets, threads, data base interfaces...) that isn't
specified in the standard. So the modules which don't interface with
any of this are compliant, and the others aren't. And of course, the
"program", taken as a whole, isn't compliant.
The important thing isn't being compliant -- it's being aware of what
depends on various extensions, and isolating it as much as possible, so
that if you ever do have to port...
| Quote: | .dlls with DllMain are no different. Maybe main is defined in some
library (I find this to be legal). If it is so, is a .dll a program ?
|
Formally, to be compliant, a program must contain one, and only one,
function main. How you specify to the implementation which translation
units are part of the program is implementation defined. In practice,
all implementations I know do have facilities for incorporating
translation units which are in a library. Whether the translation unit
which contains main comes from a library or elsewhere is irrelevant with
regards to standards conformance.
(Note that DLL's introduce some additional twists with regards to
standards compliance.)
--
James Kanze GABI Software http://www.gabi-soft.fr
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
|
|
| Back to top |
|
 |
James Kuyper Guest
|
Posted: Thu Oct 28, 2004 4:31 pm Post subject: Re: What is a C++ program ? |
|
|
[email]invalid (AT) bigfoot (DOT) com[/email] (Bob Hairgrove) wrote in message news:<la3sn0hdc95bie5ulvdu7gujm83lkc11dp (AT) 4ax (DOT) com>...
| Quote: | On Mon, 25 Oct 2004 20:27:13 GMT, [email]batman (AT) rmv (DOT) spam.home.ro[/email] ("Timothy
Madden") wrote:
The standard only says:
"ill-formed program [defns.ill.formed]:
input to a C++ implementation [...]"
"If a program contains no violations of the rules [..]
an implementation shall [..] accept and correctly
execute that program "
Translation units and source files are defined only in
terms of 'the text of a program' so they do not tell us
what the program itself is.
An implementation is something that:
- has requirements states by the standard
- shall include documentation
- shall define 'implementation-defined behaviour'
- shall issue diagnostic messages when required
- translates the text of a C++ program
- defines a 'corresponding instance' of the abstract
machine defined by the standard
- accepts and executes C++ programs
Shouldn't the standard clearly define what a program is
and what an implementation is ?
For example a .dll could be as well considered a program
or as a part of a program if you ask me.
Perhaps one could define a program as a collection (or set) of
"translation units" together with the necessary accompanying headers
and libraries. "Translation units" is yet another buzz word which
usually just means ".cpp files".
|
Section 3.5 already address this, defining both "program" and
"translation unit" with much greater precision.
| Quote: | whatever the programmer feeds to the compiler to translate, be it a
complete application or only part of one.
|
If it's a compiler, it doesn't create programs, at least, not by
itself. Compilers translate translation units, typically creating one
object file for each translation unit. It's only the linker that
creates the complete program, by linking the translation units
together with the applicable libraries. Of course, most compilers I'm
familiar with automatically invoke the linker, if given the right
command line arguments, which tends to blur the distinction.
| Quote: | "Implementation" is confusing to everyone reading the standard for the
first time (at least to me it was). When you see that word, you can
usually just plug in "compiler" for it. That's what it most often
means, but it also includes things like the STL and the CRT which
usually ship together with the compiler.
The more precise the terminology becomes, the harder it is to
understand in plain language. But this is normal and IMHO necessary
for a definitive document such as the standard is.
|
The "implementation" also includes the linker.
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
|
|
| Back to top |
|
 |
Timothy Madden Guest
|
Posted: Fri Oct 29, 2004 6:18 pm Post subject: Re: What is a C++ program ? |
|
|
"James Kuyper" <kuyper (AT) wizard (DOT) net> wrote
| Quote: | batman (AT) rmv (DOT) spam.home.ro ("Timothy Madden") wrote
"James Kuyper" <kuyper (AT) wizard (DOT) net> wrote
[email]batman (AT) rmv (DOT) spam.home.ro[/email] ("Timothy Madden") wrote i
..
Shouldn't the standard clearly define what a program is
and what an implementation is ?
See section 3.5. Basically, a C++ program is a set of translation
units, all linked together.
Translation units are defined starting from 'the text of a program'
Well, yes. How is that a problem? Where would you start the
definition?
|
The problem is with the definition of a program. In the way things are
now, you must first have the 'program' defined, and then you will also
have the 'source files' defined and in turn 'translation units'.
| Quote: |
..
Windows programs have a WinMain or _tmain function instead
and I think one could write compliant Windows programs in C++
[...]
.dlls with DllMain are no different. Maybe main is defined in
some library (I find this to be legal). If it is so, is a .dll a program
?
I'm not too familiar with programming for dlls. I'm under the
impression that a dll can't be a complete program in itself, that it
requires an actual program to make use of it. Correct me if I'm wrong
about this.
|
I think that a main() function could be included in the library of an Win32
implementation and then, by the standard, a .dll is a program.
The fact that the implementation also requires another program
(an executable) to execute the .dll is not relevant to the standard.
This would raise the issue of a program being included in another program
To give this idea a thought I would first have to finish reading the
standard
for the core language.
Timothy Madden
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
|
|
| Back to top |
|
 |
James Kuyper Guest
|
Posted: Mon Nov 01, 2004 2:52 am Post subject: Re: What is a C++ program ? |
|
|
[email]batman (AT) rmv (DOT) spam.home.ro[/email] ("Timothy Madden") wrote in message news:<2uecgkF25j3t4U1 (AT) uni-berlin (DOT) de>...
| Quote: | "James Kuyper" <kuyper (AT) wizard (DOT) net> wrote
[email]batman (AT) rmv (DOT) spam.home.ro[/email] ("Timothy Madden") wrote
...
Translation units are defined starting from 'the text of a
program'
Well, yes. How is that a problem? Where would you start the
definition?
The problem is with the definition of a program. In the way things are
now, you must first have the 'program' defined, and then you will also
have the 'source files' defined and in turn 'translation units'.
|
Well, I suppose you could do it in that order if you want. I don't see
why that particular order is a problem. Conceptually, I tend to start
with the source code files, which are merged together to form
translation units, which are translated and then linked together to
form a program. Is that a better order for you?
If you think there's a problem, you'll need to explain what it is more
detail.
...
| Quote: | I'm not too familiar with programming for dlls. I'm under the
impression that a dll can't be a complete program in itself, that
it
requires an actual program to make use of it. Correct me if I'm
wrong
about this.
I think that a main() function could be included in the library of an Win32
implementation and then, by the standard, a .dll is a program.
|
Only if main() and everything recursively needed by main() are part of
the dll as well.
Would someone who knows more than either of us does about dll's
comment on whether or not they can contain a main() function that acts
as the actual starting point of a C program?
| Quote: | The fact that the implementation also requires another program
(an executable) to execute the .dll is not relevant to the standard.
|
If the behavior that is required by the standard for a program can't
happen without that executable, then it isn't a program without that
executable.
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
|
|
| Back to top |
|
 |
James Kuyper Guest
|
Posted: Mon Nov 01, 2004 10:04 am Post subject: Re: What is a C++ program ? |
|
|
[email]batman (AT) rmv (DOT) spam.home.ro[/email] ("Timothy Madden") wrote in message news:<2u90n7F27rj8aU1 (AT) uni-berlin (DOT) de>...
...
| Quote: | It is the other way around. Translation units are defined starting
from the definition of a program ...
|
Section 3.5 defines a program in terms of translation units, and
defines translation units as containing 0 or more declaration
sequences. You can trace the grammar down, and it never loops back to
being defined in terms of programs.
| Quote: | ... (except that the definition of a
program currently misses the standard).
|
Do you mean "is currently missing from"? What about section 3.5?
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|