public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/49718] New: please allow no_instrument_function attribute in class member definition/declaration
@ 2011-07-12 14:23 jojelino at gmail dot com
2013-06-13 7:50 ` [Bug c++/49718] " avi@cloudius-systems.com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: jojelino at gmail dot com @ 2011-07-12 14:23 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/49718] please allow no_instrument_function attribute in class member definition/declaration
2011-07-12 14:23 [Bug c++/49718] New: please allow no_instrument_function attribute in class member definition/declaration jojelino at gmail dot com
@ 2013-06-13 7:50 ` avi@cloudius-systems.com
2014-01-08 9:07 ` laurent.alfonsi at st dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: avi@cloudius-systems.com @ 2013-06-13 7:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49718
Avi Kivity <avi@cloudius-systems.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |avi@cloudius-systems.com
--- Comment #1 from Avi Kivity <avi@cloudius-systems.com> ---
Seeing this too.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/49718] please allow no_instrument_function attribute in class member definition/declaration
2011-07-12 14:23 [Bug c++/49718] New: please allow no_instrument_function attribute in class member definition/declaration jojelino at gmail dot com
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 redhat dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: laurent.alfonsi at st dot com @ 2014-01-08 9:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49718
Laurent Aflonsi <laurent.alfonsi at st dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |laurent.alfonsi at st dot com
--- Comment #2 from Laurent Aflonsi <laurent.alfonsi at st dot com> ---
I have post a patch about this issue :
http://gcc.gnu.org/ml/gcc-patches/2014-01/msg00342.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/49718] please allow no_instrument_function attribute in class member definition/declaration
2011-07-12 14:23 [Bug c++/49718] New: please allow no_instrument_function attribute in class member definition/declaration jojelino at gmail dot com
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 redhat dot com
2014-01-15 19:38 ` law at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: law at redhat dot com @ 2014-01-15 19:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49718
Jeffrey A. Law <law at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |law at redhat dot com
Resolution|--- |FIXED
--- Comment #4 from Jeffrey A. Law <law at redhat dot com> ---
Fixed by recent trunk commit.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/49718] please allow no_instrument_function attribute in class member definition/declaration
2011-07-12 14:23 [Bug c++/49718] New: please allow no_instrument_function attribute in class member definition/declaration jojelino at gmail dot com
` (2 preceding siblings ...)
2014-01-15 19:38 ` law at redhat dot com
@ 2014-01-15 19:38 ` law at gcc dot gnu.org
2014-08-04 19:02 ` bradley_small at hotmail dot com
2014-08-04 19:19 ` redi at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: law at gcc dot gnu.org @ 2014-01-15 19:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49718
--- Comment #3 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Author: law
Date: Wed Jan 15 19:37:35 2014
New Revision: 206643
URL: http://gcc.gnu.org/viewcvs?rev=206643&root=gcc&view=rev
Log:
PR c++/49718
* c-common.c (handle_no_instrument_function_attribute): Allow
no_instrument_function attribute in class member
definition/declaration.
PR c++/49718
* g++.dg/pr49718.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/pr49718.C
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-common.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/49718] please allow no_instrument_function attribute in class member definition/declaration
2011-07-12 14:23 [Bug c++/49718] New: please allow no_instrument_function attribute in class member definition/declaration jojelino at gmail dot com
` (3 preceding siblings ...)
2014-01-15 19:38 ` law at gcc dot gnu.org
@ 2014-08-04 19:02 ` bradley_small at hotmail dot com
2014-08-04 19:19 ` redi at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: bradley_small at hotmail dot com @ 2014-08-04 19:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49718
bradley_small at hotmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bradley_small at hotmail dot com
--- Comment #5 from bradley_small at hotmail dot com ---
This behavior still appears in version 4.8
g++-4.8 (Debian 4.8.3-6) 4.8.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/49718] please allow no_instrument_function attribute in class member definition/declaration
2011-07-12 14:23 [Bug c++/49718] New: please allow no_instrument_function attribute in class member definition/declaration jojelino at gmail dot com
` (4 preceding siblings ...)
2014-08-04 19:02 ` bradley_small at hotmail dot com
@ 2014-08-04 19:19 ` redi at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2014-08-04 19:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49718
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.9.0
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to bradley_small from comment #5)
> This behavior still appears in version 4.8
> g++-4.8 (Debian 4.8.3-6) 4.8.3
To be expected, it was only fixed in January, prior to the GCC 4.9.0 release.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-08-04 19:19 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-12 14:23 [Bug c++/49718] New: please allow no_instrument_function attribute in class member definition/declaration jojelino at gmail dot com
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 redhat dot com
2014-01-15 19:38 ` law at gcc dot gnu.org
2014-08-04 19:02 ` bradley_small at hotmail dot com
2014-08-04 19:19 ` redi at gcc dot gnu.org
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).