This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug web/81560] New: Error in C documentation regarding min/max substitute macros MIN/MAX
- From: "um4711 at mutluit dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 26 Jul 2017 11:59:03 +0000
- Subject: [Bug web/81560] New: Error in C documentation regarding min/max substitute macros MIN/MAX
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81560
Bug ID: 81560
Summary: Error in C documentation regarding min/max substitute
macros MIN/MAX
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: web
Assignee: unassigned at gcc dot gnu.org
Reporter: um4711 at mutluit dot com
Target Milestone: ---
On this documentation page an example for defining a macro MIN(X,Y) is given:
https://gcc.gnu.org/onlinedocs/gcc-3.4.2/gcc/Min-and-Max.html
There is a bug in the definition. It reads:
#define MIN(X,Y) ((X) < (Y) ? : (X) : (Y))
It can't compile; it of course needs to be changed to:
#define MIN(X,Y) ((X) < (Y) ? (X) : (Y))