Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!news2.arglkargh.de!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: More useful memory functions Date: Fri, 10 Jul 2015 20:53:36 -0700 Organization: None to speak of Lines: 20 Message-ID: References: <55887709.16261531@news.xs4all.nl> <87ioadifp4.fsf@bsb.me.uk> <87d20lidn1.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="17980"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/X+PbmvgJaxEKWRiG9Jm9D" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:ViadTVxi6YOn5i7mW36twqvO6P8= sha1:9W40QmJYK9uOIqM7EWK8Avjb15U= Xref: csiph.com comp.lang.c:65230 Tim Rentsch writes: > Keith Thompson writes: [...] >> "gcc -std=cNN, -pedantic" does a reasonably good job of warning >> about code that uses gcc extensions. > > Do you know if it does any better job than just "gcc -pedantic" does? If you don't specify "-std=..." (or "-ansi"), gcc defaults to "-std=gnu89" for versions earlier than 5.1, and to "-std=gnu11" for 5.1. I *think* that "-pedantic" enables the same diagnostics for "-std=gnuNN" as for "-std=cNN". It may be that "gcc -std=gnuNN -pedantic" and "gcc -std=cNN -pedantic" are equivalent. -- 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"