|
From: | John W. Eaton |
Subject: | Re: positioning compiler attributes |
Date: | Sat, 02 Jan 2016 15:13:19 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 |
On 01/02/2016 01:30 AM, Rik wrote:
According to my tests, this would need to be written as OCTAVE_ATTR_NORETURN extern OCTAVE_API void foobar (args, ...); I think this obfuscates what is happening. It would be nice if we could at least segregate all the attributes so it would be something like OCTAVE_ATTR_NORETURN OCTAVE_API extern void foobar (args, ...); or maybe as Lachlan suggested OCTAVE_ATTR_NORETURN OCTAVE_API extern void foobar (args, ...); But I don't know if the __declspec that OCTAVE_API expands to on Windows systems can be placed before the extern keyword.
The GCC manual says that __declspec((dllimport)) and __declspec((dllexport)) are equivalent to __attribute__((dllimport)) and __attribute__((dllimport)), so I assume they can be used as other attributes but I don't know for sure what MSVC allows. Maybe it is documented somewhere? I can only test with MinGW.
jwe
[Prev in Thread] | Current Thread | [Next in Thread] |