This is the mail archive of the gcc@gcc.gnu.org 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: Restricting arguments to intrinsic functions


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


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