public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* C/C++ extensions for array notations
@ 2010-12-13 17:09 Sebastian Pop
  2010-12-13 17:43 ` Joseph S. Myers
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sebastian Pop @ 2010-12-13 17:09 UTC (permalink / raw)
  To: gcc

Hi,

I would like to ask the opinion of C/C++ maintainers about the extension
that the Intel compiler proposes for array notations:
http://software.intel.com/sites/products/documentation/studio/composer/en-us/2011/compiler_c/index.htm#optaps/common/optaps_par_cean_prog.htm

Are there strong opinions against this extension?

Thanks,
Sebastian

PS: The openMP accelerator subcommittee is discussing about adopting
this notation as well to specify slices of data to be sent to an accelerator.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: C/C++ extensions for array notations
  2010-12-13 17:09 C/C++ extensions for array notations Sebastian Pop
@ 2010-12-13 17:43 ` Joseph S. Myers
  2010-12-13 17:47 ` Joe Buck
  2010-12-15  2:10 ` Richard Guenther
  2 siblings, 0 replies; 4+ messages in thread
From: Joseph S. Myers @ 2010-12-13 17:43 UTC (permalink / raw)
  To: Sebastian Pop; +Cc: gcc

On Mon, 13 Dec 2010, Sebastian Pop wrote:

> Hi,
> 
> I would like to ask the opinion of C/C++ maintainers about the extension
> that the Intel compiler proposes for array notations:
> http://software.intel.com/sites/products/documentation/studio/composer/en-us/2011/compiler_c/index.htm#optaps/common/optaps_par_cean_prog.htm
> 
> Are there strong opinions against this extension?

I don't see any specification there at the language standard level of how 
this interacts with the type system, with sizeof (and C1X alignof and GNU 
typeof), with array-to-pointer decay, what the type compatibility rules 
are, what is a constraint violation and what is runtime undefined 
(regarding integer constant expression or non-i-c-e values being out of 
range or disagreeing within an expression, for example).  Likewise 
regarding type conversions (implicit and otherwise).  And regarding 
sequence point rules (use the terminology in C1X and C++0X in providing 
such a specification, please).

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: C/C++ extensions for array notations
  2010-12-13 17:09 C/C++ extensions for array notations Sebastian Pop
  2010-12-13 17:43 ` Joseph S. Myers
@ 2010-12-13 17:47 ` Joe Buck
  2010-12-15  2:10 ` Richard Guenther
  2 siblings, 0 replies; 4+ messages in thread
From: Joe Buck @ 2010-12-13 17:47 UTC (permalink / raw)
  To: Sebastian Pop; +Cc: gcc

On Mon, Dec 13, 2010 at 09:08:39AM -0800, Sebastian Pop wrote:
> Hi,
> 
> I would like to ask the opinion of C/C++ maintainers about the extension
> that the Intel compiler proposes for array notations:
> http://software.intel.com/sites/products/documentation/studio/composer/en-us/2011/compiler_c/index.htm#optaps/common/optaps_par_cean_prog.htm
> 
> Are there strong opinions against this extension?

It's an interesting concept, looks especially useful for parallel
programming.  It looks like a very complex set of features; I don't
know whether Intel has a document elsewhere that specifies the details.
Because of the high complexity, it could be quite a maintainance burden,
especially if there isn't a rigorous spec.

Interaction with other C++ language features doesn't seem to be described.
I can't think of a standard C++ program that would change meaning with
this extension.  But it's not stated whether there can be a reference to
an array section, what the ABI looks like when an array section is
passed as a C++ function argument, whether there are any issues when the
base type of the array we're taking a section of has constructors and
destructors, etc.

If someone is interested in producing an experimental gcc extension,
great.  But there would be a lot of questions to be answered before
it would be appropriate to accept as a supported feature of GCC.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: C/C++ extensions for array notations
  2010-12-13 17:09 C/C++ extensions for array notations Sebastian Pop
  2010-12-13 17:43 ` Joseph S. Myers
  2010-12-13 17:47 ` Joe Buck
@ 2010-12-15  2:10 ` Richard Guenther
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Guenther @ 2010-12-15  2:10 UTC (permalink / raw)
  To: Sebastian Pop; +Cc: gcc

On Mon, Dec 13, 2010 at 6:08 PM, Sebastian Pop <sebpop@gmail.com> wrote:
> Hi,
>
> I would like to ask the opinion of C/C++ maintainers about the extension
> that the Intel compiler proposes for array notations:
> http://software.intel.com/sites/products/documentation/studio/composer/en-us/2011/compiler_c/index.htm#optaps/common/optaps_par_cean_prog.htm
>
> Are there strong opinions against this extension?
>
> Thanks,
> Sebastian
>
> PS: The openMP accelerator subcommittee is discussing about adopting
> this notation as well to specify slices of data to be sent to an accelerator.

Looks similar to what I hacked into the C frontend to support
middle-end arrays (well, hacked, as I used builtins).

Richard.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-12-15  2:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-13 17:09 C/C++ extensions for array notations Sebastian Pop
2010-12-13 17:43 ` Joseph S. Myers
2010-12-13 17:47 ` Joe Buck
2010-12-15  2:10 ` Richard Guenther

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).