Commit Graph

10 Commits

Author SHA1 Message Date
ed
6b1695514e Don't define static_assert for C++.
Even though _Static_assert() is pretty robust for C code, it cannot work
correctly with C++ code.  This is due to the fact that C++ template
parameters may contain commas that are not enclosed in parentheses. For
example:

	static_assert(foo<int, int>::bar == baz, "...");

This causes _Static_assert to be called with an excessive number of
parameters.  If you want to use static_assert in C++, just use a C++11
compiler.

Reported on:	current@, ports@
2011-12-29 14:41:17 +00:00
ed
d0881b7c62 As per C11, add static_assert() to <assert.h>. 2011-12-26 18:57:59 +00:00
ed
0cf1767efc Add missing __dead2 to __assert().
__assert() is called when an assertion fails. After printing an error
message, it will call abort(). abort() never returns, hence it has the
__dead2 attribute. Also add this attribute to __assert().

MFC after:	3 weeks
2011-01-09 21:39:46 +00:00
imp
7d79e30fb2 Remove the Berkeley clause 3's.
Add a few $FreeBSD$
2010-02-16 19:39:50 +00:00
phk
537b9f0709 Only protect the prototypes with #ifndef _ASSERT_H_, the standards
specifically allow changes to the NDEBUG macro between #includes of assert.h
2007-12-01 19:28:13 +00:00
phk
8df55e4f86 Add missing #ifndef _ASSERT_H_ protection against multiple inclusions 2007-12-01 18:56:50 +00:00
imp
300518c0a1 Breath deep and take __P out of the system include files.
# This appears to not break X11, but I'm having problems compiling the
# glide part of the server with or without this patch, so I can't tell
# for sure.
2002-03-23 17:24:55 +00:00
mike
1521c8f921 Restore K&R prototype. Fix other style bugs.
Reviewed by:	asmodai, bde
2001-10-27 19:37:20 +00:00
asmodai
48519c4a69 Add $FreeBSD$.
Change assert() macro to print failing function name.
Change K&R function prototype wrapper to ANSI prototype.
This makes us C99 conforming.
2001-10-24 18:10:37 +00:00
rgrimes
a6ce65d368 BSD 4.4 Lite Include Sources 1994-05-24 09:57:34 +00:00