Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Ambiguous use" isn't #5350

Closed
p5pRT opened this issue Apr 21, 2002 · 6 comments
Closed

"Ambiguous use" isn't #5350

p5pRT opened this issue Apr 21, 2002 · 6 comments

Comments

@p5pRT
Copy link

p5pRT commented Apr 21, 2002

Migrated from rt.perl.org#8979 (status was 'resolved')

Searchable as RT8979$

@p5pRT
Copy link
Author

p5pRT commented Apr 21, 2002

From @mjdominus

Created by @mjdominus

  use constant PI => 3;
  $s = somefunction()-PI/2;

this produces​:

  Ambiguous use of -PI resolved as -&PI() at /tmp/w line 2.

However, it's not ambiguous, since the alternative parse,

  $s = somefunction()"-PI"/2;

is meaningless. So the warning is spurious.

The problem persists in 5.7.3 and bleadperl.

Perl Info

Flags:
    category=core
    severity=low

Site configuration information for perl v5.6.1:

Configured by root at Sat Dec 29 11:54:59 EST 2001.

Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
    osname=linux, osvers=2.4.2-2, archname=i586-linux
    uname='linux plover.com 2.4.2-2 #1 sun apr 8 19:37:14 edt 2001 i586 unknown '
    config_args='-des'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
    cc='cc', ccflags ='-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-fno-strict-aliasing'
    ccversion='', gccversion='2.96 20000731 (Red Hat Linux 7.1 2.96-81)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lcrypt -lutil
    perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil
    libc=/lib/libc-2.2.2.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    


@INC for perl v5.6.1:
    /usr/local/lib/perl5/5.6.1/i586-linux
    /usr/local/lib/perl5/5.6.1
    /usr/local/lib/perl5/site_perl/5.6.1/i586-linux
    /usr/local/lib/perl5/site_perl/5.6.1
    /usr/local/lib/perl5/site_perl/5.6.0/i586-linux
    /usr/local/lib/perl5/site_perl/5.6.0
    /usr/local/lib/perl5/site_perl
    .


Environment for perl v5.6.1:
    HOME=/home/mjd
    LANG=C
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/lib:/usr/lib:/usr/X11R6/lib
    LOGDIR (unset)
    PATH=/home/mjd/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games:/sbin:/usr/sbin:/usr/local/bin/X11R6:/usr/local/bin/mh:/data/mysql/bin:/usr/local/bin/pbm:/usr/local/bin/ezmlm:/home/mjd/TPI/bin:/usr/local/teTeX/bin:/usr/local/mysql/bin
    PERL_BADLANG (unset)
    SHELL=/bin/bash


@p5pRT
Copy link
Author

p5pRT commented Apr 28, 2010

From @chorny

Still happens on 5.12.0

On Sun Apr 21 16​:03​:07 2002, mjd@​plover.com wrote​:

    use constant PI => 3;
    $s = somefunction\(\)\-PI/2;

this produces​:

    Ambiguous use of \-PI resolved as \-&PI\(\) at /tmp/w line 2\.

However, it's not ambiguous, since the alternative parse,

    $s = somefunction\(\)"\-PI"/2;

is meaningless. So the warning is spurious.

The problem persists in 5.7.3 and bleadperl.

--
Alexandr Ciornii, http​://chorny.net

@p5pRT
Copy link
Author

p5pRT commented Apr 28, 2010

From [Unknown Contact. See original ticket]

Still happens on 5.12.0

On Sun Apr 21 16​:03​:07 2002, mjd@​plover.com wrote​:

    use constant PI => 3;
    $s = somefunction\(\)\-PI/2;

this produces​:

    Ambiguous use of \-PI resolved as \-&PI\(\) at /tmp/w line 2\.

However, it's not ambiguous, since the alternative parse,

    $s = somefunction\(\)"\-PI"/2;

is meaningless. So the warning is spurious.

The problem persists in 5.7.3 and bleadperl.

--
Alexandr Ciornii, http​://chorny.net

@p5pRT
Copy link
Author

p5pRT commented Mar 29, 2016

From @rjbs

This appears to have been fixed in v5.22.0

--
rjbs

@p5pRT
Copy link
Author

p5pRT commented Mar 29, 2016

@rjbs - Status changed from 'open' to 'resolved'

@p5pRT p5pRT closed this as completed Mar 29, 2016
@p5pRT
Copy link
Author

p5pRT commented Apr 5, 2016

From @cpansprout

On Tue Mar 29 07​:35​:23 2016, rjbs wrote​:

This appears to have been fixed in v5.22.0

commit 7950e9c
Author​: Father Chrysostomos <sprout@​cpan.org>
Date​: Thu Sep 4 20​:09​:29 2014 -0700

  Remove -foo ambiguity warning

I didn’t realise there was a ticket for it.

--

Father Chrysostomos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant