[OMPI devel] OpenMPI not conforming with the C90 spec?

2006-08-17 Thread Jonathan Underwood

Hi,

[Apologies for posting to users and devel - my intention was to post
to devel only]

Compiling a file with the gcc options -Wall and -pedantic gives the
following warning:
mpi.h:147: warning: ISO C90 does not support 'long long'

Is this intentional, or is this a bug?

Thanks,
Jonathan.


Re: [OMPI devel] OpenMPI not conforming with the C90 spec?

2006-08-21 Thread Jonathan Underwood

On 19/08/06, Adrian Knoth  wrote:

> Compiling a file with the gcc options -Wall and -pedantic gives the
> following warning:
> mpi.h:147: warning: ISO C90 does not support 'long long'
> Is this intentional, or is this a bug?

If you do not insist on using C90, you may compile with -std=c99
to get rid of this message ;)



Heh :)


I don't have the C90 (ANSI-C) at my fingertips, but I confirm it
does not support "long long".

Perhaps we should use int64_t instead.


I think that wouldn't solve the problem (see another post on that from
Ralf Wildenhaus).

I notice that the gcc documentation has this to say:

  The macro "__STRICT_ANSI__" is predefined when the -ansi option is
  used.  Some header files may notice this macro and refrain from
  declaring certain functions or defining certain macros that the ISO
  standard doesn't call for; this is to avoid interfering with any
  programs that might use these names for other things.

I wonder if it would be possible to #ifdef away non-C90 conforming
declarations in mpi.h when C90 conformance is requested. I am not sure
if __STRICT_ANSI__ is portable though.
If this is considered to be a worthwhile endeavour, I'm happy to cook
up a patch for it. OTOH, it may not really be worth it.

Best wishes,
Jonathan.