public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/43114]  New: GCC 4.4.1 problems with include
@ 2010-02-18 13:38 nar dot martirosyan at gmail dot com
  2010-02-20  6:27 ` [Bug c++/43114] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: nar dot martirosyan at gmail dot com @ 2010-02-18 13:38 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1122 bytes --]

Overview Description:

GCC version: 4.4.1

System info: 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:04:26 UTC 2009 i686
GNU/Linux, Ubuntu 9.10

GCC I used was the Ubuntu 9.10 native c++ compiler, installed using Synaptic
package manager.

The case is the following: 
There are two files to be compiled: cpp and hpp.
x.hpp contains only the f() function prototype.
x.cpp contains the f() function implementation and main().
x.cpp file includes the x.hpp.

g++ -c x.hpp - this command generates x.hpp.gch file.

After this the command

g++ x.cpp 

gives the following error:

x.cpp: In function ‘int f()’:
x.cpp:3: error: redefinition of ‘int f()’
x.hpp:2: error: ‘int f()’ previously defined here.

In some cases it is not reproducible.


-- 
           Summary: GCC 4.4.1 problems with include
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: nar dot martirosyan at gmail dot com


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


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

end of thread, other threads:[~2011-03-29 16:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-43114-4@http.gcc.gnu.org/bugzilla/>
2011-03-29 16:39 ` [Bug c++/43114] GCC 4.4.1 problems with include redi at gcc dot gnu.org
2010-02-18 13:38 [Bug c++/43114] New: " nar dot martirosyan at gmail dot com
2010-02-20  6:27 ` [Bug c++/43114] " 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).