Bug 24252 - [3.4/4.0/4.1 Regression] Missing "warning: control reaches end of non-void function" in static function
Summary: [3.4/4.0/4.1 Regression] Missing "warning: control reaches end of non-void fu...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.0.2
: P2 normal
Target Milestone: 4.1.0
Assignee: Not yet assigned to anyone
URL:
Keywords: diagnostic
Depends on:
Blocks:
 
Reported: 2005-10-07 10:59 UTC by Christian Helmuth
Modified: 2005-10-07 11:12 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work: 3.3.3 4.1.0
Known to fail: 3.4.0 4.0.0
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Helmuth 2005-10-07 10:59:13 UTC
// gcc 3.4.5 and 4.0.2 produce warning output 
#define STATIC

// no warning
#define STATIC static

STATIC int foo(void)
{
  int i = 47;
  i++;
}

int bar(void)
{
  if (foo()) return 1;
  return 0;
}
Comment 1 Andrew Pinski 2005-10-07 11:12:01 UTC
Fixed in 4.1.0 by change a lot of the middle-end so the patch will not be backported, so closing as fixed.  There is most likely a dup of this bug somewhere.
Comment 2 Paolo Bonzini 2006-01-04 12:21:31 UTC
Subject: Bug 24252

Author: bonzini
Date: Wed Jan  4 12:21:27 2006
New Revision: 109325

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109325
Log:
2006-01-04  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/24252

	* Makefile.def (flags_to_pass): Add STAGE1_CFLAGS and STAGE1_LANGUAGES.
	* Makefile.tpl (OBJDUMP): New.
	(EXTRA_HOST_FLAGS): Add it.
	(EXTRA_GCC_FLAGS): Remove flags already specified in flags_to_pass.

        * Makefile.tpl (stage[+id+]-start, stage[+id+]-end): Do not try
        to use symbolic links between directories.  Avoid race conditions
        or make them harmless.
        * configure.in: Do not try to use symbolic links between directories.

	* Makefile.def (LEAN): Pass.
	* Makefile.tpl (LEAN): Define.
	(stage[+id+]-start): Accept that the previous directory does not
	exist, if the bootstrap is lean.
	(stage[+id+]-bubble): Invoke lean bootstrap commands after
	stage[+id+]-start.  Use a makefile variable and an `if' instead of a
	configure substitution.
	([+compare-target+]): Likewise.
	([+bootstrap-target+]-lean): New.
	* configure.in: Remove lean bootstrap support from here.

        * Makefile.in: Regenerate.
        * configure: Regenerate.


Modified:
    trunk/ChangeLog
    trunk/Makefile.def
    trunk/Makefile.in
    trunk/Makefile.tpl
    trunk/configure
    trunk/configure.in