Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 206343

Summary: [gcc-4.3] smartmontools-5.37 build failure
Product: Gentoo Linux Reporter: Devils-Hawk <dev>
Component: [OLD] GCC PortingAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED WORKSFORME    
Severity: enhancement    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 198121    
Attachments: gcc-4.3.0 patch for smartmontools-5.37

Description Devils-Hawk 2008-01-17 15:12:33 UTC
Redefining a #define is an hard error in C++ now (not in C because the standards differ). gcc-4.3.0 tries to conform => smartmontools do not like that.
Attached patch should fix the compile. I think it preserves behaviour but it should be noted that 1 line above the fix, the old value of the define is used than the redefinition happens and then the new value is used. I do not have any clue how the preprocessor handles this but i assumed it uses the new value only from the point of redefinition onwards.

Reproducible: Always
Comment 1 Devils-Hawk 2008-01-17 15:15:31 UTC
Created attachment 141142 [details, diff]
gcc-4.3.0 patch for smartmontools-5.37
Comment 2 Ryan Hill (RETIRED) gentoo-dev 2008-01-17 18:29:42 UTC
Current GCC svn reverts the change that made redefinitions errors.  See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24924.  Any checkout after -r131530 (14 Jan 2008) will work.  Thanks for the patch though. :)