Does ICC support GCC's __attribute__((cleanup(..)))?
The documentation (http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/cpp/lin/bldaps_cls/common/bldaps_gcc_compat_comm.htm) calims "Specifying Attributes of Variables" is supported.
The following code compiles cleanly with 126.96.36.199. But the "cleanup" doesn't really work.
The 10.1.026 compiler gives out a warning that the attribute is ignored.
The documentation does not appear to be specific on which attributes are actually supported. All I can find is that one may specify them, but that does not appear to mean they are honored. Please, advise if there is in fact a list of supported attributes.
Unfortunately, the task at my hands is C, not C++. And the atexit()-based process-level cleanup is too coarse, I do need it at the scope-level.
More specifically, I need a way to detect/disallow jumping out of the scope with goto, break, continue or return.
I also tried to embark on the documentation's claim on that branching out of the expression statement is not allowed (same page i mentioned above), but that does not seem to match my experiments. Returning and goto-ing out from an expression statement seems to be accepted by the icc.