On Wed, Oct 31, 2012 at 9:51 PM, Barrett, Brian W <[email protected]> wrote:
> On 10/31/12 1:39 PM, "Paul Hargrove" <[email protected]> wrote:
>
>>No, I don't have specific usage cases that concern me.
>>
>>
>>As I said a minute or two ago in a reply to Ralph, my concern is that the
>>Sandia codes provide an "existence proof" that "really smart people" can
>>write questionable code at times. So, I fear that a larger-than-expected
>>fraction of real codes would generate warnings.
>
> Not surprisingly, most of the codes I'm concerned about are really old
> (like pre-MPI old). The authors were dealing with more than one
> communication library, so they wrote wrappers inside their code for
> communication. The wrappers were for a bunch of different communication
> interfaces and so fairly agnostic, but looked a lot like MPI (because MPI
> looks a lot like NX, PVM, etc.). Anyway, they squashed down everything to
> either a void* or char* (remember, this is when void* was not always
> supported), passed that to MPI with a datatype, and off we go.
Thank you for sharing the context.
> That said, if we didn't throw a warning if the pointer is of type void* or
> char*, I think I'd be mostly ok with the patch being on by default. I'm
> not sure if that's possible or not...
It is certainly possible to do that. However, we would lose the
ability to diagnose type mismatches for MPI_CHARACTER, but it is a
rarely-used type tag (is it?).
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <[email protected]>*/