[Cfp-interest] Fw: exploring __attribute__

Ian McIntosh ianm at ca.ibm.com
Wed Sep 17 15:32:15 PDT 2014



It's interesting and ironic that one of the objections to attributes was
that they would provide a portable syntax for non-portable semantics.

First, the semantics we are proposing for exception handling would be
portable (with the possibility of extensions where vendors have additional
exception handling capabilities).

Second, the main alternative we are considering is to use pragmas.  They
are the prime example of a portable syntax for non-portable semantics!
 - Any compiler can add any pragmas it wants, with any intra-pragma syntax
and any semantics it wants.
 - Any compiler is allowed to ignore any pragmas it doesn't understand or
even those it does, with no warning.
   (That's one of my concerns about using them for exception handling,
where it's important that they not be ignored.)

- Ian McIntosh          IBM Canada Lab         Compiler Back End Support
and Development

----- Forwarded by Ian McIntosh/Toronto/IBM on 2014-09-17 06:24 PM -----
|------------>
| From:      |
|------------>
  >------------------------------------------------------------------------------------------------------------------------------------------|
  |David Hough CFP <pcfp at oakapple.net>                                                                                                       |
  >------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  >------------------------------------------------------------------------------------------------------------------------------------------|
  |cfp-interest at ucbtest.org,                                                                                                                 |
  >------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  >------------------------------------------------------------------------------------------------------------------------------------------|
  |2014-07-28 05:04 PM                                                                                                                       |
  >------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  >------------------------------------------------------------------------------------------------------------------------------------------|
  |Re: [Cfp-interest] exploring __attribute__                                                                                                |
  >------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Sent by:   |
|------------>
  >------------------------------------------------------------------------------------------------------------------------------------------|
  |cfp-interest-bounces at oakapple.net                                                                                                         |
  >------------------------------------------------------------------------------------------------------------------------------------------|






> http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1422.pdf

It looks like some of the objection was to having a portable syntax for
non-portable semantics.      The things that we propose would either be
semantics mandatory for all implementations (alt exception handling)
or pragma-like permissions for optimizations and expression evaluations.

Would we really want to have real keywords in the language for all
the things we'd want to do?      That seems to be a heavy burden unless
the scope is restricted to a context like pragma or attribute.

In the mandatory, as opposed to permission, category, there are

on exception goto

on exception substitute

on underflow abrupt

that we really need to support somehow.     #pragma, __attribute__,
and try/catch already seem to have an unhappy history with the C
Committee.

_______________________________________________
Cfp-interest mailing list
Cfp-interest at oakapple.net
http://mailman.oakapple.net/mailman/listinfo/cfp-interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20140917/e75f034d/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecblank.gif
Type: image/gif
Size: 45 bytes
Desc: not available
Url : http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20140917/e75f034d/attachment.gif 


More information about the Cfp-interest mailing list