Function typedef and __declspec(noreturn)

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



The following declaration

typedef __declspec(noreturn) VOID WINAPI ExitThread_t(DWORD dwExitCode);

compiles fine with VC 7.1 but produces the following error

error C2495: 'ExitThread_t' : '__declspec(noreturn)' can only be applied to
function declarations or definitions

on VC 8.0. Given that the __declspec(noreturn) is not standard I cannot ask
who is right so my question is how to declare an alias to a function type
that does not return?


--
Eugene
http://www.gershnik.com



.



Relevant Pages

  • Re: Class templates and friend function templates
    ... specialised form of the operator declared in the friend declaration. ... Microsoft compilers seem to treat friend function declarations as ... Working Paper that eventually became the C++ standard. ...
    (microsoft.public.vc.language)
  • Re: More structs
    ... identifier is optional are function declarations. ... The parameter names in a function declaration are optional because the ... and so they're mandatory there. ... do without referring to the member names; ...
    (comp.lang.c)
  • help with this classes mess...
    ... I want to create a hierarchy but i fall into this ... because it is declared below declaration of class TA. ... If this was function declarations, ... C: TCParent ...
    (comp.lang.pascal.delphi.misc)
  • Re: If you could change the C or C++ or Java syntax, what would you like different?
    ... This clearly contradicts multiple examples of how the C standard uses ... a typedef name is declared and defined by a "typedef ... Note that each of the above is a declaration and a definition ... I claim that a programming language is similar to the English ...
    (comp.lang.c)
  • Re: Tentative definition versus external linkage
    ... "The Standard model is a combination of features of the strict ref/def ... appropriate declaration without storage class specifier, ... A definition of an identifier is a declaration for that ...
    (comp.lang.c)