* visibility attribute not supported?! @ 2004-03-17 22:17 Jeremy Kolb 2004-03-19 10:33 ` llewelly 0 siblings, 1 reply; 9+ messages in thread From: Jeremy Kolb @ 2004-03-17 22:17 UTC (permalink / raw) To: gcc-help I'm running linux 2.6.3, gcc 3.3.3 on an amd t-bird. When I try to compile glibc I get a warning about the visibility attribute not being supported. I've tested this out with a test program that uses the visibility attribute and that fails as well. So glibc won't build for me. How do I enable the visibility attribute? I've recompiled binutils and gcc but I still get the same error. Jeremy ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: visibility attribute not supported?! 2004-03-17 22:17 visibility attribute not supported?! Jeremy Kolb @ 2004-03-19 10:33 ` llewelly 2004-03-19 17:37 ` Jeremy Kolb 0 siblings, 1 reply; 9+ messages in thread From: llewelly @ 2004-03-19 10:33 UTC (permalink / raw) To: Jeremy Kolb; +Cc: gcc-help Jeremy Kolb <jkolb@brandeis.edu> writes: > I'm running linux 2.6.3, gcc 3.3.3 on an amd t-bird. When I try to > compile glibc I get a warning about the visibility attribute not being > supported. I've tested this out with a test program that uses the > visibility attribute and that fails as well. So glibc won't build for > me. How do I enable the visibility attribute? I've recompiled binutils > and gcc but I still get the same error. First, make sure you are using fsf gcc 3.3.3 and not the derivative shipped by your distro maker (it seems all distros hand-roll their own gcc derivative ... don't ask me why.) If you can still reproduce with fsf gcc, I think you should report this as a bug. There's a similar bug reported against 3.4-branch: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13134 but it doesn't mention 3.3.3 . ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: visibility attribute not supported?! 2004-03-19 10:33 ` llewelly @ 2004-03-19 17:37 ` Jeremy Kolb 2004-03-19 20:24 ` llewelly 0 siblings, 1 reply; 9+ messages in thread From: Jeremy Kolb @ 2004-03-19 17:37 UTC (permalink / raw) To: llewelly; +Cc: gcc-help Yeah It's stock fsf gcc. The distro I use is Sourcemage and it downloads from gcc directly from the gnu site (and it's md5 verified). The thing is this has only happened to a few people and not the rest, we don't know why. Jeremy On Thu, 2004-03-18 at 23:18, llewelly@xmission.com wrote: > Jeremy Kolb <jkolb@brandeis.edu> writes: > > > I'm running linux 2.6.3, gcc 3.3.3 on an amd t-bird. When I try to > > compile glibc I get a warning about the visibility attribute not being > > supported. I've tested this out with a test program that uses the > > visibility attribute and that fails as well. So glibc won't build for > > me. How do I enable the visibility attribute? I've recompiled binutils > > and gcc but I still get the same error. > > First, make sure you are using fsf gcc 3.3.3 and not the derivative > shipped by your distro maker (it seems all distros hand-roll their own > gcc derivative ... don't ask me why.) > If you can still reproduce with fsf gcc, I think you should report > this as a bug. There's a similar bug > reported against 3.4-branch: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13134 > but it doesn't mention 3.3.3 . > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: visibility attribute not supported?! 2004-03-19 17:37 ` Jeremy Kolb @ 2004-03-19 20:24 ` llewelly 2004-03-20 17:54 ` new computer language with GCC Eljay Love-Jensen 0 siblings, 1 reply; 9+ messages in thread From: llewelly @ 2004-03-19 20:24 UTC (permalink / raw) To: Jeremy Kolb; +Cc: gcc-help Jeremy Kolb <jkolb@brandeis.edu> writes: > Yeah It's stock fsf gcc. The distro I use is Sourcemage and it downloads > from gcc directly from the gnu site (and it's md5 verified). The thing > is this has only happened to a few people and not the rest, we don't > know why. As near as I can tell, gcc should build with visibility support iff you are using gnu ld. Since you are running linux, I can't imagine you might be using anything else. So I suspect a bug somewheres. When you file a bug report, you should include the output of ld --version, gcc --version, and uname -a, in addition to the info requested at gcc.gnu.org/bugs.html . I suppose you could reconfigure and rebuild gcc, adding --with-gnu-ld to your configure arguments, but it seems a bug that that should be necessary on a platform where SFAIK only gnu ld is available. ^ permalink raw reply [flat|nested] 9+ messages in thread
* new computer language with GCC 2004-03-19 20:24 ` llewelly @ 2004-03-20 17:54 ` Eljay Love-Jensen 2004-03-20 18:27 ` llewelly 2004-03-21 19:50 ` Crafting Better Source Code in C++ Eljay Love-Jensen 0 siblings, 2 replies; 9+ messages in thread From: Eljay Love-Jensen @ 2004-03-20 17:54 UTC (permalink / raw) To: gcc-help Hello everyone, I would like to try my hand at implementing a computer language in GCC. The language is "lambda calculus brainf---". Yes, "brainf---" is a dirty word. And best of all, it's a VERY VERY SIMPLE language. (Look it up in Google. Amazingly terse.) Does anyone know of a good "Idiot's Guide to Get Your Pet Programming Language Working With GCC As The Backend"? An O'Reilly book or a HowTo URL? I've been through the Compilers (Aho, Sethi, Ulman) "dragon" book. I'd like to try my hand at the real thing. I don't have any delusions that I'll be the next Niklaus Wirth. I don't think anyone will be as prolific as he has been in formulating programming languages. I could write a LCB --> C translator. But that's a CFront kind of solution; I want to get some experience working with GCC. Thanks, --Eljay ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: new computer language with GCC 2004-03-20 17:54 ` new computer language with GCC Eljay Love-Jensen @ 2004-03-20 18:27 ` llewelly 2004-03-21 11:27 ` Eljay Love-Jensen 2004-03-21 19:50 ` Crafting Better Source Code in C++ Eljay Love-Jensen 1 sibling, 1 reply; 9+ messages in thread From: llewelly @ 2004-03-20 18:27 UTC (permalink / raw) To: Eljay Love-Jensen; +Cc: gcc-help Eljay Love-Jensen <eljay@adobe.com> writes: > Hello everyone, > > I would like to try my hand at implementing a computer language in GCC. > > The language is "lambda calculus brainf---". Yes, "brainf---" is a > dirty word. And best of all, it's a VERY VERY SIMPLE language. (Look > it up in Google. Amazingly terse.) > > Does anyone know of a good "Idiot's Guide to Get Your Pet Programming > Language Working With GCC As The Backend"? An O'Reilly book or a > HowTo URL? http://gcc.gnu.org/readings.html has 3 links which are helpful for frontends. The front-end howto, the COBOL front-end manual, and the toy example language. However I understand they are of varying degrees of obsolesence. Most of the experts on this topic frequent the gcc mailing list. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: new computer language with GCC 2004-03-20 18:27 ` llewelly @ 2004-03-21 11:27 ` Eljay Love-Jensen 0 siblings, 0 replies; 9+ messages in thread From: Eljay Love-Jensen @ 2004-03-21 11:27 UTC (permalink / raw) To: llewelly; +Cc: gcc-help Looks like <http://www.tldp.org/HOWTO/GCC-Frontend-HOWTO> is exactly what I needed. Thanks, --Eljay ^ permalink raw reply [flat|nested] 9+ messages in thread
* Crafting Better Source Code in C++ 2004-03-20 17:54 ` new computer language with GCC Eljay Love-Jensen 2004-03-20 18:27 ` llewelly @ 2004-03-21 19:50 ` Eljay Love-Jensen 2004-03-22 4:50 ` llewelly 1 sibling, 1 reply; 9+ messages in thread From: Eljay Love-Jensen @ 2004-03-21 19:50 UTC (permalink / raw) To: gcc-help Hi everyone, #define SOAPBOX I've been asked this question several times about C++ (in particular, GCC's C++), and I thought I'd share my thoughts. The GCC compiler has a suite of warnings which will point out dangerous or suspicious coding practices. By and large, I feel that these GCC warnings are indicative of either bad code ("bugs"! ~10% of the time), or poor coding practices (~90%). In either case, I think it is a worthwhile endeavor to use GCC's warning facilities to help improve the source code, and improve the portability of the source code. At a minimum, I suggest everyone ALWAYS use these flags: -pedantic -Wall -W Other flags are documented here: http://gcc.gnu.org/onlinedocs/gcc-3.3.3/gcc/Warning-Options.html I use almost all the additional flags. Call me ultra-pedantic. I wish there was an -WALL switch, to enable all warnings (even the annoying ones which I disregard), just so I wouldn't have the creepy feeling I've missed one. I have heard of people unhappy that there isn't a good GNU Lint++ for C++ code in general. In my opinion, a good chunk of Lint++ facility is built right into the GCC compiler. If only people would enable it. Granted... Gimpel's PC-lint / FlexeLint software does an extensive analysis beyond what GCC has built in. Gimpel's software has a different objective than GCC. #undef SOAPBOX Thanks, --Eljay ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Crafting Better Source Code in C++ 2004-03-21 19:50 ` Crafting Better Source Code in C++ Eljay Love-Jensen @ 2004-03-22 4:50 ` llewelly 0 siblings, 0 replies; 9+ messages in thread From: llewelly @ 2004-03-22 4:50 UTC (permalink / raw) To: Eljay Love-Jensen; +Cc: gcc-help Eljay Love-Jensen <eljay@adobe.com> writes: > Hi everyone, > > #define SOAPBOX > > I've been asked this question several times about C++ (in particular, > GCC's C++), and I thought I'd share my thoughts. > > The GCC compiler has a suite of warnings which will point out > dangerous or suspicious coding practices. By and large, I feel that > these GCC warnings are indicative of either bad code ("bugs"! ~10% of > the time), or poor coding practices (~90%). > > In either case, I think it is a worthwhile endeavor to use GCC's > warning facilities to help improve the source code, and improve the > portability of the source code. > > At a minimum, I suggest everyone ALWAYS use these flags: > -pedantic -Wall -W As more and more C libraries incorporate C99 features, fewer and fewer people will be able to use -pedantic with C++ . Many real projects will need to seperate that code which can be written with strict conformance from that which requires non standard features, and use appropriately different compile flags. While we are at it, however, I suggest another warning flag: -O :-) . Certain warnings (like 'foo unused', and 'foo may be used before it is initialized' ) require data-flow analysis, and so are only enabled with -On, e.g. -Wunitialized. > > Other flags are documented here: > http://gcc.gnu.org/onlinedocs/gcc-3.3.3/gcc/Warning-Options.html > > I use almost all the additional flags. Call me ultra-pedantic. I > wish there was an -WALL switch, to enable all warnings (even the > annoying ones which I disregard), just so I wouldn't have the creepy > feeling I've missed one. [snip] Compile this program: #include<iostream> #include<ostream> int main() { std::cout << "Hello World!" << std::endl; } with: g++ -Weffc++ -Wsystem-headers Alternatively, try building any boost-using C++ with -Weffc++, without -Wsystem-headers. Personally, I think the flags not enabled by -W -Wall are only useful in very rare circumstances. ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2004-03-21 23:51 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-03-17 22:17 visibility attribute not supported?! Jeremy Kolb 2004-03-19 10:33 ` llewelly 2004-03-19 17:37 ` Jeremy Kolb 2004-03-19 20:24 ` llewelly 2004-03-20 17:54 ` new computer language with GCC Eljay Love-Jensen 2004-03-20 18:27 ` llewelly 2004-03-21 11:27 ` Eljay Love-Jensen 2004-03-21 19:50 ` Crafting Better Source Code in C++ Eljay Love-Jensen 2004-03-22 4:50 ` llewelly
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).