[Mpi-forum] Preprocessor Constants
N.M. Maclaren
nmm1 at cam.ac.uk
Fri Nov 19 02:57:19 CST 2010
On Nov 18 2010, Hal Finkel wrote:
>
>Appendix A of the current MPI 3 draft (line 45 of page 545) indicates
>that MPI_VERSION and MPI_SUBVERSION are of type, "const int (or unnamed
>enum)". This text is identical to that of the the MPI 2.2 specfication
>(line 45 of page 523), and it should be changed. As the heading on the
>previous line implies, these should be "preprocessor constants," and
>must not be "const int (or unnamed enum)". I recommend replacing, "const
>int (or unnamed enum)" with "integer literal."
I don't, but I agree that the existing wording is wrong for the reasons
you say. The word 'literal' is used in C99 only for string and compound
literals. What you mean is called an integer constant - which, as you
imply, also has other meanings! The term that is closest is "integer
constant token", but the wording used in limits.h is (with integer added
for clarity):
Integer constant expressions suitable for use in #if preprocessing
directives.
>Also, regarding the recommendation I made at the SC'10 BOF, I recommend
>adding the following text after line 19 of page 18 and after line 43 on
>page 18:
>User code may assume that mpi.h is unavailable to the preprocessor
>unless the preprocessor constant _MPI is defined prior to source-file
>processing.
With one reading of the C standard, that breaks conformance; with another,
it is recommended practice.
Regards,
Nick Maclaren.
More information about the mpi-forum
mailing list