Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions handy.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ don't, so that you can portably take advantage of this C99 feature.
* 3) shifting by 1, yielding 1111111...110
* 4) adding the final bit yielding all 1's */
#define nBIT_MASK(n) \
(((n) == 0) ? 0 : (((UINTMAX_C(1) << ((n) - 1)) - 1) << 1) | 1)
// |_________________________|
(((n) == 0) ? 0 : (((UINTMAX_C(1) << ((n) - 1)) - 1) << 1) | 1)
/* |_________________________| */

/* The largest unsigned number that will fit into n bits */
#define nBIT_UMAX(n) nBIT_MASK(n)
Expand Down
3 changes: 2 additions & 1 deletion pod/perlhacktips.pod
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ changing to the C99 approach.
C<//> comments

All compilers we tested support their use. Not all humans we tested
support their use.
support their use. These should be avoided in header files, as there is
CPAN code that breaks if it encounters these.

=item *

Expand Down
Loading