I just tried to bootstrap the GNU C compiler version 4.3 snapshot 20070720
with the Intel C compiler. 

The Intel compiler said

../../../src/gcc-4.3-20070720/fixincludes/fixincl.c(1049): remark #593:
variable "name_len" was set but never used
../../src/gcc-4.3-20070720/gcc/c-decl.c(4708): remark #593: variable
"type_as_written" was set but never used
../../src/gcc-4.3-20070720/gcc/c-decl.c(3984): remark #593: variable
"typedef_type" was set but never used
../../src/gcc-4.3-20070720/gcc/bb-reorder.c(1227): remark #593: variable
"has_hot_blocks" was set but never used
../../src/gcc-4.3-20070720/gcc/bb-reorder.c(1528): remark #593: variable
"prev_bb" was set but never used

Here is a patch to shut up the compiler

*** gcc-4.3-20070720/fixincludes/fixincl.c.sav  2007-07-23 19:27:23.000000000
+0100
--- gcc-4.3-20070720/fixincludes/fixincl.c      2007-07-23 19:27:35.000000000
+0100
***************
*** 1046,1056 ****

    if (pz_scan != (char *) NULL)
      {
-       size_t name_len;
- 
        while ((pz_fname[0] == '.') && (pz_fname[1] == '/'))
          pz_fname += 2;
-       name_len = strlen (pz_fname);

        for (;;)
          {
--- 1046,1053 ----
*** gcc-4.3-20070720/gcc/c-decl.c.sav   2007-07-23 19:30:25.000000000 +0100
--- gcc-4.3-20070720/gcc/c-decl.c       2007-07-23 19:33:21.000000000 +0100
***************
*** 3981,3987 ****
    int volatilep;
    int type_quals = TYPE_UNQUALIFIED;
    const char *name, *orig_name;
-   tree typedef_type = 0;
    bool funcdef_flag = false;
    bool funcdef_syntax = false;
    int size_varies = 0;
--- 3981,3986 ----
***************
*** 4055,4061 ****
        type = integer_type_node;
      }

-   typedef_type = type;
    size_varies = C_TYPE_VARIABLE_SIZE (type);

    /* Diagnose defaulting to "int".  */
--- 4054,4059 ----
***************
*** 4705,4711 ****

      if (decl_context == PARM)
        {
-       tree type_as_written;
        tree promoted_type;

        /* A parameter declared as an array of T is really a pointer to T.
--- 4703,4708 ----
***************
*** 4739,4746 ****
        else if (type_quals)
          type = c_build_qualified_type (type, type_quals);

-       type_as_written = type;
- 
        decl = build_decl (PARM_DECL, declarator->u.id, type);
        if (size_varies)
          C_DECL_VARIABLE_SIZE (decl) = 1;
--- 4736,4741 ----
*** gcc-4.3-20070720/gcc/bb-reorder.c.sav       2007-07-23 19:35:22.000000000
+0100
--- gcc-4.3-20070720/gcc/bb-reorder.c   2007-07-23 19:36:44.000000000 +0100
***************
*** 1224,1230 ****
                                                      int *max_idx)
  {
    basic_block bb;
-   bool has_hot_blocks = false;
    edge e;
    int i;
    edge_iterator ei;
--- 1224,1229 ----
***************
*** 1238,1244 ****
        else
        {
          BB_SET_PARTITION (bb, BB_HOT_PARTITION);
-         has_hot_blocks = true;
        }
      }

--- 1237,1242 ----
***************
*** 1525,1531 ****
    basic_block new_bb;
    basic_block last_bb;
    basic_block dest;
-   basic_block prev_bb;
    edge succ1;
    edge succ2;
    edge crossing_edge;
--- 1523,1528 ----
***************
*** 1606,1612 ****
                  new_bb = create_basic_block (NULL, NULL, last_bb);
                  new_bb->aux = last_bb->aux;
                  last_bb->aux = new_bb;
-                 prev_bb = last_bb;
                  last_bb = new_bb;
                  /* Put appropriate instructions in new bb.  */

--- 1603,1608 ----


-- 
           Summary: five warnings and a patch
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dcb314 at hotmail dot com
  GCC host triplet: suse-linux-x86_64


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

Reply via email to