bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] Attribute((pure)) with impure function causes test failur


From: arnold
Subject: Re: [bug-gawk] Attribute((pure)) with impure function causes test failures
Date: Tue, 23 Aug 2011 07:25:19 GMT

Hi.  Can you please check gawk-4.0.0 to see if the problem exists
there as well?  You can get the tar ball from ftp.gnu.org or the
current code from the git repo on savannah.gnu.org.

Thanks,

Arnold

> Date: Sun, 21 Aug 2011 20:47:21 +0100 (BST)
> From: Neil Cahill <address@hidden>
> To: address@hidden
> Subject: [bug-gawk] Attribute((pure)) with impure function causes test
>       failures
>
> With the gawk-3.1.6 source bz2, gawk compiles incorrectly on my Gentoo syst=
> em with gcc-4.4.5 -O2 -fno-inline.=A0 This causes 4 tests to fail (eg. data=
> nonl.awk), all related to character classes like /[[:alpha:]]/ not being re=
> cognized.
>
> I tracked this down to the following function:
>
> /* regex_internal.c */
> static unsigned char=20
> internal_function __attribute((pure))
> re_string_fetch_byte_case(...)
>
> This function modifies a value pstr->cur_idx which is also used in a macro =
> (re_string_eoi).=A0 Calling the macro after calling the function can mean a=
> n old value of cur_idx is used.=A0 This happens in regcomp.c in the functio=
> n parse_bracket_symbol, which caused those character classes to go unrecogn=
> ized.
>
> A simple fix is to remove the pure attribute from the function.=A0 This see=
> ms to be present in 3.1.8 as well, as both exhibited the same problem.
>
> Neil Cahill.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]