Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > gnu.utils.bug > #2275
| From | Norman Goldstein <normvcr@telus.net> |
|---|---|
| Newsgroups | gnu.utils.bug |
| Subject | bug: gnu linker resolves two symbols but of different type |
| Date | 2020-02-05 00:05 -0800 |
| Message-ID | <mailman.330.1580909581.2412.bug-gnu-utils@gnu.org> (permalink) |
| References | <67023aae-5c6b-5b27-b0a6-43cb59af2fce@telus.net> |
Runnig on fedora 30, x86-64.
Here are two source files which compile and link without error, but
which break type expectations and not what the programmer would want.
The type of "foo" is different in the two files:
a.cpp:
//////
double foo = 2.1;
b.cpp
//////
#include <iostream>
using namespace std;
extern int foo;
int main( int argc, char* argv[] )
{
cout << "foo= " << foo << endl;
return 0;
}
////////////
On Windows 10, the visual studio cl.exe complains at link time.
Back to gnu.utils.bug | Previous | Next | Find similar
bug: gnu linker resolves two symbols but of different type Norman Goldstein <normvcr@telus.net> - 2020-02-05 00:05 -0800
csiph-web