develooper Front page | perl.perl5.changes | Postings from September 2021

[Perl/perl5] 22d12c: Improve (d)NOOP documentation

From:
=?UTF-8?B?RGFnZmlubiBJbG1hcmkgTWFubnPDpWtlcg==?= via perl5-changes
Date:
September 21, 2021 18:11
Subject:
[Perl/perl5] 22d12c: Improve (d)NOOP documentation
Message ID:
Perl/perl5/push/refs/heads/smoke-me/ilmari/better-noop/000000-b9106a@github.com
  Branch: refs/heads/smoke-me/ilmari/better-noop

  Home:   https://github.com/Perl/perl5

  Commit: 22d12c4a87bf575fcbe60013e5326b038b2050ea

      https://github.com/Perl/perl5/commit/22d12c4a87bf575fcbe60013e5326b038b2050ea

  Author: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>

  Date:   2021-09-21 (Tue, 21 Sep 2021)



  Changed paths:

    M perl.h



  Log Message:

  -----------

  Improve (d)NOOP documentation



Mention that they are also used as placeholders for things that only

do or declare something under certain configurations.





  Commit: b9106a5e9fc4d421643d595fbb53d5755ec3f1a2

      https://github.com/Perl/perl5/commit/b9106a5e9fc4d421643d595fbb53d5755ec3f1a2

  Author: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>

  Date:   2021-09-21 (Tue, 21 Sep 2021)



  Changed paths:

    M perl.h



  Log Message:

  -----------

  Improved NOOP definition



Use `do {} while (0)`, which is unambiguously a statement and not an

expression, instead of using a comment and a `(void)` cast to to stop

warnings about statements with no effect.





Compare: https://github.com/Perl/perl5/compare/22d12c4a87bf%5E...b9106a5e9fc4




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About