[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Intel icc finds too many errors in guile 1.8.8 to compile
From: |
Neil Jerram |
Subject: |
Re: Intel icc finds too many errors in guile 1.8.8 to compile |
Date: |
Tue, 06 Oct 2009 22:06:29 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
address@hidden (Ludovic Courtès) writes:
> I agree. Adding a named constant for 0 is one way to help the compiler
> spot such mistakes.
[...]
> So these could become, say:
>
> enum scm_dynwind_flags
> {
> SCM_F_DYNWIND_NOT_REWINDABLE = 0,
> SCM_F_DYNWIND_NOT_REWINDABLE
> };
>
> typedef enum scm_dynwind_flags scm_t_dynwind_flags;
>
> enum scm_wind_flags
> {
> SCM_F_WIND_NON_LOCAL_EXIT = 0,
> SCM_F_WIND_EXPLICITLY
> };
>
> typedef enum scm_wind_flags scm_t_wind_flags;
But wouldn't this approach break as soon as we added another flag, in
the way that I described in my previous email?
If the answer to that is yes, I think the reality is that bit flag
combinations can't be made type-safe in C, and therefore we should stick
with #defines.
Regards,
Neil