Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 257299 - sys-devel/gcc: installed c89/c99 wrapper programs should behave as c89/c99 compilers
Summary: sys-devel/gcc: installed c89/c99 wrapper programs should behave as c89/c99 co...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-01 22:44 UTC by Harald van Dijk (RETIRED)
Modified: 2009-02-04 18:26 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
c89-c99-pedantic.patch (c89-c99-pedantic.patch,1.00 KB, patch)
2009-02-02 18:21 UTC, Harald van Dijk (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Harald van Dijk (RETIRED) gentoo-dev 2009-02-01 22:44:36 UTC
gcc without the -pedantic option is by design not a C90/C99-conforming compiler. glibc with -D_FORTIFY_SOURCE enabled is by design not a C90/C99-conforming library. The c89/c99 programs should handle this by defaulting to -pedantic -U_FORTIFY_SOURCE. There's no point in making these utilities nonconforming; there's plain old cc/gcc if you want that.
Comment 1 SpanKY gentoo-dev 2009-02-02 04:56:16 UTC
feel free to post diffs to the files in question that accomplish exactly what you're talking about
Comment 2 Harald van Dijk (RETIRED) gentoo-dev 2009-02-02 18:21:34 UTC
Created attachment 180729 [details, diff]
c89-c99-pedantic.patch

I was thinking of something like this. This way c89 and c99 are as close to conforming by default as possible with gcc. It's still possible to override the options by explicitly passing f.e. -D_FORTIFY_SOURCE, but that's okay, the idea is simply to have a conforming (or as close as possible) compiler when no extra options are passed.

(I'd even get rid of the whole for i loop; c89 -std=c99 falls in the same category as c89 -Werror for me: you are explicitly asking for a compiler that _doesn't_ conform to C90, so let's give you one. Keeping the loop is fine too though.)
Comment 3 SpanKY gentoo-dev 2009-02-03 01:12:04 UTC
looks sane to me ... feel free to commit, otherwise i'll prob get to it later this week
Comment 4 Harald van Dijk (RETIRED) gentoo-dev 2009-02-03 19:52:53 UTC
Thanks, committed.
Comment 5 Ryan Hill (RETIRED) gentoo-dev 2009-02-04 00:00:42 UTC
something went wrong with the commit.  your changes never got through.
Comment 6 Harald van Dijk (RETIRED) gentoo-dev 2009-02-04 18:26:20 UTC
That's odd. The ChangeLog part did get committed, but files/* didn't? Fixed now by manually committing files/*, and then updating the Manifest using repoman. I'll check what happened to help make sure it doesn't happen again. Sorry for leaving things broken.