Re: [PATCH 0/6] RFC: adding support to GCC for detecting trust boundaries

2021-11-14 Thread Miguel Ojeda via Gcc-patches
On Sat, Nov 13, 2021 at 9:37 PM David Malcolm wrote: > > #define __user __attribute__((untrusted)) > > where my patched GCC treats > T * > vs > T __attribute__((untrusted)) * > as being different types and thus the C frontend can complain (even without > -fanalyzer) about e.g.: This one sou

Re: [PATCH v2 4/6] compiler-gcc.h: add asm_inline definition

2019-09-08 Thread Miguel Ojeda
On Sat, Sep 7, 2019 at 3:11 PM Segher Boessenkool wrote: > > I wouldn't. Please stop using that straw man. I'm not saying version > checks are good, or useful for most things. I am saying they are not. > > Predefined compiler symbols to do version checking (of a feature) is > just a lesser inst

Re: [PATCH v2 4/6] compiler-gcc.h: add asm_inline definition

2019-09-06 Thread Miguel Ojeda
On Fri, Sep 6, 2019 at 6:30 PM Segher Boessenkool wrote: > > (Which isn't the C++ standard yet, okay). At this stage, it pretty much is. It is basically bug fixing at this point. > No, that is not what it does. A user defines such a macro, and that > makes the library change behaviour. That is

Re: [PATCH v2 4/6] compiler-gcc.h: add asm_inline definition

2019-09-06 Thread Miguel Ojeda
On Fri, Sep 6, 2019 at 2:23 PM Segher Boessenkool wrote: > > I can't find anything with "feature" and "macros" in the C++ standard, > it's "predefined macros" there I guess? In C, it is also "predefined > macros" in general, and there is "conditional feature macros". They are introduced in C++20

Re: [PATCH v2 4/6] compiler-gcc.h: add asm_inline definition

2019-09-05 Thread Miguel Ojeda
On Thu, Sep 5, 2019 at 5:52 PM Miguel Ojeda wrote: > > Yes and no. GNU libc defines feature test macros like you say, but > C++'s feature macros are like Rasmus/Nick are saying. I think libc's > definition is weird, I would call those "feature selection macros"

Re: [PATCH v2 4/6] compiler-gcc.h: add asm_inline definition

2019-09-05 Thread Miguel Ojeda
On Thu, Sep 5, 2019 at 3:45 PM Segher Boessenkool wrote: > > [ That's not what a feature test macro is; a feature test macro allows the > user to select some optional behaviour. Things like _GNU_SOURCE. ] Yes and no. GNU libc defines feature test macros like you say, but C++'s feature macros