http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52283

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu.org

--- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-02-16 
17:31:04 UTC ---
(In reply to comment #3)
> On Thu, 16 Feb 2012, jakub at gcc dot gnu.org wrote:
> 
> > I hope we'll eventually extend TREE_NO_WARNING to be a bit that thise tree
> > should be looked up in some hash table on what warnings should be 
> > suppressed on
> > it, so that TREE_NO_WARNING does only disable warnings that it wants to.
> 
> That won't help with the issue of not being able to set it on shared 
> trees, of course; you'll need separate trees for each use of a constant or 
> declaration for that.

What I don't understand is how Clang can track every constant / declaration
separately and still consume ten times less memory than GCC. What is it that
GCC is storing that takes so much space?

In any case TREE_NO_WARNING is almost always a bad idea. It is indiscriminate,
it silences any warning. It is unrelated to the warning code that it is trying
to silence, so one has to track the logs to see why it was added. It imposes an
overload that for most code is unnecessary (since most code is warning free).
And many of its uses are a hack to workaround corner cases of other hacks, when
the diagnostic code should just be smarter.

What is the problem with stripping the nops *before giving the error* and if it
still fails, give an error?

Reply via email to