this breaks windows compile: CXX dbg-maps.o In file included from c:\msysgit\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../ include/windows.h:50, from dbg-asrt.cc:70: c:\msysgit\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/winbase.h:1328 : error: 'noreturn' was not declared in this scope c:\msysgit\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/winbase.h:1329 : error: 'noreturn' was not declared in this scope c:\msysgit\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/winbase.h:1389 : error: 'noreturn' was not declared in this scope make: *** [dbg-asrt.o] Error 1
2011/1/7 KiloByte <casta...@users.sourceforge.net> > via b65933317bb0002e9ea22779a614e334e1642ece (commit) > via 9c74024aaf04347ceea56318579550b3a7103532 (commit) > from 5826ef094930ec6a4cd4bb4d8ca4635f127aedcc (commit) > > ----------------------------------------------------------------------- > commit b65933317bb0002e9ea22779a614e334e1642ece > Author: Adam Borowski <kilob...@angband.pl> > Date: Fri Jan 7 01:19:54 2011 +0100 > > Follow the advice of gcc-4.6 -Wsuggest-attribute=noreturn > > commit 9c74024aaf04347ceea56318579550b3a7103532 > Author: Adam Borowski <kilob...@angband.pl> > Date: Fri Jan 7 01:19:06 2011 +0100 > > Fix tiles compile. > > ----------------------------------------------------------------------- > > Summary of changes: > crawl-ref/source/AppHdr.h | 16 ++++++++-------- > crawl-ref/source/arena.cc | 2 +- > crawl-ref/source/arena.h | 2 +- > crawl-ref/source/errors.cc | 4 ++-- > crawl-ref/source/errors.h | 4 ++-- > crawl-ref/source/stuff.cc | 6 +++--- > crawl-ref/source/stuff.h | 6 +++--- > crawl-ref/source/util/levcomp.ypp | 2 +- > 8 files changed, 21 insertions(+), 21 deletions(-) > > diff --git a/crawl-ref/source/AppHdr.h b/crawl-ref/source/AppHdr.h > index 83e8e36..09fccd5 100644 > --- a/crawl-ref/source/AppHdr.h > +++ b/crawl-ref/source/AppHdr.h > @@ -218,6 +218,14 @@ > #error Missing platform #define or unsupported compiler. > #endif > > +#if defined(__GNUC__) > +# define noreturn __attribute__ ((noreturn)) > +#elif defined(_MSC_VER) > +# define noreturn __declspec(noreturn) > +#else > +# define noreturn > +#endif > + > // > ========================================================================= > // Defines for dgamelaunch-specific things. > // > ========================================================================= > @@ -456,14 +464,6 @@ inline void UNUSED(const volatile T &) > { > } > > -#if defined(__GNUC__) > -# define noreturn __attribute__ ((noreturn)) > -#elif defined(_MSC_VER) > -# define noreturn __declspec(noreturn) > -#else > -# define noreturn > -#endif > - > // And now headers we want precompiled > #ifdef TARGET_COMPILER_VC > #include "msvc.h" > diff --git a/crawl-ref/source/arena.cc b/crawl-ref/source/arena.cc > index 189c39b..1583c77 100644 > --- a/crawl-ref/source/arena.cc > +++ b/crawl-ref/source/arena.cc > @@ -1455,7 +1455,7 @@ static void _init_arena() > initialise_item_descriptions(); > } > > -void run_arena(const std::string& teams) > +noreturn void run_arena(const std::string& teams) > { > _init_arena(); > > diff --git a/crawl-ref/source/arena.h b/crawl-ref/source/arena.h > index 2cd5a98..903f054 100644 > --- a/crawl-ref/source/arena.h > +++ b/crawl-ref/source/arena.h > @@ -14,7 +14,7 @@ struct mgen_data; > > struct coord_def; > > -void run_arena(const std::string& teams); > +noreturn void run_arena(const std::string& teams); > > monster_type arena_pick_random_monster(const level_id &place, int power, > int &lev_mons); > diff --git a/crawl-ref/source/errors.cc b/crawl-ref/source/errors.cc > index 9fd3362..c967baf 100644 > --- a/crawl-ref/source/errors.cc > +++ b/crawl-ref/source/errors.cc > @@ -13,7 +13,7 @@ > #include "libutil.h" > #include "stuff.h" > > -void fail(const char *msg, ...) > +noreturn void fail(const char *msg, ...) > { > va_list args; > va_start(args, msg); > @@ -25,7 +25,7 @@ void fail(const char *msg, ...) > throw ext_fail_exception(buf); > } > > -void sysfail(const char *msg, ...) > +noreturn void sysfail(const char *msg, ...) > { > va_list args; > va_start(args, msg); > diff --git a/crawl-ref/source/errors.h b/crawl-ref/source/errors.h > index 5a1ce80..8bc40a9 100644 > --- a/crawl-ref/source/errors.h > +++ b/crawl-ref/source/errors.h > @@ -1,8 +1,8 @@ > #ifndef ERRORS_H > #define ERRORS_H > > -void fail(const char *msg, ...); > -void sysfail(const char *msg, ...); > +noreturn void fail(const char *msg, ...); > +noreturn void sysfail(const char *msg, ...); > > class ext_fail_exception : public std::exception > { > diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc > index 4813790..dc14297 100644 > --- a/crawl-ref/source/stuff.cc > +++ b/crawl-ref/source/stuff.cc > @@ -376,7 +376,7 @@ void clear_globals_on_exit() > bool CrawlIsExiting = false; > bool CrawlIsCrashing = false; > > -void end(int exit_code, bool print_error, const char *format, ...) > +noreturn void end(int exit_code, bool print_error, const char *format, > ...) > { > std::string error = print_error? strerror(errno) : ""; > if (format) > @@ -441,7 +441,7 @@ void end(int exit_code, bool print_error, const char > *format, ...) > exit(exit_code); > } > > -void game_ended() > +noreturn void game_ended() > { > if (!crawl_state.seen_hups) > throw game_ended_condition(); > @@ -449,7 +449,7 @@ void game_ended() > end(0); > } > > -void game_ended_with_error(const std::string &message) > +noreturn void game_ended_with_error(const std::string &message) > { > if (crawl_state.seen_hups) > end(1); > diff --git a/crawl-ref/source/stuff.h b/crawl-ref/source/stuff.h > index 5883a13..bad66c7 100644 > --- a/crawl-ref/source/stuff.h > +++ b/crawl-ref/source/stuff.h > @@ -48,10 +48,10 @@ unsigned char get_ch(); > void cio_init(); > void cio_cleanup(); > void clear_globals_on_exit(); > -void end(int exit_code, bool print_err = false, > +noreturn void end(int exit_code, bool print_err = false, > const char *format = NULL, ...); > -void game_ended(); > -void game_ended_with_error(const std::string &message); > +noreturn void game_ended(); > +noreturn void game_ended_with_error(const std::string &message); > > bool print_error_screen(const char *message, ...); > void redraw_screen(); > diff --git a/crawl-ref/source/util/levcomp.ypp > b/crawl-ref/source/util/levcomp.ypp > index d7aa537..22efdac 100644 > --- a/crawl-ref/source/util/levcomp.ypp > +++ b/crawl-ref/source/util/levcomp.ypp > @@ -18,7 +18,7 @@ int yylex(); > > extern int yylineno; > > -void yyerror(const char *e) > +noreturn void yyerror(const char *e) > { > if (strstr(e, lc_desfile.c_str()) == e) > fprintf(stderr, "%s\n", e); > > -- > Dungeon Crawl Stone Soup > > > ------------------------------------------------------------------------------ > Learn how Oracle Real Application Clusters (RAC) One Node allows customers > to consolidate database storage, standardize their database environment, > and, > should the need arise, upgrade to a full multi-node Oracle RAC database > without downtime or disruption > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Crawl-ref-commits mailing list > crawl-ref-comm...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/crawl-ref-commits >
------------------------------------------------------------------------------ Gaining the trust of online customers is vital for the success of any company that requires sensitive data to be transmitted over the Web. Learn how to best implement a security strategy that keeps consumers' information secure and instills the confidence they need to proceed with transactions. http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________ Crawl-ref-discuss mailing list Crawl-ref-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/crawl-ref-discuss