Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #4421

Closed (moved)
(moved)
Open
Created Nov 07, 2011 by Sebastian Hahn@sebastian

Some pure functions have impure code

two examples I found while checking this out were smartlist_string_num_isin() which calls tor_snprintf(), which isn't defined as pure. And some other pure functions use tor_assert(), which does file IO. If I understand this correctly, pure functions shouldn't be allowed to call impure functions nor do IO.

unfortunately, GCC only treats this as a hint to the optimizer, and doesn't check to see if it makes sense.

Thanks to [4ZM] who brought up pure functions in #tor-dev :)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking