On Thu, Dec 01, 2005 at 10:05:50AM -0800, Andrew Paprocki wrote:

> Is there a standard way that math operations should be performed using 
> hrtime_t types if the compiler/platform defines longlong_t (from sys/types.h) 
> to be a union?
> 
> typedef union {
>         double  _d;
>         int32_t _l[2];
> } longlong_t;
> 
> Because of this, code which tries to do (time2 - time1) generates warnings 
> under gcc when compiled with -ansi. Am I missing something here? Are 
> applications supposed to detect if it is defined as a union and interact with 
> the union members in that circumstance?

If you use -std=gnu89 instead of -ansi the problem will go away.  Is
there some specific reason you need to disable the other extensions
that gnu89 enables?

-- 
Keith M Wesolowski              "Sir, we're surrounded!" 
Solaris Kernel Team             "Excellent; we can attack in any direction!" 
_______________________________________________
opensolaris-code mailing list
[email protected]
https://opensolaris.org:444/mailman/listinfo/opensolaris-code

Reply via email to