octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Header files


From: Mike Miller
Subject: Re: Header files
Date: Thu, 27 Apr 2017 07:32:12 -0700
User-agent: NeoMutt/20170113 (1.7.2)

On Wed, Apr 26, 2017 at 14:10:08 -0400, John W. Eaton wrote:
> The only two that don't work properly for me now are mexproto.h and
> ov-intx.h.
> 
> I'm not sure how to deal with mxArray in mexproto.h.  It is declared as a
> class when mexproto.h is included in the Octave sources, or as void for
> including in external code (the type is supposed to be opaque and users
> aren't supposed to access it except through function calls).
> 
> For ov-intx.h, a number of macros are supposed to be defined before it is
> included.  It's  not really supposed to be included separately.  That the
> ov-{u,}int{8,16,23,64}.h files work is good enough.

If you want more elegant error messages for these two particular cases,
we could add tests for the include guards from the other files that must
be included first, or for the number of macros in the ov-inx.h case,
with specific error messages.

For example if I write a program and try to include <bits/stdio.h>, I
get the error message

    Never include <bits/stdio.h> directly; use <stdio.h> instead.

-- 
mike



reply via email to

[Prev in Thread] Current Thread [Next in Thread]