This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Don't expand string/memory builtins if ASan is enabled.

On Fri, Oct 17, 2014 at 05:01:33PM +0400, Yury Gribov wrote:
> On 10/17/2014 04:24 PM, Jakub Jelinek wrote:
> >>+/* Returns TRUE if given FCODE corresponds to string or memory builtin function.
> >>+ */
> >>+
> >>+static inline bool
> >>+is_memory_builtin (enum built_in_function fcode)
> >>+{
> >>+  return fcode <= BUILT_IN_STRSTR && fcode >= BUILT_IN_BCMP;
> >
> >This is too fragile and ugly.
> >IMHO you should list (supposedly not in a special inline, but directly
> >where you use it) in a switch all the builtins you don't want to expand.

I know, but it is still a coherent sent of builtins for very similar
purposes, many of them sorted by increasing size number.

> but I agree that this one is more ugly.

The memops builtins are just random bag of them, it is expected many people
will add builtins into that range and outside of that range.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]