From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Problem report #3 Date: Sun, 30 Apr 2006 09:42:05 -0700 Message-ID: <200604301642.k3UGg5S4028988@scanner2.ics.uci.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1146417153 29407 80.91.229.2 (30 Apr 2006 17:12:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 30 Apr 2006 17:12:33 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 30 19:12:32 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 1FaFTC-0000jf-Hy for ged-emacs-devel@m.gmane.org; Sun, 30 Apr 2006 19:12:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FaFTB-0005S0-R7 for ged-emacs-devel@m.gmane.org; Sun, 30 Apr 2006 13:12:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FaFQq-0003sE-LU for emacs-devel@gnu.org; Sun, 30 Apr 2006 13:10:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FaFQp-0003rW-1l for emacs-devel@gnu.org; Sun, 30 Apr 2006 13:10:03 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FaFQo-0003rT-Nn for emacs-devel@gnu.org; Sun, 30 Apr 2006 13:10:02 -0400 Original-Received: from [128.195.1.36] (helo=scanner2.ics.uci.edu) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FaFUR-0007x0-Ir for emacs-devel@gnu.org; Sun, 30 Apr 2006 13:13:47 -0400 Original-Received: from vino.ics.uci.edu (vino.ics.uci.edu [128.195.11.198]) by scanner2.ics.uci.edu (8.13.6/8.13.5) with ESMTP id k3UGg5S4028988 for ; Sun, 30 Apr 2006 09:42:05 -0700 (PDT) Original-To: emacs-devel@gnu.org Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 290 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (score=0.668, required 5, autolearn=disabled, ALL_TRUSTED -1.44, J_CHICKENPOX_55 0.60, J_CHICKENPOX_64 0.60, J_CHICKENPOX_65 0.60, TW_BJ 0.08, TW_FV 0.08, TW_QL 0.08, TW_YP 0.08) X-ICS-MailScanner-From: dann@vino.ics.uci.edu 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:53679 Archived-At: CID: 3 Checker: DEADCODE (help) File: emacs/lib-src/etags.c Function: C_entries Description: After this line, the value of "c" is equal to 47 3208 static void 3209 C_entries (c_ext, inf) 3210 int c_ext; /* extension of C */ 3211 FILE *inf; /* input file */ 3212 { 3213 register char c; /* latest char read; '\0' for end of line */ 3214 register char *lp; /* pointer one beyond the character `c' */ 3215 int curndx, newndx; /* indices for current and new lb */ 3216 register int tokoff; /* offset in line of start of current token */ 3217 register int toklen; /* length of current token */ 3218 char *qualifier; /* string used to qualify names */ 3219 int qlen; /* length of qualifier */ 3220 int bracelev; /* current brace level */ 3221 int bracketlev; /* current bracket level */ 3222 int parlev; /* current parenthesis level */ 3223 int attrparlev; /* __attribute__ parenthesis level */ 3224 int templatelev; /* current template level */ 3225 int typdefbracelev; /* bracelev where a typedef struct body begun */ 3226 bool incomm, inquote, inchar, quotednl, midtoken; 3227 bool yacc_rules; /* in the rules part of a yacc file */ 3228 struct tok savetoken; /* token saved during preprocessor handling */ 3229 3230 3231 linebuffer_init (&lbs[0].lb); 3232 linebuffer_init (&lbs[1].lb); 3233 if (cstack.size == 0) 3234 { 3235 cstack.size = (DEBUG) ? 1 : 4; 3236 cstack.nl = 0; 3237 cstack.cname = xnew (cstack.size, char *); 3238 cstack.bracelev = xnew (cstack.size, int); 3239 } 3240 3241 tokoff = toklen = typdefbracelev = 0; /* keep compiler quiet */ 3242 curndx = newndx = 0; 3243 lp = curlb.buffer; 3244 *lp = 0; 3245 3246 fvdef = fvnone; fvextern = FALSE; typdef = tnone; 3247 structdef = snone; definedef = dnone; objdef = onone; 3248 yacc_rules = FALSE; 3249 midtoken = inquote = inchar = incomm = quotednl = FALSE; 3250 token.valid = savetoken.valid = FALSE; 3251 bracelev = bracketlev = parlev = attrparlev = templatelev = 0; 3252 if (cjava) 3253 { qualifier = "."; qlen = 1; } 3254 else 3255 { qualifier = "::"; qlen = 2; } 3256 3257 3258 while (!feof (inf)) 3259 { 3260 c = *lp++; Event equality_cond: Cond "c == 92" evaluated as false Also see events: [dead_error_line][dead_error_condition][new_values][assignment][new_values][new_values][new_values][const][const][const][assignment][const][equality_cond][const][const][const] 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 = ' '; 3273 } 3274 else if (incomm) 3275 { 3276 switch (c) 3277 { 3278 case '*': 3279 if (*lp == '/') 3280 { 3281 c = *lp++; 3282 incomm = FALSE; 3283 } 3284 break; 3285 case '\0': 3286 /* Newlines inside comments do not end macro definitions in 3287 traditional cpp. */ 3288 CNL_SAVE_DEFINEDEF (); 3289 break; 3290 } 3291 continue; 3292 } 3293 else if (inquote) 3294 { 3295 switch (c) 3296 { 3297 case '"': 3298 inquote = FALSE; 3299 break; 3300 case '\0': 3301 /* Newlines inside strings do not end macro definitions 3302 in traditional cpp, even though compilers don't 3303 usually accept them. */ 3304 CNL_SAVE_DEFINEDEF (); 3305 break; 3306 } 3307 continue; 3308 } 3309 else if (inchar) 3310 { 3311 switch (c) 3312 { 3313 case '\0': 3314 /* Hmmm, something went wrong. */ 3315 CNL (); 3316 /* FALLTHRU */ 3317 case '\'': 3318 inchar = FALSE; 3319 break; 3320 } 3321 continue; 3322 } 3323 else if (bracketlev > 0) 3324 { 3325 switch (c) 3326 { 3327 case ']': 3328 if (--bracketlev > 0) 3329 continue; 3330 break; 3331 case '\0': 3332 CNL_SAVE_DEFINEDEF (); 3333 break; 3334 } 3335 continue; 3336 } Event const: After this line, the value of "c" is equal to 34 Event const: After this line, the value of "c" is equal to 37 Event const: After this line, the value of "c" is equal to 39 Event const: After this line, the value of "c" is equal to 47 Also see events: [dead_error_line][dead_error_condition][new_values][equality_cond][assignment][new_values][new_values][new_values][const][const][const][assignment][equality_cond][const][const][const] 3337 else switch (c) 3338 { Event new_values: Conditional "c == 34" Also see events: [dead_error_line][dead_error_condition][equality_cond][assignment][new_values][new_values][new_values][const][const][const][assignment][const][equality_cond][const][const][const] 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])) 3438 /* This handles :: in the middle, 3439 but not at the beginning of an identifier. 3440 Also, space-separated :: is not recognised. */ 3441 { 3442 if (c_ext & C_AUTO) /* automatic detection of C++ */ 3443 c_ext = (c_ext | C_PLPL) & ~C_AUTO; 3444 lp += 2; 3445 toklen += 2; 3446 c = lp[-1]; 3447 goto still_in_token; 3448 }