From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24189 invoked by alias); 23 Apr 2014 09:21:29 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 24142 invoked by uid 48); 23 Apr 2014 09:21:26 -0000 From: "timurrrr at google dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60924] __attribute__((no_sanitize_address)) and friends should (only?) be allowed at function definitions Date: Wed, 23 Apr 2014 09:21:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: timurrrr at google dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-04/txt/msg01690.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60924 --- Comment #5 from Timur Iskhodzhanov --- Jakub wrote: > all other attributes are allowed on both declarations and definitions Can you please point me at the documentation that says that attributes are allowed on definitions? The page I referenced above only mentions declarations. Also, I believe "all the existing/old attributes do X, so all the new ones should do X as well" isn't an optimal long-term strategy. It's just not flexible / generic enough. Andrew wrote: > More consistent with what By "more consistent" I meant there will be fewer ways to use the attribute and this would reduce the number of places one has to look at to find out whether a given attribute is applied. > Is there is only one coding style in this world? This is indeed subjective. Still, I think my point #3 (re: implementation detail) should be true in most reasonable coding styles? > Modules for the win. True -- but they aren't used yet in most codebases AFAICT :)