public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/42669]  New: libcpp: five redundant tests
@ 2010-01-09  8:50 dcb314 at hotmail dot com
  2010-01-09  9:59 ` [Bug preprocessor/42669] " paolo dot carlini at oracle dot com
  0 siblings, 1 reply; 3+ messages in thread
From: dcb314 at hotmail dot com @ 2010-01-09  8:50 UTC (permalink / raw)
  To: gcc-bugs

I just ran the most excellent sourceforge tool "cppcheck" over the source
code of the GNU C compiler version 4.5 snapshot 20100107 and cppcheck said
lots of things. An extract is below.

[./libcpp/init.c:260]: (style) Redundant condition. It is safe to deallocate a
NULL pointer
[./libcpp/files.c:999]: (style) Redundant condition. It is safe to deallocate a
NULL pointer
[./libcpp/pch.c:725]: (style) Redundant condition. It is safe to deallocate a
NULL pointer
[./libcpp/pch.c:727]: (style) Redundant condition. It is safe to deallocate a
NULL pointer
[./libcpp/pch.c:729]: (style) Redundant condition. It is safe to deallocate a
NULL pointer

I've manually checked all of these and I agree with cppcheck -
the redundant conditions may be safely deleted.


-- 
           Summary: libcpp: five redundant tests
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dcb314 at hotmail dot com
  GCC host triplet: x86_64-suse-linux


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug preprocessor/42669] libcpp: five redundant tests
  2010-01-09  8:50 [Bug c++/42669] New: libcpp: five redundant tests dcb314 at hotmail dot com
@ 2010-01-09  9:59 ` paolo dot carlini at oracle dot com
  0 siblings, 0 replies; 3+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-01-09  9:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from paolo dot carlini at oracle dot com  2010-01-09 09:59 -------
Didn't I tell you already that these issues are *not* suited for Bugzilla,
because aren't user visible? Just mention the issue on gcc, or send a patch to
gcc-patches.


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |preprocessor


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug preprocessor/42669] libcpp: five redundant tests
       [not found] <bug-42669-4@http.gcc.gnu.org/bugzilla/>
@ 2013-05-13  6:43 ` skannan at redhat dot com
  0 siblings, 0 replies; 3+ messages in thread
From: skannan at redhat dot com @ 2013-05-13  6:43 UTC (permalink / raw)
  To: gcc-bugs

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

Shakthi Kannan <skannan at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |skannan at redhat dot com

--- Comment #2 from Shakthi Kannan <skannan at redhat dot com> ---
With cppcheck-1.59 on Fedora 18 (x86_64) and gcc-4.8.0, the "Redundant
condition" is not present.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-13  6:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-09  8:50 [Bug c++/42669] New: libcpp: five redundant tests dcb314 at hotmail dot com
2010-01-09  9:59 ` [Bug preprocessor/42669] " paolo dot carlini at oracle dot com
     [not found] <bug-42669-4@http.gcc.gnu.org/bugzilla/>
2013-05-13  6:43 ` skannan at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).