public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/62282] New: Undefined reference with __inline __attribute(__gnu_inline__) with -O0
@ 2014-08-27 11:38 dmitry.petroff at gmail dot com
  2014-08-27 11:54 ` [Bug c++/62282] " rguenth at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: dmitry.petroff at gmail dot com @ 2014-08-27 11:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62282

            Bug ID: 62282
           Summary: Undefined reference with __inline
                    __attribute(__gnu_inline__) with -O0
           Product: gcc
           Version: 4.8.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dmitry.petroff at gmail dot com

The following code produces "undefined reference to `test(int)'" message when
compiled with g++ -O0 test.cpp:

// == cut ==
__inline
__attribute__ ((__gnu_inline__))
int test(int v)
{
    return v;
}

int main(int argc, char **argv)
{
    return test(argc);
}
// == cut ==

It links successfully in C mode.
This bug breaks for me usage of gperf's C output in C++ code with simple
"include" directive.


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-09-02 11:48 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-27 11:38 [Bug c++/62282] New: Undefined reference with __inline __attribute(__gnu_inline__) with -O0 dmitry.petroff at gmail dot com
2014-08-27 11:54 ` [Bug c++/62282] " rguenth at gcc dot gnu.org
2014-08-27 16:28 ` pinskia at gcc dot gnu.org
2014-08-28 10:52 ` dmitry.petroff at gmail dot com
2014-08-28 12:26 ` [Bug c++/62282] [4.8/4.9/5 Regression] " rguenth at gcc dot gnu.org
2014-08-28 12:27 ` rguenth at gcc dot gnu.org
2014-09-01  9:18 ` jakub at gcc dot gnu.org
2014-09-01 12:10 ` jakub at gcc dot gnu.org
2014-09-01 12:20 ` jakub at gcc dot gnu.org
2014-09-02 10:34 ` dmitry.petroff at gmail dot com
2014-09-02 10:47 ` jakub at gcc dot gnu.org
2014-09-02 11:48 ` dmitry.petroff at gmail dot com

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).