[so] more parser/robocheck bugreports

Bogdan Luca so@cursuri.cs.pub.ro
Tue, 09 Nov 2004 18:45:48 +0200


Salut,

2 chestii:
1. M-am chinuit vreo jumatate de ora sa-mi dau seama de ce nu se 
compileaza in Windows parser-ul cu robocheck.
----
C:\msys\1.0\home\Bogdan Luca\so\tema1>grep -B2 -n WORD parser.tab.h
30-      know about them.  */
31-   enum yytokentype {
32:     WORD = 258,
--
47-   };
48-#endif
49:#define WORD 258
----
Problema ar fi ca parser.tab.h defineste 'WORD' ca fiind '258', dupa 
care include 'robocheck.h', care la randul lui include 'windows.h' (unde 
'WORD' ar trebui sa fie un tip definit ca in 'windef.h:234:typedef 
unsigned short WORD;'), rezultatul constand intr-o eroare de compilare. 
Solutia ar fi inlocuirea identificatorului 'WORD' cu orice alta denumire 
care sa nu fie folosita in alte headere (eu am folosit 'MYWORD').

2. Se pare ca robocheck ignora exclude-urile atunci cand face check-ul 
'at process exit':
----
C:\msys\1.0\home\Bogdan Luca\so\tema1>grep -n exclude main.c
16:    robocheck_set_exclude("lex.yy.c");
C:\msys\1.0\home\Bogdan Luca\so\tema1>shell.exe
# exit

heap leak at process exit:3748: 003F1FFC/4 allocated by lex.yy.c:1720
heap leak at process exit:3748: 00591FFE/16386 allocated by lex.yy.c:1720
heap leak at process exit:3748: 00581FD0/48 allocated by lex.yy.c:1720
----

Bogdan Luca
345CA