This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Documentation error in [5.47 Built-in functions for atomic memory access]
- From: David Fuchs <drfuchs at yahoo dot com>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 7 Nov 2008 15:25:09 -0800 (PST)
- Subject: Documentation error in [5.47 Built-in functions for atomic memory access]
In section "5.47 Built-in functions for atomic memory access", both "nand" examples show incorrect code in their second lines.
Incorrect:
????????? { tmp = *ptr; *ptr op= value; return tmp; }
????????? { tmp = *ptr; *ptr = ~tmp & value; return tmp; }?? // nand
Correct (move the "~" in 2nd line):
????????? { tmp = *ptr; *ptr op= value; return tmp; }
????????? { tmp = *ptr; *ptr = tmp & ~value; return tmp; }?? // nand
?
Incorrect:
????????? { *ptr op= value; return *ptr; }
????????? { *ptr = ~*ptr & value; return *ptr; }?? // nand
Correct (move the "~" in 2nd line):
????????? { *ptr op= value; return *ptr; }
????????? { *ptr = *ptr & ~value; return *ptr; }?? // nand
p.s. I looked all over the place for the proper way to report a documentation error, and was unable to find anything helpful.? Perhaps the manual itself ought to point out where to report such.