From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stuart D. Herring" Newsgroups: gmane.emacs.devel Subject: Re: Problem report #3 Date: Mon, 1 May 2006 13:27:03 -0700 (PDT) Message-ID: <33124.128.165.123.132.1146515223.squirrel@webmail.lanl.gov> References: <200604301642.k3UGg5S4028988@scanner2.ics.uci.edu> Reply-To: herring@lanl.gov NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1146515258 7171 80.91.229.2 (1 May 2006 20:27:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 1 May 2006 20:27:38 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 01 22:27:34 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FaezP-0002Cm-4v for ged-emacs-devel@m.gmane.org; Mon, 01 May 2006 22:27:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FaezO-00052m-FK for ged-emacs-devel@m.gmane.org; Mon, 01 May 2006 16:27:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FaezB-0004zn-ND for emacs-devel@gnu.org; Mon, 01 May 2006 16:27:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Faez9-0004yg-VF for emacs-devel@gnu.org; Mon, 01 May 2006 16:27:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Faez9-0004yc-Gm for emacs-devel@gnu.org; Mon, 01 May 2006 16:27:11 -0400 Original-Received: from [192.65.95.54] (helo=mailwasher-b.lanl.gov) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Faez8-0000Zu-BQ for emacs-devel@gnu.org; Mon, 01 May 2006 16:27:11 -0400 Original-Received: from mailrelay2.lanl.gov (mailrelay2.lanl.gov [128.165.4.103]) by mailwasher-b.lanl.gov (8.12.11.20060308/8.12.11/(ccn-5)) with ESMTP id k41KR4j8005035 for ; Mon, 1 May 2006 14:27:04 -0600 Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay2.lanl.gov (8.12.11.20060308/8.12.11/(ccn-5)) with ESMTP id k41KR3Ub008131; Mon, 1 May 2006 14:27:03 -0600 Original-Received: from webmail1.lanl.gov (localhost.localdomain [127.0.0.1]) by webmail1.lanl.gov (8.12.11.20060308/8.12.11) with ESMTP id k41KR3NH030277; Mon, 1 May 2006 14:27:03 -0600 Original-Received: (from apache@localhost) by webmail1.lanl.gov (8.12.11.20060308/8.12.11/Submit) id k41KR3SO030274; Mon, 1 May 2006 13:27:03 -0700 X-Authentication-Warning: webmail1.lanl.gov: apache set sender to herring@lanl.gov using -f Original-Received: from 128.165.123.132 (SquirrelMail authenticated user 196434); by webmail.lanl.gov with HTTP; Mon, 1 May 2006 13:27:03 -0700 (PDT) In-Reply-To: <200604301642.k3UGg5S4028988@scanner2.ics.uci.edu> Original-To: "Dan Nicolaescu" User-Agent: SquirrelMail/1.4.3a-11.EL3 X-Mailer: SquirrelMail/1.4.3a-11.EL3 X-Priority: 3 (Normal) Importance: Normal X-PMX-Version: 4.7.1.128075 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:53744 Archived-At: > 3258 while (!feof (inf)) > 3259 { > 3260 c = *lp++; > > Event equality_cond: Cond "c == 92" evaluated as false > 3261 if (c == '\\') > 3262 { > 3263 /* If we are at the end of the line, the next character is a > 3264 '\0'; do not skip it, because it is what tells us > 3265 to read the next line. */ > 3266 if (*lp == '\0') > 3267 { > 3268 quotednl = TRUE; > 3269 continue; > 3270 } > 3271 lp++; > > Event assignment: Assigning "32" to "c" > Event const: After this line, the value of "c" is equal to 32 > Also see events: > [dead_error_line][dead_error_condition][new_values][equality_cond][new_values][new_values][new_values][const][const][const][assignment][const][equality_cond][const][const][const] > > 3272 c = ' '; This is odd; it seems to say that the if fails, but it still notices and uses the constant value 32 assigned to c only if that test passes. > 3337 else switch (c) > 3338 { > > Event new_values: Conditional "c == 34" Now it seems to be concerned that additional values for c that are never generated are checked for. But of course *lp++ can evaluate to anything, so this is not an issue. > 3339 case '"': > 3340 inquote = TRUE; > 3341 if (inattribute) > 3342 break; > 3343 switch (fvdef) > 3344 { > 3345 case fdefunkey: > 3346 case fstartlist: > 3347 case finlist: > 3348 case fignore: > 3349 case vignore: > 3350 break; > 3351 default: > 3352 fvextern = FALSE; > 3353 fvdef = fvnone; > 3354 } > 3355 continue; > > Event new_values: Conditional "c == 39" > Also see events: > [dead_error_line][dead_error_condition][new_values][equality_cond][assignment][new_values][new_values][const][const][const][assignment][const][equality_cond][const][const][const] > > 3356 case '\'': > 3357 inchar = TRUE; > 3358 if (inattribute) > 3359 break; > 3360 if (fvdef != finlist && fvdef != fignore && fvdef !=vignore) > 3361 { > 3362 fvextern = FALSE; > 3363 fvdef = fvnone; > 3364 } > 3365 continue; > > Event new_values: Conditional "c == 47" > Also see events: > [dead_error_line][dead_error_condition][new_values][equality_cond][assignment][new_values][new_values][const][const][const][assignment][const][equality_cond][const][const][const] > > 3366 case '/': > 3367 if (*lp == '*') > 3368 { > 3369 lp++; > 3370 incomm = TRUE; > 3371 continue; > 3372 } > 3373 else if (/* cplpl && */ *lp == '/') > 3374 { > > Event const: After this line, the value of "c" is equal to 0 > Event assignment: Assigning "0" to "c" > Also see events: > [dead_error_line][dead_error_condition][new_values][equality_cond][assignment][new_values][new_values][new_values][const][const][assignment][const][equality_cond][const][const][const] > > 3375 c = '\0'; > 3376 break; > 3377 } > 3378 else > 3379 break; > > Event new_values: Conditional "c == 37" > Also see events: > [dead_error_line][dead_error_condition][new_values][equality_cond][assignment][new_values][new_values][const][const][const][assignment][const][equality_cond][const][const][const] > > 3380 case '%': > 3381 if ((c_ext & YACC) && *lp == '%') > 3382 { > 3383 /* Entering or exiting rules section in yacc file. */ > 3384 lp++; > 3385 definedef = dnone; fvdef = fvnone; fvextern = FALSE; > 3386 typdef = tnone; structdef = snone; > 3387 midtoken = inquote = inchar = incomm = quotednl = FALSE; > 3388 bracelev = 0; > 3389 yacc_rules = !yacc_rules; > 3390 continue; > 3391 } > 3392 else > 3393 break; > 3394 case '#': > 3395 if (definedef == dnone) > 3396 { > 3397 char *cp; > 3398 bool cpptoken = TRUE; > 3399 > 3400 /* Look back on this line. If all blanks, or nonblanks > 3401 followed by an end of comment, this is a preprocessor > 3402 token. */ > 3403 for (cp = newlb.buffer; cp < lp-1; cp++) > 3404 if (!iswhite (*cp)) > 3405 { > 3406 if (*cp == '*' && *(cp+1) == '/') > 3407 { > 3408 cp++; > 3409 cpptoken = TRUE; > 3410 } > 3411 else > 3412 cpptoken = FALSE; > 3413 } > 3414 if (cpptoken) > 3415 definedef = dsharpseen; > 3416 } /* if (definedef == dnone) */ > 3417 continue; > 3418 case '[': > 3419 bracketlev++; > 3420 continue; > 3421 } /* switch (c) */ > 3422 > 3423 > 3424 /* Consider token only if some involved conditions are > satisfied. */ > 3425 if (typdef != tignore > 3426 && definedef != dignorerest > 3427 && fvdef != finlist > 3428 && templatelev == 0 > 3429 && (definedef != dnone > 3430 || structdef != scolonseen) > 3431 && !inattribute) > 3432 { > 3433 if (midtoken) > 3434 { > 3435 if (endtoken (c)) > 3436 { > > Event const: After this line, the value of "c" is equal to 32 > Event equality_cond: Cond "c == 58" evaluated as false > Also see events: > [dead_error_line][dead_error_condition][new_values][equality_cond][assignment][new_values][new_values][new_values][const][const][assignment][const][equality_cond][const][const][const] > > 3437 if (c == ':' && *lp == ':' && begtoken (lp[1])) And finally it's assuming its value of 32 for c, when there's no guarantee of that at all. So there's no bug here that I can see. Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.