RE:type bug in root

From: Masaharu Goto (MXJ02154@nifty.ne.jp)
Date: Fri Sep 11 1998 - 15:59:00 MEST


Doug,

>// THF1 does not exist, should be TH1F
>int typebug(THF1* h1);

I imagine you have spent long time to figure this out.
I understand the problem and I'm sorry I can not fix it. This is not as simple
as it looks. Consider following cases,

  typedef struct A { int a; } A;
  int a,b;
  int f(a* b);                      // error in C     ,  variable f in C++
  int g(a);                         // error in C     ,  variable f in C++
  int h(a) int a { return(a+3); }   // function h in C,  error in C++
  int x(A* b);                      // function x in boty C and C++

In order to detect all errors, Cint needs to know whether the source is C or 
C++ in precise manner.  This is a big problem because some user wants C++ as
default and other user wants C as default. It is not possible to judge by 
file extension because  .C  is C++ in UNIX and C in Windows. Also .h can be
anything in any platform.

It is technically possible to solve this if I strictly determine C / C++ 
distinction rule.  The problem is that many users do not want it. Fixing this
gives problems to many existing user applications.

Masaharu Goto



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:37 MET