Re: New warnings in plgsql/src/scan.l - Mailing list pgsql-hackers

From Tom Lane
Subject Re: New warnings in plgsql/src/scan.l
Date
Msg-id 23428.1120579335@sss.pgh.pa.us
Whole thread Raw
In response to Re: New warnings in plgsql/src/scan.l  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Alvaro Herrera wrote:
>> I see new warnings in the generation of plpgsql's scanner:
>> 
>> /usr/bin/flex  -Pplpgsql_base_yy
>> -o'/pg/source/00orig/src/pl/plpgsql/src/pl_scan.c'
>> /pg/source/00orig/src/pl/plpgsql/src/scan.l
>> /pg/source/00orig/src/pl/plpgsql/src/scan.l:198: warning, the
>> character range [-�] is ambiguous in a case-insensitive scanner

> This warning has existed in one from or another ever since the latest 
> flex version is in use.  For example, 7.4 shows it as well.  I don't 
> think we have to do anything (except rewrite PL/pgSQL's parser, which 
> is somehow planned (or hoped for) anyway).

The warnings are pointing at uses of "identifier" and similar.  I think
it's probably unhappy that we are writing things like
ident_start        [A-Za-z\200-\377_]

along with '%option case-insensitive'.  However this doesn't strike me
as ambiguous, merely redundant ...

It may also be important to invoke flex in C locale --- I seem to recall
some previous discussion to the effect that its idea of "case
insensitive" depends on the build-time locale.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] Disable page writes when fsync off, add GUC
Next
From: Marko Kreen
Date:
Subject: Re: pgcrypto 3des failure, OpenSSL 0.9.8, Solaris 9/sparc