home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
fchek284.zip
/
ftnchek-2.8.4.patch
< prev
next >
Wrap
Text File
|
1996-03-29
|
7KB
|
165 lines
Patch to apply to ftnchek 2.8.3 -> 2.8.4. Bugs fixed:
1. Treated the data type double vs. real*8 mismatch
differently for args than for function invocations. The
behavior for function invocations was wrong and is fixed.
2. Presence of EXTERNAL declaration of an undefined subprogram
would suppress cross-checking of arguments when -library
flag given and no main program present.
diff -c ftnchek-2.8.3/ftnchek.h ftnchek-2.8.4/ftnchek.h
*** ftnchek-2.8.3/ftnchek.h Wed May 31 12:07:08 1995
--- ftnchek-2.8.4/ftnchek.h Sun Nov 19 20:25:23 1995
***************
*** 16,22 ****
modify it and/or redistribute it, retaining this notice.\n\
No guarantees accompany this software."
#define VERSION_NUMBER "FTNCHEK Version 2.8 May 1995"
! #define PATCHLEVEL "Patch Level 3"
#define PROJECT_VERSION "P2" /* Project file format version number */
/* The following system defines should be defined with the -D
(for UNIX) or /DEFINE (for VMS) compiler options in the makefile,
--- 16,22 ----
modify it and/or redistribute it, retaining this notice.\n\
No guarantees accompany this software."
#define VERSION_NUMBER "FTNCHEK Version 2.8 May 1995"
! #define PATCHLEVEL "Patch Level 4"
#define PROJECT_VERSION "P2" /* Project file format version number */
/* The following system defines should be defined with the -D
(for UNIX) or /DEFINE (for VMS) compiler options in the makefile,
diff -c ftnchek-2.8.3/pgsymtab.c ftnchek-2.8.4/pgsymtab.c
*** ftnchek-2.8.3/pgsymtab.c Fri Jun 2 19:07:12 1995
--- ftnchek-2.8.4/pgsymtab.c Sun Nov 19 20:24:29 1995
***************
*** 748,759 ****
int typerrs = 0;
if(alist != defn_list && !alist->external_decl
&& !irrelevant(alist)) {
! int t1 = datatype_of(defn_list->type),
t2 = datatype_of(alist->type),
s1 = defn_list->size,
s2 = alist->size,
defsize1 = (s1 == size_DEFAULT),
! defsize2 = (s2 == size_DEFAULT);
/* If -portability, do not translate default sizes so
they will never match explicit sizes. */
if(!(port_check || local_wordsize==0)) {
--- 748,763 ----
int typerrs = 0;
if(alist != defn_list && !alist->external_decl
&& !irrelevant(alist)) {
! int c1 = storage_class_of(defn_list->type),
! c2 = storage_class_of(alist->type),
! t1 = datatype_of(defn_list->type),
t2 = datatype_of(alist->type),
s1 = defn_list->size,
s2 = alist->size,
defsize1 = (s1 == size_DEFAULT),
! defsize2 = (s2 == size_DEFAULT),
! cmptype1= type_category[t1],
! cmptype2= type_category[t2];
/* If -portability, do not translate default sizes so
they will never match explicit sizes. */
if(!(port_check || local_wordsize==0)) {
***************
*** 768,774 ****
defsize1 = defsize2 = TRUE;
}
/* Check class, type, and size */
! if(defn_list->type != alist->type ||
( (s1 != s2) &&
/*exclude char size-only mismatch betw calls */
(t1 != type_STRING ||
--- 772,778 ----
defsize1 = defsize2 = TRUE;
}
/* Check class, type, and size */
! if( (c1 != c2) || (cmptype1 != cmptype2) ||
( (s1 != s2) &&
/*exclude char size-only mismatch betw calls */
(t1 != type_STRING ||
***************
*** 1668,1675 ****
if(storage_class_of(glob_symtab[i].type) == class_SUBPROGRAM
&& ! glob_symtab[i].internal_entry) {
sort_child_list(glob_symtab[i].link.child_list);
! /* Count uncalled non-library modules for use later */
! if(!glob_symtab[i].used_flag && !glob_symtab[i].library_module)
++num_roots; /* Count tree roots for use if no mains */
}
}
--- 1672,1680 ----
if(storage_class_of(glob_symtab[i].type) == class_SUBPROGRAM
&& ! glob_symtab[i].internal_entry) {
sort_child_list(glob_symtab[i].link.child_list);
! /* Count defined but uncalled non-library modules for use later */
! if(glob_symtab[i].defined && !glob_symtab[i].used_flag &&
! !glob_symtab[i].library_module)
++num_roots; /* Count tree roots for use if no mains */
}
}
***************
*** 1720,1726 ****
*/
for(i=0; i<glob_symtab_top; i++) {
if(storage_class_of(glob_symtab[i].type) == class_SUBPROGRAM
! && !glob_symtab[i].used_flag &&
(num_roots == 0 || !glob_symtab[i].library_module) ) {
if(print_ref_list)
visit_child_reflist(&glob_symtab[i]);
--- 1725,1731 ----
*/
for(i=0; i<glob_symtab_top; i++) {
if(storage_class_of(glob_symtab[i].type) == class_SUBPROGRAM
! && glob_symtab[i].defined && !glob_symtab[i].used_flag &&
(num_roots == 0 || !glob_symtab[i].library_module) ) {
if(print_ref_list)
visit_child_reflist(&glob_symtab[i]);
diff -c ftnchek-2.8.3/project.c ftnchek-2.8.4/project.c
*** ftnchek-2.8.3/project.c Thu Oct 27 13:37:07 1994
--- ftnchek-2.8.4/project.c Tue Nov 21 12:15:07 1995
***************
*** 548,554 ****
if(is_defn && (library_mode || id_library_module)) {
gsymt->library_module = TRUE;
}
!
if(id_used_flag)
gsymt->used_flag = TRUE;
if(id_set_flag)
--- 548,555 ----
if(is_defn && (library_mode || id_library_module)) {
gsymt->library_module = TRUE;
}
! if(is_defn)
! gsymt->defined = TRUE;
if(id_used_flag)
gsymt->used_flag = TRUE;
if(id_set_flag)
diff -c ftnchek-2.8.3/symtab.c ftnchek-2.8.4/symtab.c
*** ftnchek-2.8.3/symtab.c Wed May 31 11:23:26 1995
--- ftnchek-2.8.4/symtab.c Sun Nov 19 20:15:45 1995
***************
*** 2781,2786 ****
--- 2781,2787 ----
gsymt->declared_external = TRUE;
if(loc_symtab[i].library_module)
gsymt->library_module = TRUE;
+ gsymt->defined = TRUE;
if(gsymt != curr_gsymt) {
gsymt->internal_entry = TRUE;
gsymt->link.module = curr_gsymt;
diff -c ftnchek-2.8.3/symtab.h ftnchek-2.8.4/symtab.h
*** ftnchek-2.8.3/symtab.h Wed May 31 11:23:07 1995
--- ftnchek-2.8.4/symtab.h Sun Nov 19 20:15:45 1995
***************
*** 521,526 ****
--- 521,527 ----
invoked_as_func: 1,
visited: 1, /* this entry point is in call tree */
visited_somewhere: 1, /* some entry point of module is in call tree */
+ defined: 1, /* is defined somewhere */
defined_in_include: 1,
declared_external: 1;
} Gsymtab;
Common subdirectories: ftnchek-2.8.3/test and ftnchek-2.8.4/test