summaryrefslogtreecommitdiff
path: root/devel/cqual/patches/patch-ac
blob: 848ab400ea2cf6ddb4c840efb7a8164f98298307 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
$NetBSD: patch-ac,v 1.2 2006/01/18 23:24:12 rillig Exp $

From the maintainers via private mail. It fixes the special handling of
malloc(), which had been confusing to me. Fixed in CVS.

Index: src/analyze.c
===================================================================
RCS file: /cvsroot/cqual/cqual/src/analyze.c,v
retrieving revision 1.373
diff -u -r1.373 analyze.c
--- src/analyze.c.orig	2003-12-12 16:06:30.000000000 +0100
+++ src/analyze.c	2006-01-16 14:57:37.428011800 +0100
@@ -2273,13 +2273,16 @@ static einfo analyze_expression(expressi
       fqt = points_to_qtype(f_info.qt);
       args = arg_qtypes(fqt);
 
-      magic_info = analyze_magic_function_call(fc, fqt, env, drinfolist);
-      if (magic_info.qt)
-        {
-          magic_info.eff = effect_union(f_info.eff, magic_info.eff);
-          result = magic_info;
-          break;
-        }
+      if (flag_flow_sensitive)
+	{
+	  magic_info = analyze_magic_function_call(fc, fqt, env, drinfolist);
+	  if (magic_info.qt)
+	    {
+	      magic_info.eff = effect_union(f_info.eff, magic_info.eff);
+	      result = magic_info;
+	      break;
+	    }
+	}
 
       if (exists_effect_qual) {
 	mkleq_qual(fc->loc, &effect_qgate,