TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

GCC 4.6 - Support for selectively enabling and disabling warnings via #pragma

24 pointsby lukaszgabout 14 years ago

3 comments

jameskiltonabout 14 years ago
I'm amazed it took this long but these changes are very VERY welcome:<p>G++ now issues clearer diagnostics for missing semicolons after class, struct, and union definitions.<p>G++ now issues clearer diagnostics for missing semicolons after class member declarations.<p>G++ now issues clearer diagnostics when a colon is used in a place where a double-colon was intended.
评论 #2373025 未加载
scottdw2about 14 years ago
While this is a nice improvement, it still needs work. The biggest problem is that:<p>1. Not all warnings have a -W command line option.<p>2. Sometimes a single -W option will control more than warning message.<p>Contrast this with pretty much every Microsoft Compiler (cl, csc, vbc, fsc, ilasm), where:<p>1. Every error and warning message has a unique number<p>2. The error pragmas and command line options all take numbers as input.<p>3. Errors and warnings are prefixed by their number in compiler output.<p>This makes it easy to know exactly what's being disabled, and what you need to type to disable any warning just by reading the compiler output. Doing that with gcc requires a lot of searching through docs, and usually a bit of trial and error. I wish gcc would adopt the Microsoft model here.
hsmyersabout 14 years ago
I'm pleased with the wider availability of quad-precision....means my code can wait a bit longer before switching to very slow 'bignum' style packages.