public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jojelino at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/49718] New: please allow no_instrument_function attribute in class member definition/declaration
Date: Tue, 12 Jul 2011 14:23:00 -0000	[thread overview]
Message-ID: <bug-49718-4@http.gcc.gnu.org/bugzilla/> (raw)

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49718

           Summary: please allow no_instrument_function attribute in class
                    member definition/declaration
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jojelino@gmail.com


it says
instrument.cc:10:6: error: can’t set ‘no_instrument_function’ attribute after
definition
isn't it false-positive? because in class/struct it is normal one to define
such member function in it.

#include <stdio.h>
struct t
{
public:
t();
__attribute__((no_instrument_function)) void a(){
}
void __attribute__((no_instrument_function))b(){
}
void c() __attribute__((no_instrument_function)){
}
void d() __attribute__((no_instrument_function));
};
void t::d()
{}
int main()
{
t a;
a.a();
}

$ g++ instrument.cc  -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-pc-cygwin/4.7.0/lto-wrapper.exe
Target: i686-pc-cygwin
Configured with: ./configure --config-cache --prefix=/usr
--disable-win32-registry --enable-threads=win32 --enable-languages=c,c++,lto
--with-win32-nlsapi=unicode --enable-tls --disable-bootstrap --enable-shared
--disable-sjlj-exceptions --enable-gomp
Thread model: win32
gcc version 4.7.0 20110708 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=pentiumpro'
 /usr/libexec/gcc/i686-pc-cygwin/4.7.0/cc1plus.exe -quiet -v -D__CYGWIN32__
-D__CYGWIN__ -Dunix -D__unix__ -D__unix -idirafter
/usr/lib/gcc/i686-pc-cygwin/4.7.0/../../../../i686-pc-cygwin/lib/../include/w32api
-idirafter
/usr/lib/gcc/i686-pc-cygwin/4.7.0/../../../../i686-pc-cygwin/lib/../../include/w32api
instrument.cc -quiet -dumpbase instrument.cc -mtune=generic -march=pentiumpro
-auxbase instrument -version -o /tmp/ccqnGK06.s
GNU C++ (GCC) version 4.7.0 20110708 (experimental) (i686-pc-cygwin)
        compiled by GNU C version 4.7.0 20110622 (experimental), GMP version
5.0.0, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring duplicate directory "/usr/include"
ignoring duplicate directory
"/usr/lib/gcc/i686-pc-cygwin/4.7.0/../../../../i686-pc-cygwin/lib/../../include/w32api"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/i686-pc-cygwin/4.7.0/../../../../include/c++/4.7.0
 /usr/lib/gcc/i686-pc-cygwin/4.7.0/../../../../include/c++/4.7.0/i686-pc-cygwin
 /usr/lib/gcc/i686-pc-cygwin/4.7.0/../../../../include/c++/4.7.0/backward
 /usr/lib/gcc/i686-pc-cygwin/4.7.0/include
 /usr/local/include
 /usr/lib/gcc/i686-pc-cygwin/4.7.0/include-fixed
 /usr/lib/gcc/i686-pc-cygwin/4.7.0/../../../../i686-pc-cygwin/include

/usr/lib/gcc/i686-pc-cygwin/4.7.0/../../../../i686-pc-cygwin/lib/../include/w32api
End of search list.
GNU C++ (GCC) version 4.7.0 20110708 (experimental) (i686-pc-cygwin)
        compiled by GNU C version 4.7.0 20110622 (experimental), GMP version
5.0.0, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 68ba7c3bade77b76b9651c346a28b1de
instrument.cc:6:46: error: can’t set ‘no_instrument_function’ attribute after
definition
instrument.cc:8:45: error: can’t set ‘no_instrument_function’ attribute after
definition
instrument.cc:10:6: error: can’t set ‘no_instrument_function’ attribute after
definition


             reply	other threads:[~2011-07-12 14:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-12 14:23 jojelino at gmail dot com [this message]
2013-06-13  7:50 ` [Bug c++/49718] " avi@cloudius-systems.com
2014-01-08  9:07 ` laurent.alfonsi at st dot com
2014-01-15 19:38 ` law at gcc dot gnu.org
2014-01-15 19:38 ` law at redhat dot com
2014-08-04 19:02 ` bradley_small at hotmail dot com
2014-08-04 19:19 ` redi at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-49718-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).