Skip to content

CAST_INLINE - is it ever defined? Was it ever defined? #23704

@richardleach

Description

@richardleach

Description
3bb7c1b added inline macros for I_32, U_32, I_V, U_V as an alternative to the pre-existing macros that call the relevant Perl_cast_* function. These inline macros are guarded by CAST_INLINE (https://github.com/Perl/perl5/blob/blead/perl.h#L4795).

However:

  • The commit didn't add anything like a Configure check that would set CAST_INLINE.
  • Today's Configure doesn't contain that string, nor do any of the hint files.

Is this dead code? If so, should Configure start setting CAST_INLINE - and under what conditions - or should it be ripped out?

Steps to Reproduce
perl -V or grep -r CAST_INLINE * on a git clone of blead.

Expected behavior
CAST_INLINE is either defined somewhere by something, or it is removed and only one set of cast macros remains.

Perl configuration

Characteristics of this binary (from libperl): 
  Compile-time options:
    HAS_LONG_DOUBLE
    HAS_STRTOLD
    HAS_TIMES
    MULTIPLICITY
    PERLIO_LAYERS
    PERL_COPY_ON_WRITE
    PERL_DONT_CREATE_GVSV
    PERL_HASH_FUNC_SIPHASH13
    PERL_HASH_USE_SBOX32
    PERL_MALLOC_WRAP
    PERL_OP_PARENT
    PERL_PRESERVE_IVUV
    PERL_USE_DEVEL
    PERL_USE_SAFE_PUTENV
    USE_64_BIT_ALL
    USE_64_BIT_INT
    USE_ITHREADS
    USE_LARGE_FILES
    USE_LOCALE
    USE_LOCALE_COLLATE
    USE_LOCALE_CTYPE
    USE_LOCALE_NUMERIC
    USE_LOCALE_TIME
    USE_PERLIO
    USE_PERL_ATOF
    USE_REENTRANT_API
    USE_THREAD_SAFE_LOCALE

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions