bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Make 3.79.1 on OpenVMS


From: zinser
Subject: Make 3.79.1 on OpenVMS
Date: Wed, 25 Sep 2002 04:10:35 +0200

Hello,

I was recently contacted by a user trying to build GNU make on OpenVMS.
This prompted me to check version 3.79.1 on my own system and I did 
receive the following messages during compilation:

$ @makefile
Compiling alloca...
Compiling ar...
Compiling arscan...
Compiling commands...
Compiling default...
Compiling dir...
Compiling expand...
Compiling file...

  if (! (s <= FILE_TIMESTAMP_S (ORDINARY_MTIME_MAX)
..............^
%CC-I-QUESTCOMPARE, In this statement, the unsigned expression 
 "(unsigned long)-1" is being compared with a relational operator to a
 constant whose value is not greater than zero.  This might not be what you 
 intended.
at line number 570 in file DISK$USER:[ZINSER.TMP.MAKE]file.c;4


---> This and the following Macro related informationals ultimatly
     all boil down to the usage of the following construction
     
     /* Nonzero if the integer type T is signed.  */
     #define INTEGER_TYPE_SIGNED(t) ((t) -1 < 0)
     
     For an unsigned type (like e.g. time_t in OpenVMS) this does
     cause the message shown above. Since this is more or less 
     intentional the "solution" for this problem is to suppress 
     this type of message for normal builds. To still be able 
     to see what is going on for developers I did add a new
     parameter to makefile.com (wall, similar to the GCC usage)
     to enable the messages again. 

     
     
         && product <= ts && ts <= ORDINARY_MTIME_MAX))
...................................^
%CC-I-QUESTCOMPARE, In this statement, the unsigned expression 
 "(unsigned long)-1" is being compared with a relational operator to a
 constant whose value is not greater than zero.  This might not be what you 
 intended.
at line number 571 in file DISK$USER:[ZINSER.TMP.MAKE]file.c;4

      ts = s <= OLD_MTIME ? ORDINARY_MTIME_MIN : ORDINARY_MTIME_MAX;
.................................................^
%CC-I-QUESTCOMPARE, In this statement, the unsigned expression 
 "(unsigned long)-1" is being compared with a relational operator to a
 constant whose value is not greater than zero.  This might not be what you 
 intended.
at line number 574 in file DISK$USER:[ZINSER.TMP.MAKE]file.c;4

  else if (t < 0)
...........^
%CC-I-QUESTCOMPARE, In this statement, the unsigned expression "t" is being 
 compared with a relational operator to a constant whose
 value is not greater than zero.  This might not be what you intended.
at line number 639 in file DISK$USER:[ZINSER.TMP.MAKE]file.c;4

---> In this instance a unsigned (time_t) variable is compared 
     against a negative value. A quick fix (which is applied below)
     is to ifdef the code section for VMS. A more general solution 
     would be to have a TIME_T_UNSIGNED macro defined in config.h and
     use that in this place.   

Compiling function...

  while ((t = find_next_token (&text, &len)) != 0)
......................................^
%CC-W-PTRMISMATCH1, In this statement, the referenced type of the pointer 
 value "&len" is "int", which is not compatible with "unsigned int" because 
 they differ by signed/unsigned attribute.
 
---> Simple fix, make len unsigned as expected by find_next_token
 
at line number 162 in file DISK$USER:[ZINSER.TMP.MAKE]function.c;4
Compiling implicit...
Compiling job...
Compiling main...

          f->last_mtime = f->mtime_before_update = NEW_MTIME;
...................................................^
%CC-I-QUESTCOMPARE, In this statement, the unsigned expression 
 "(unsigned long)-1" is being compared with a relational operator to a
 constant whose value is not greater than zero.  This might not be what you 
 intended.
at line number 1597 in file DISK$USER:[ZINSER.TMP.MAKE]main.c;1
Compiling misc...
Compiling read...
Compiling remake...

      file->last_mtime = i == 0 ? UNKNOWN_MTIME : NEW_MTIME;
..................................................^
%CC-I-QUESTCOMPARE, In this statement, the unsigned expression 
 "(unsigned long)-1" is being compared with a relational operator to a
 constant whose value is not greater than zero.  This might not be what you 
 intended.
at line number 756 in file DISK$USER:[ZINSER.TMP.MAKE]remake.c;1
Compiling remote-stub...
Compiling rule...
Compiling signame...
Compiling variable...

          if (listp)
..............^
%CC-E-UNDECLARED, In this statement, "listp" is not declared.
at line number 204 in file DISK$USER:[ZINSER.TMP.MAKE]variable.c;3

---> This is really serious since it does cause the compilation 
     to fail entirely. Since listp does not seem to be used really
     in the code my current workaround is to put in in comments
     (this is a OpenVMS specific section of the code anyhow).
     Maybe Harmut can suggest a  better solution for this issue. 

All the proposed changes are accumulated in the patch below. Besides of 
the len change (which has been cross tested on Linux (2.4.18, GCC 2.95.3)
everything is VMS specific so far, so I hope you might consider them
for inclusion in 3.79.x

Greetings, Martin  

*** file.c.orig Fri Sep 20 00:24:33 2002
--- file.c      Fri Sep 20 00:24:45 2002
***************
*** 636,643 ****
--- 636,645 ----
      sprintf (p, "%04d-%02d-%02d %02d:%02d:%02d",
             tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
             tm->tm_hour, tm->tm_min, tm->tm_sec);
+ #ifndef VMS
    else if (t < 0)
      sprintf (p, "%ld", (long) t);
+ #endif
    else
      sprintf (p, "%lu", (unsigned long) t);
    p += strlen (p);
*** function.c.orig     Fri Sep 20 00:28:56 2002
--- function.c  Fri Sep 20 00:31:17 2002
***************
*** 128,134 ****
    unsigned int pattern_prepercent_len, pattern_postpercent_len;
    unsigned int replace_prepercent_len, replace_postpercent_len = 0;
    char *t;
!   int len;
    int doneany = 0;
  
    /* We call find_percent on REPLACE before checking PATTERN so that REPLACE
--- 128,134 ----
    unsigned int pattern_prepercent_len, pattern_postpercent_len;
    unsigned int replace_prepercent_len, replace_postpercent_len = 0;
    char *t;
!   unsigned int len;
    int doneany = 0;
  
    /* We call find_percent on REPLACE before checking PATTERN so that REPLACE
*** variable.c.orig     Fri Sep 20 17:54:29 2002
--- variable.c  Fri Sep 20 17:54:51 2002
***************
*** 201,208 ****
--- 201,210 ----
          sptr = value;
          scnt = 0;
  
+ /* listp not defined anywhere 
            if (listp)
              *listp = current_variable_set_list;
+ */
  
          while ((sptr = strchr (sptr, '$')))
            {
*** makefile.com.orig   Fri Sep 20 18:13:49 2002
--- makefile.com        Fri Sep 20 20:32:59 2002
***************
*** 4,12 ****
  $! P1 is non-empty if you want to link with the VAXCRTL library instead
  $!    of the shareable executable
  $! P2 = DEBUG will build an image with debug information
  $!
  $! In case of problems with the install you might contact me at
! $! address@hidden (preferred) or address@hidden
  $
  $! hb
  $! But don't ask Martin Zinser about the lines, I added/changed.
--- 4,14 ----
  $! P1 is non-empty if you want to link with the VAXCRTL library instead
  $!    of the shareable executable
  $! P2 = DEBUG will build an image with debug information
+ $! P3 = WALL will enable all warning messages (some are suppressed since
+ $!      one macro intentionally causes an error condition)
  $!
  $! In case of problems with the install you might contact me at
! $! address@hidden (preferred) or address@hidden
  $
  $! hb
  $! But don't ask Martin Zinser about the lines, I added/changed.
***************
*** 49,54 ****
--- 51,63 ----
  $ else
  $   lopt = ""
  $ endif
+ $!
+ $! Do we want to see all warnings
+ $!
+ $ if (p3.nes."WALL")
+ $ then
+ $   ccopt = ccopt + "/warn=(disable=questcompare)"
+ $ endif
  $ filelist = "alloca ar arscan commands default dir expand file function 
implicit job main misc read remake remote-stub rule signame variable version 
vmsfunctions vmsify vpath [.glob]glob [.glob]fnmatch getopt1 getopt"
  $ copy config.h-vms config.h
  $ n=0
***************
*** 80,85 ****
  $ filnam = p1
  $ if ploc .lt. f$length(p1) then filnam=f$extract(ploc+1,100,p1)
  $ write optf "''filnam'"
! $ 
cc'ccopt'/include=([],[.glob])/define=("allocated_variable_expand_for_file=alloc_var_expand_for_file","unlink=remove","HAVE_CONFIG_H","VMS")
 'p1'
  $ exit
  $ endsubroutine : compileit
--- 89,96 ----
  $ filnam = p1
  $ if ploc .lt. f$length(p1) then filnam=f$extract(ploc+1,100,p1)
  $ write optf "''filnam'"
! $ cc'ccopt'/include=([],[.glob]) - 
!   
/define=("allocated_variable_expand_for_file=alloc_var_expand_for_file","unlink=remove","HAVE_CONFIG_H","VMS")
 - 
!   'p1'
  $ exit
  $ endsubroutine : compileit
Dr. Martin P.J. Zinser                              Email: address@hidden
2512 Victor Avenue                                  Phone: +1 312 523 6659
Glenview, IL, 60025                                 FAX:   +1 312 408 3071
USA




reply via email to

[Prev in Thread] Current Thread [Next in Thread]