Hit a showstopper issue

Dibyendu Majumdar mobile@majumdar.org.uk
Thu Jan 1 00:00:00 GMT 2015


On 16 June 2015 at 19:41, David Malcolm <dmalcolm@redhat.com> wrote:
>> >> In any case a warning about unreachable bocks may be more appropriate
>> >> than errors.
>> >
>> > FWIW I've experimented in the past with turning on warnings about
>> > uninitialized vars, so maybe we need an API setting for validations,
>> > with each validation having a tri-state:
>> >   * perform validation, as error
>> >   * perform validate, as warnings to stderr
>> >   * don't validate
>
> I'm thinking of something like this:
>
> enum gcc_jit_validation_check
> {
>   GCC_JIT_VALIDATION_CHECK_UNREACHABLE_BLOCKS,
>   GCC_JIT_VALIDATION_CHECK_UNINITIALIZED_LOCALS,
>
>   GCC_JIT_NUM_VALIDATION_CHECKS
> };

You could omit the word CHECK I think.

>
> enum gcc_jit_validation_response
> {
>   GCC_JIT_VALIDATION_IGNORE,
>   GCC_JIT_VALIDATION_LOG_TO_STDERR,
>   GCC_JIT_VALIDATION_ERROR,
>
>   GCC_JIT_NUM_VALIDATION_RESPONSES
> };
>
> extern void
> gcc_jit_context_set_validation (gcc_jit_context *ctxt,
>                                 gcc_jit_validation_check check,
>                                 gcc_jit_validation_response response);
>
> I'm not in love with any of the above names ("IGNORE" is really "don't
> bother running this", it's not really a "response").

How about DISABLE instead of IGNORE?


>
> I wonder if there are any other existing gcc warnings that might be
> useful to libgccjit users.  Thoughts?
>

This is an interesting question. The problem is without understanding
what is possible I am not sure I can answer.

Regards



More information about the Jit mailing list