From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: Guide to Linux Sound APIs Date: Fri, 26 Sep 2008 11:44:33 +0200 Message-ID: References: <20080924224833.GA8280@tango.0pointer.de> <20080925194028.GB26113@tango.0pointer.de> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 3C7A9103809 for ; Fri, 26 Sep 2008 11:44:34 +0200 (CEST) In-Reply-To: <20080925194028.GB26113@tango.0pointer.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Lennart Poettering Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Thu, 25 Sep 2008 21:40:28 +0200, Lennart Poettering wrote: > > On Thu, 25.09.08 12:15, Takashi Iwai (tiwai@suse.de) wrote: > > > Anyway, I'd like to mark async stuff as obsolete in a future version. > > This is a broken design, and should rest in piece. > > Meanwhile, I'm not in favor of adding deprecated link warning. A > > compile warning is fine, but link warning is way too annoying. And > > there are programs right now using async, we are responsible to keep > > them running as they are. > > You are aware that the linking warnings are only shown during build-time -- > not during runtime when dynamic linking happens. So basically the > difference between compiler and linker warnings are not that big. Link > time warnings just appear a little bit later during build time than > compile time warnings. OK, then I must have misunderstood that. I thought I did see link warning message some time ago, so the idea was stuck to my head. > The big advantage of linker warnings is that you can add arbitrary > warning strings when a symbol is used. Doing that with just the compiler is > impossible to my knowledge. > > I.e. just define this: > > #ifdef __GNUC__ > #define WARN_REFERENCE(sym, msg) \ > __asm__(".section .gnu.warning." #sym); \ > __asm__(".asciz \"" msg "\""); \ > __asm__(".previous") > #else > #define WARN_REFERENCE(sym, msg) > #endif We have already a similar macro link_warning() in alsa-lib/include/local.h. However, I still prefer deprecated warning at compile time, not at link time. Regardless we like or not, we must keep supporting the old API. In that sense, warning at compile time looks saner to me. Takashi