James Carlson wrote:
> [EMAIL PROTECTED] writes:
> > >typeof(arg1)
> > >strchr(const char *, char)
> > >
> > >or something similar that would carry the actual input over to the return
> > >value.
> >
> > It would soon give you C++ type overloading.  Might not be bad, but you
> > know where to find C++ :-)
> 
> A good subset of the functionality (which I agree is a bit troublesome
> in that generic formulation) would be to allow storage qualifiers
> alone (not full types) to leak through functions.  Something like:
> 
>     #pragma storage_return strchr(1)
>     char *strchr(const char *, int);

Offtopic: Did anyone thought yet about having namespaces for #pragma
stuff ? For example:
#pragma vnd.sun::storage_return strchr(1) // for the (vendor) Sun
specific statement above
#pragma org.openmp::foobar // for OpenMP-specific stuff
and so on. Currently all the different #pragma stuff in one flat
namespace is a horrible portability issue and people rarely use #ifdef
to protect these statements correctly. Is there someone at Sun who's
interested to discuss solutions and carry them forth to the ISO-C
working group ?

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) [EMAIL PROTECTED]
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Reply via email to