This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Restricting arguments to intrinsic functions
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Charles Baylis <charles dot baylis at linaro dot org>
- Cc: Andrew Pinski <pinskia at gmail dot com>, Tejas Belagod <tejas dot belagod at arm dot com>, Segher Boessenkool <segher at kernel dot crashing dot org>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Fri, 24 Oct 2014 19:30:42 +0200
- Subject: Re: Restricting arguments to intrinsic functions
- Authentication-results: sourceware.org; auth=none
- References: <CADnVucA8f3zHOY_UaFvxNAR-j3D7EDvTPiYpoLEUNJL+8TYZzw at mail dot gmail dot com> <20141024144446 dot GA23124 at gate dot crashing dot org> <544A6C08 dot 4020809 at arm dot com> <CA+=Sn1mabrzY1G4hdLgMx6Mn_2xZh54R0kYLOwjhxAbAP9AgoA at mail dot gmail dot com> <CADnVucAW5zXcqa4GZx3jd01NZ5HxKHzeGbTsjJPyQ_t_BD1sKw at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Oct 24, 2014 at 06:25:29PM +0100, Charles Baylis wrote:
> On 24 October 2014 17:05, Andrew Pinski <pinskia@gmail.com> wrote:
> > On Fri, Oct 24, 2014 at 8:11 AM, Tejas Belagod <tejas.belagod@arm.com> wrote:
>
> >> The diagnostic issued points to the line in arm_neon.h, but we expect this
> >> to point to the line in cr.c. I suspect we need something closer to the
> >> front-end?
> >
> >
> > You need to change arm_neon.h to use the __artificial__ attribute as I
> > mentioned before. Also please move away from "static inline" since
> > they cannot be used from templates in C++98/03.
>
> The __artificial__ attribute seems like it would improve the debug
> view, but it does not seem to affect the location of error reporting.
Note, for that case you can't emit the error too early, you need to wait
until inlining and constant propagation are performed, otherwise the
argument would never be constant. And for -O0, you need to use
macros instead of inlines, see what i?86 *intrin.h headers are doing for
that.
Jakub