it is StdLib specific and other functions like abort are using it already. from StdLib/Include/sys/EfiCdefs.h: #if __GNUC_PREREQ__(2, 7) #define __unused __attribute__((__unused__)) #define __noreturn __attribute__((__noreturn__)) #else #define __unused /* delete */ #define __noreturn /* delete */ #endif
do other compilers(VC?) really don't need this or should we treat it as not being implemented? This page shows that there's sth. called '__declspec(noreturn)': https://msdn.microsoft.com/en-us/library/k6ktzx3s.aspx but obviously there are even more compilers than just gcc and vc. On Mon, Feb 8, 2016 at 5:32 PM, Andrew Fish <[email protected]> wrote: > > > On Feb 8, 2016, at 4:15 AM, Michael Zimmermann <[email protected]> > wrote: > > > > this prevents warnings like 'control reaches end of non-void function'. > > > > Contributed-under: TianoCore Contribution Agreement 1.0 > > Signed-off-by: M1cha <[email protected]> > > --- > > StdLib/Include/assert.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/StdLib/Include/assert.h b/StdLib/Include/assert.h > > index ece4f27..8369f25 100644 > > --- a/StdLib/Include/assert.h > > +++ b/StdLib/Include/assert.h > > @@ -52,7 +52,7 @@ __BEGIN_DECLS > > the application was launched from. > > **/ > > extern void > > -__assert(const char *file, const char *func, int line, const char > > *failedexpr); > > +__assert(const char *file, const char *func, int line, const char > > *failedexpr) __noreturn; > > > > Is __noreturn in the C standard or is it compiler specific? > > Thanks, > > Andrew Fish > > > __END_DECLS > > > > -- > > 2.7.0 > > _______________________________________________ > > edk2-devel mailing list > > [email protected] > > https://lists.01.org/mailman/listinfo/edk2-devel > > _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

