Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Thiago Adams Newsgroups: comp.lang.c Subject: dbg_break macro Date: Wed, 5 Jun 2024 11:49:27 -0300 Organization: A noiseless patient Spider Lines: 30 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 05 Jun 2024 16:49:28 +0200 (CEST) Injection-Info: dont-email.me; posting-host="53a2169cf4fb3e7510f653842a5d08fc"; logging-data="1033046"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19x7+HQDXQMsxuVmmmT6RvfX20a1xtYmgA=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:ZoVf1hVjT66Tp3TvqoizA7vXMLM= Content-Language: en-US Bytes: 1467 Checking the usages of assert(0) in my code it is used to create a breakpoint in unusual situations. Sample if (condition) { } else { assert(0); //unexpected return 1; } I am thinking in replacing all my assert(0) for this macro. #define dbg_break(message) assert(! "dbg_break" message ); if (condition) { } else { dbg_break("unexpected"); return 1; } what do you think? Do you have any other usage of assert(0) that is not this one? Do you have any assert(constant-expression) other than assert(0)?