Bug 2006 - Problem compiling Samba 3.0.8 with gcc 3.0.4 under linux/debian
Summary: Problem compiling Samba 3.0.8 with gcc 3.0.4 under linux/debian
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.0.8
Hardware: All Linux
: P3 normal
Target Milestone: none
Assignee: Tim Potter
QA Contact: Samba QA Contact
URL:
Keywords:
: 2039 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-11-09 13:47 UTC by Michel Gravey
Modified: 2005-08-24 10:20 UTC (History)
1 user (show)

See Also:


Attachments
Patch 1 of 2 to fix that problem (412 bytes, patch)
2004-11-09 13:49 UTC, Michel Gravey
no flags Details
Patch 2 of 2 to fix that problem (434 bytes, patch)
2004-11-09 13:53 UTC, Michel Gravey
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Gravey 2004-11-09 13:47:11 UTC
The compile fails with the following error:
"argument format specified for non-function"
It's due to a lack of a feature in gcc 3.0.x
That features only appear in gcc 3.1
As seen in cvsweb:
RCS file: /cvs/gcc/gcc/gcc/c-format.c,v
retrieving revision 1.1.4.1
retrieving revision 1.17
diff -u -r1.1.4.1 -r1.17
--- gcc/gcc/c-format.c	2001/03/02 19:51:56	1.1.4.1 gcc_3_0_4_release
+++ gcc/gcc/c-format.c	2002/02/20 22:54:32	1.17 gcc_3_1_release
....
   tree argument;
-  unsigned int arg_num;
-
-  if (TREE_CODE (decl) != FUNCTION_DECL)
-    {
-      error_with_decl (decl,
-		       "argument format specified for non-function `%s'");
-      return;
-    }
+  unsigned HOST_WIDE_INT arg_num;
....
Comment 1 Michel Gravey 2004-11-09 13:49:26 UTC
Created attachment 760 [details]
Patch 1 of 2 to fix that problem
Comment 2 Michel Gravey 2004-11-09 13:53:19 UTC
Created attachment 761 [details]
Patch 2 of 2 to fix that problem

Here it is.
It works for me.
Need futher testing but in theory, it should works without any problem.
Comment 3 Gerald (Jerry) Carter (dead mail address) 2004-11-15 14:07:34 UTC
*** Bug 2039 has been marked as a duplicate of this bug. ***
Comment 4 Gerald (Jerry) Carter (dead mail address) 2004-11-15 14:26:38 UTC
looks good.  Thanks.
Comment 5 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:20:44 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.