Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Vorbis Vorbis
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 24
    • Issues 24
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Xiph.Org
  • VorbisVorbis
  • Issues
  • #288
Closed
Open
Created Nov 25, 2002 by andreask@andreask

Syntax error in code prevents building

Version is assumed to be 1.0rc3 - Got the sources today from 
http://www.xiph.org/ogg/vorbis/download/

The file libvorbis/lib/lookup_data.h contains the following define
    #define INVSQ2EXP_LOOKUP_MIN -32

This is used later in libvorbis/lib/lookup.c like this
    return INVSQ2EXP_LOOKUP[a-INVSQ2EXP_LOOKUP_MIN];

Note the missing space between 'a-' and the macro.

On my HP/PA-RISC, with the native compiler this causes an syntax error.
The expansion of the code above is

      a--32

This is at least ambiguous: 'a-- 32' vs 'a- -32', and the first interpreation
truly is a syntax error.

Best solution: Change the define to
    #define INVSQ2EXP_LOOKUP_MIN (-32)

The parentheses prevent any misinterpretation of the value.
Assignee
Assign to
Time tracking