Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: What are these functions (warning, push, disable) are in the macro definition? Date: Wed, 05 Apr 2017 13:46:01 -0700 Organization: None to speak of Lines: 29 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="84b9d2e2596144cadf213abc805aa2ec"; logging-data="1966"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18eh2/jSkx1ezbBUbry981B" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:rNMXVy0L/yzF6RhgaBhK/kTFW1c= sha1:qp2KMNDA3IJUWB7Cz0kMz5lq8N4= Xref: csiph.com comp.lang.c:107768 fl writes: > I have a MSVC project which has the following definitions. It builds > successfully on MSVC, but I don't understand what warning, push, pop > and disable are. [...] > > ......................... > #if DSAS_MSVC > #define DSAS_MULTILINE_MACRO_END \ > __pragma( warning( push ) ) \ > __pragma( warning( disable:4127 ) ) \ > } \ > while( 0 ) \ > __pragma( warning( pop ) ) > #else /* #if DSAS_MSVC */ > #define DSAS_MULTILINE_MACRO_END \ > } \ > while ( 0 ) > #endif This is a non-standard feature of MSVC, documented here: https://msdn.microsoft.com/en-us/library/2c8f766e.aspx -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"