public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/33520] New: Usage of extern inline functions violates C++ standard dcl 7.1.2 (4)
@ 2007-09-21 18:36 gcc at artemfrolov dot fastmail dot fm
2007-09-21 18:43 ` [Bug c++/33520] " pinskia at gcc dot gnu dot org
2007-09-21 18:47 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: gcc at artemfrolov dot fastmail dot fm @ 2007-09-21 18:36 UTC (permalink / raw)
To: gcc-bugs
According to C++ standard 7.1.2 (4):
An inline function shall be defined in every translation unit in which
it is used and shall have exactly the same definition in every case
For the following code:
---------
inline.cc
---------
#include <stdio.h>
inline void foo() {
printf("Hey!\n");
}
void bar() {
foo();
}
----------
main.cc
----------
extern void foo();
int main() {
foo();
return 0;
}
----------
g++ -std=c++98 main.cc inline.cc
creates a program and does not report any violation of the standard.
--
Summary: Usage of extern inline functions violates C++ standard
dcl 7.1.2 (4)
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc at artemfrolov dot fastmail dot fm
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33520
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/33520] Usage of extern inline functions violates C++ standard dcl 7.1.2 (4)
2007-09-21 18:36 [Bug c++/33520] New: Usage of extern inline functions violates C++ standard dcl 7.1.2 (4) gcc at artemfrolov dot fastmail dot fm
@ 2007-09-21 18:43 ` pinskia at gcc dot gnu dot org
2007-09-21 18:47 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-09-21 18:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-09-21 18:43 -------
I think it also mentions in the same pargraph that this violation does not have
to be diagnostic.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33520
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/33520] Usage of extern inline functions violates C++ standard dcl 7.1.2 (4)
2007-09-21 18:36 [Bug c++/33520] New: Usage of extern inline functions violates C++ standard dcl 7.1.2 (4) gcc at artemfrolov dot fastmail dot fm
2007-09-21 18:43 ` [Bug c++/33520] " pinskia at gcc dot gnu dot org
@ 2007-09-21 18:47 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-09-21 18:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2007-09-21 18:47 -------
In fact it does.
This is a hard bug to fix without all translation units aviable at compile
time.
So I am going to close as won't fix.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Status|UNCONFIRMED |RESOLVED
Resolution| |WONTFIX
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33520
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-09-21 18:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-21 18:36 [Bug c++/33520] New: Usage of extern inline functions violates C++ standard dcl 7.1.2 (4) gcc at artemfrolov dot fastmail dot fm
2007-09-21 18:43 ` [Bug c++/33520] " pinskia at gcc dot gnu dot org
2007-09-21 18:47 ` pinskia at gcc dot gnu dot 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).