RE: devchk ideas

"Banginwar, Rajesh" <[email protected]> Thu, 27 Oct 2005 09:42:29 -0700
Newsgroups gmane.linux.lsb.test-suite
Message-ID <B5677069E3D9994D9EE1C7295072EA960809107E@orsmsx402.amr.corp.intel.com>
No, this will work only with functions and global variables.

For macros, we will have to come up with different strategy. I believe
except for integer, float or string macros, not much is tested in
devchk. Many of the macros are marked as unknown for this purpose. I
have one suggestion for this: For macros like #define foo bar we can
introduce a new type string2 which will allow us to do string
comparison. This is in addition to string type for macros like #define
foo "bar". 

Thanks,

-Rajesh

> -----Original Message-----
> From: [email protected] [mailto:lsb-test-
> [email protected]] On Behalf Of ShrikantGangoda
> Sent: Thursday, October 27, 2005 6:01 AM
> To: [email protected]
> Subject: [Lsb-test] devchk ideas
> 
> Hi Rajesh,
> 	I am working on devchk with pradosh.
> 
> On Tue, 2005-10-25 at 11:24 +0530, Pradosh Adoni wrote:
> > -------- Forwarded Message --------
> > >
> > > Date: Mon, 24 Oct 2005 09:40:48 -0700
> > >
> > > Hi Pradosh,
> > > 	There is no transcript as such; it was just one liner from Nick.
> > >
> > > The idea is to use gcc extension to C: typeof. Declare two
variables,
> > > one with typeof (&function_name), and the other using the
prototype
> info
> > > from DB. If you can assign one variable to the other without
warning,
> > > they have the same type.
> > >
> I have implemented the idea to check  two functions.But,this idea can
> not be used in checking macros as types are not define.
> Example: #define ABC(a,b)  (a+b)
> here we don't have information on types of 'a' and 'b'.
> 
> >
> > > Hope this helps. This will be compile time check and we will have
to
> > > monitor warnings, may be there is a flag to gcc which can consider
> > > warnings as errors.
> > >
> 
> 
> - Shrikant
> 
> _______________________________________________
> lsb-test mailing list
> [email protected]
> http://mail.freestandards.org/mailman/listinfo/lsb-test