public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/27509]  New: wrong warning about an unused variable
@ 2006-05-08 20:09 toralf dot foerster at gmx dot de
  2006-05-08 20:36 ` [Bug c/27509] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: toralf dot foerster at gmx dot de @ 2006-05-08 20:09 UTC (permalink / raw)
  To: gcc-bugs

gcc complains about an unused variable while ompiling the kernel tree
2.6.17-rc3-git14 :

...
  CC      mm/vmscan.o
mm/vmscan.c: In function `remove_mapping':
mm/vmscan.c:382: warning: unused variable `swap'
  CC      mm/prio_tree.o
  CC      mm/util.o

...


But the variable seems to be used :
...
        if (PageSwapCache(page)) {
                swp_entry_t swap = { .val = page_private(page) };
                __delete_from_swap_cache(page);
                write_unlock_irq(&mapping->tree_lock);
                swap_free(swap); <-----------------------------------
...

The compiler version is:

$> gcc -v
Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.5/specs
Configured with: /var/tmp/portage/gcc-3.4.5-r1/work/gcc-3.4.5/configure
--prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.4.5
--includedir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.5
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.5/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.5/info
--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/include/g++-v3
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec
--enable-nls --without-included-gettext --with-system-zlib --disable-checking
--disable-werror --disable-libunwind-exceptions --disable-multilib
--disable-libgcj --enable-languages=c,c++,f77 --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 3.4.5 (Gentoo 3.4.5-r1, ssp-3.4.5-1.0, pie-8.7.9)


And this the host system: 

$> uname -a
Linux n22 2.6.16-gentoo-r6 #3 Fri May 5 11:59:58 CEST 2006 i686 Intel(R)
Pentium(R) M processor 1700MHz GNU/Linux

The kernel config can be found here
http://bugzilla.kernel.org/attachment.cgi?id=8037&action=view


-- 
           Summary: wrong warning about an unused variable
           Product: gcc
           Version: 3.4.5
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: toralf dot foerster at gmx dot de


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


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

* [Bug c/27509] wrong warning about an unused variable
  2006-05-08 20:09 [Bug preprocessor/27509] New: wrong warning about an unused variable toralf dot foerster at gmx dot de
@ 2006-05-08 20:36 ` pinskia at gcc dot gnu dot org
  2006-05-08 20:46 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-08 20:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-05-08 20:36 -------
Can you attach the preprocessed source?


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
          Component|preprocessor                |c


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


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

* [Bug c/27509] wrong warning about an unused variable
  2006-05-08 20:09 [Bug preprocessor/27509] New: wrong warning about an unused variable toralf dot foerster at gmx dot de
  2006-05-08 20:36 ` [Bug c/27509] " pinskia at gcc dot gnu dot org
@ 2006-05-08 20:46 ` pinskia at gcc dot gnu dot org
  2006-05-09 14:52 ` toralf dot foerster at gmx dot de
  2006-05-09 15:18 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-08 20:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-05-08 20:45 -------
That might not mean swap is used.  swap_free could be a macro which just is
does nothing.


-- 


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


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

* [Bug c/27509] wrong warning about an unused variable
  2006-05-08 20:09 [Bug preprocessor/27509] New: wrong warning about an unused variable toralf dot foerster at gmx dot de
  2006-05-08 20:36 ` [Bug c/27509] " pinskia at gcc dot gnu dot org
  2006-05-08 20:46 ` pinskia at gcc dot gnu dot org
@ 2006-05-09 14:52 ` toralf dot foerster at gmx dot de
  2006-05-09 15:18 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: toralf dot foerster at gmx dot de @ 2006-05-09 14:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from toralf dot foerster at gmx dot de  2006-05-09 14:52 -------
you're right, bug can be closed.


-- 


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


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

* [Bug c/27509] wrong warning about an unused variable
  2006-05-08 20:09 [Bug preprocessor/27509] New: wrong warning about an unused variable toralf dot foerster at gmx dot de
                   ` (2 preceding siblings ...)
  2006-05-09 14:52 ` toralf dot foerster at gmx dot de
@ 2006-05-09 15:18 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-09 15:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2006-05-09 15:16 -------
Invalid as requested by the reported.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID


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


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

end of thread, other threads:[~2006-05-09 15:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-08 20:09 [Bug preprocessor/27509] New: wrong warning about an unused variable toralf dot foerster at gmx dot de
2006-05-08 20:36 ` [Bug c/27509] " pinskia at gcc dot gnu dot org
2006-05-08 20:46 ` pinskia at gcc dot gnu dot org
2006-05-09 14:52 ` toralf dot foerster at gmx dot de
2006-05-09 15:18 ` pinskia at gcc dot gnu dot org

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).