public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/15004] New: [3.4/3.5 Regression] [unit-at-a-time] no wanring for unused paramater in static function
@ 2004-04-18 15:59 pinskia at gcc dot gnu dot org
  2004-04-18 16:07 ` [Bug c/15004] " pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-18 15:59 UTC (permalink / raw)
  To: gcc-bugs

Since t is inlined and no longer even tried to be emitted anymore there is no unused 
paramater warning for t.
 
static int t(int i)
{
  return 0;
}
int tt()
{
  return t(0);
}

-- 
           Summary: [3.4/3.5 Regression] [unit-at-a-time] no wanring for
                    unused paramater in static function
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: minor
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,hubicka at gcc dot gnu
                    dot org


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


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

* [Bug c/15004] [3.4/3.5 Regression] [unit-at-a-time] no wanring for unused paramater in static function
  2004-04-18 15:59 [Bug c/15004] New: [3.4/3.5 Regression] [unit-at-a-time] no wanring for unused paramater in static function pinskia at gcc dot gnu dot org
@ 2004-04-18 16:07 ` pinskia at gcc dot gnu dot org
  2004-04-18 18:17 ` [Bug c/15004] [3.4/3.5 Regression] [unit-at-a-time] no warning " bangerth at dealii dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-18 16:07 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |3.4.1


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


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

* [Bug c/15004] [3.4/3.5 Regression] [unit-at-a-time] no warning for unused paramater in static function
  2004-04-18 15:59 [Bug c/15004] New: [3.4/3.5 Regression] [unit-at-a-time] no wanring for unused paramater in static function pinskia at gcc dot gnu dot org
  2004-04-18 16:07 ` [Bug c/15004] " pinskia at gcc dot gnu dot org
@ 2004-04-18 18:17 ` bangerth at dealii dot org
  2004-04-18 21:37 ` hubicka at ucw dot cz
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bangerth at dealii dot org @ 2004-04-18 18:17 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[3.4/3.5 Regression] [unit- |[3.4/3.5 Regression] [unit-
                   |at-a-time] no wanring for   |at-a-time] no warning for
                   |unused paramater in static  |unused paramater in static
                   |function                    |function


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


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

* [Bug c/15004] [3.4/3.5 Regression] [unit-at-a-time] no warning for unused paramater in static function
  2004-04-18 15:59 [Bug c/15004] New: [3.4/3.5 Regression] [unit-at-a-time] no wanring for unused paramater in static function pinskia at gcc dot gnu dot org
  2004-04-18 16:07 ` [Bug c/15004] " pinskia at gcc dot gnu dot org
  2004-04-18 18:17 ` [Bug c/15004] [3.4/3.5 Regression] [unit-at-a-time] no warning " bangerth at dealii dot org
@ 2004-04-18 21:37 ` hubicka at ucw dot cz
  2004-04-18 21:50 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: hubicka at ucw dot cz @ 2004-04-18 21:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From hubicka at ucw dot cz  2004-04-18 21:14 -------
Subject: Re:  [3.4/3.5 Regression] [unit-at-a-time] no warning for unused paramater in static function

Do we realy want this to have warned?  We never did so for C++ and it
would be pretty expensive to throw all the function into backend just to
get the warnings out.  Perhaps we may want to have such warnings only
for code that is really used...

Honza


-- 


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


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

* [Bug c/15004] [3.4/3.5 Regression] [unit-at-a-time] no warning for unused paramater in static function
  2004-04-18 15:59 [Bug c/15004] New: [3.4/3.5 Regression] [unit-at-a-time] no wanring for unused paramater in static function pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-04-18 21:37 ` hubicka at ucw dot cz
@ 2004-04-18 21:50 ` pinskia at gcc dot gnu dot org
  2004-04-18 23:05 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-18 21:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-18 21:29 -------
Yes we want this, as if the function is too big to be inlined the function is warned about but if it is okay 
to be inlined it will be inlined and not warned about which right now is causing a bootstrap failure on 
some targets as the warning only applies to some targets only.  Maybe this warning needs to be done 
earlier for C and C++ in that needs to be moved into the front-end or moved so that goes through 
some of these warnings no matter what.

-- 


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


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

* [Bug c/15004] [3.4/3.5 Regression] [unit-at-a-time] no warning for unused paramater in static function
  2004-04-18 15:59 [Bug c/15004] New: [3.4/3.5 Regression] [unit-at-a-time] no wanring for unused paramater in static function pinskia at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-04-18 21:50 ` pinskia at gcc dot gnu dot org
@ 2004-04-18 23:05 ` pinskia at gcc dot gnu dot org
  2004-04-18 23:17 ` bangerth at dealii dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-18 23:05 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-04-18 21:56:15
               date|                            |


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


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

* [Bug c/15004] [3.4/3.5 Regression] [unit-at-a-time] no warning for unused paramater in static function
  2004-04-18 15:59 [Bug c/15004] New: [3.4/3.5 Regression] [unit-at-a-time] no wanring for unused paramater in static function pinskia at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-04-18 23:05 ` pinskia at gcc dot gnu dot org
@ 2004-04-18 23:17 ` bangerth at dealii dot org
  2004-04-28 23:38 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bangerth at dealii dot org @ 2004-04-18 23:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-04-18 22:31 -------
>From a user's perspective: yes, we want the warning. It is confusing 
if the warning depends on the inlining strategy or optimization flags. 
Besides this, the warning usually shows a real deficiency in user's code, 
which we certainly don't want to paper over just because we inline the 
function. 
W. 

-- 


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


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

* [Bug c/15004] [3.4/3.5 Regression] [unit-at-a-time] no warning for unused paramater in static function
  2004-04-18 15:59 [Bug c/15004] New: [3.4/3.5 Regression] [unit-at-a-time] no wanring for unused paramater in static function pinskia at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2004-04-18 23:17 ` bangerth at dealii dot org
@ 2004-04-28 23:38 ` cvs-commit at gcc dot gnu dot org
  2004-04-29  0:38 ` [Bug c/15004] [3.4 " pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-04-28 23:38 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-04-28 20:40 -------
Subject: Bug 15004

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	hubicka@gcc.gnu.org	2004-04-28 20:40:55

Modified files:
	gcc            : ChangeLog Makefile.in cgraphunit.c function.c 
	                 function.h 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: unused-6.c 

Log message:
	* gcc.dg/unused-6.c: New test.
	
	PR c/15004
	* function.c (do_warn_unused_parameter): Break out form ...
	(expand_function_end): ... here; warn only when not using cgraphunit.
	* function.h (do_warn_unused_parameter): Declare.
	* cgraphunit.c: Include function.h.
	(cgraph_finalize_function): Do unused parameter warning.
	* Makefile.in (cgraphunit.o): Depend on function.h

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3504&r2=2.3505
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/Makefile.in.diff?cvsroot=gcc&r1=1.1273&r2=1.1274
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cgraphunit.c.diff?cvsroot=gcc&r1=1.55&r2=1.56
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/function.c.diff?cvsroot=gcc&r1=1.512&r2=1.513
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/function.h.diff?cvsroot=gcc&r1=1.112&r2=1.113
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3704&r2=1.3705
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/unused-6.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug c/15004] [3.4 Regression] [unit-at-a-time] no warning for unused paramater in static function
  2004-04-18 15:59 [Bug c/15004] New: [3.4/3.5 Regression] [unit-at-a-time] no wanring for unused paramater in static function pinskia at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2004-04-28 23:38 ` cvs-commit at gcc dot gnu dot org
@ 2004-04-29  0:38 ` pinskia at gcc dot gnu dot org
  2004-05-05 23:24 ` cvs-commit at gcc dot gnu dot org
  2004-05-05 23:27 ` hubicka at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-29  0:38 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-29 00:17 -------
Fixed on the mainline right now.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |3.4.0
      Known to work|                            |3.3.3 3.5.0
            Summary|[3.4/3.5 Regression] [unit- |[3.4 Regression] [unit-at-a-
                   |at-a-time] no warning for   |time] no warning for unused
                   |unused paramater in static  |paramater in static function
                   |function                    |


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


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

* [Bug c/15004] [3.4 Regression] [unit-at-a-time] no warning for unused paramater in static function
  2004-04-18 15:59 [Bug c/15004] New: [3.4/3.5 Regression] [unit-at-a-time] no wanring for unused paramater in static function pinskia at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2004-04-29  0:38 ` [Bug c/15004] [3.4 " pinskia at gcc dot gnu dot org
@ 2004-05-05 23:24 ` cvs-commit at gcc dot gnu dot org
  2004-05-05 23:27 ` hubicka at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-05-05 23:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-05-05 23:24 -------
Subject: Bug 15004

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	hubicka@gcc.gnu.org	2004-05-05 23:24:31

Modified files:
	gcc            : ChangeLog Makefile.in cgraphunit.c function.c 
	                 function.h 

Log message:
	PR c/15004
	* function.c (do_warn_unused_parameter): Break out form ...
	(expand_function_end): ... here; warn only when not using cgraphunit.
	* function.h (do_warn_unused_parameter): Declare.
	* cgraphunit.c: Include function.h.
	(cgraph_finalize_function): Do unused parameter warning.
	* Makefile.in (cgraphunit.o): Depend on function.h

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.432&r2=2.2326.2.433
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/Makefile.in.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1223.2.15&r2=1.1223.2.16
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cgraphunit.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.46.2.5&r2=1.46.2.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/function.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.483.4.11&r2=1.483.4.12
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/function.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.108.4.2&r2=1.108.4.3



-- 


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


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

* [Bug c/15004] [3.4 Regression] [unit-at-a-time] no warning for unused paramater in static function
  2004-04-18 15:59 [Bug c/15004] New: [3.4/3.5 Regression] [unit-at-a-time] no wanring for unused paramater in static function pinskia at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2004-05-05 23:24 ` cvs-commit at gcc dot gnu dot org
@ 2004-05-05 23:27 ` hubicka at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2004-05-05 23:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From hubicka at gcc dot gnu dot org  2004-05-05 23:27 -------
Commited a fix to 3.4 branch. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2004-05-05 23:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-18 15:59 [Bug c/15004] New: [3.4/3.5 Regression] [unit-at-a-time] no wanring for unused paramater in static function pinskia at gcc dot gnu dot org
2004-04-18 16:07 ` [Bug c/15004] " pinskia at gcc dot gnu dot org
2004-04-18 18:17 ` [Bug c/15004] [3.4/3.5 Regression] [unit-at-a-time] no warning " bangerth at dealii dot org
2004-04-18 21:37 ` hubicka at ucw dot cz
2004-04-18 21:50 ` pinskia at gcc dot gnu dot org
2004-04-18 23:05 ` pinskia at gcc dot gnu dot org
2004-04-18 23:17 ` bangerth at dealii dot org
2004-04-28 23:38 ` cvs-commit at gcc dot gnu dot org
2004-04-29  0:38 ` [Bug c/15004] [3.4 " pinskia at gcc dot gnu dot org
2004-05-05 23:24 ` cvs-commit at gcc dot gnu dot org
2004-05-05 23:27 ` hubicka 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).