Opened 2 years ago

Last modified 23 months ago

#66189 assigned defect

gsed 4.9 fails to build with gcc-4.2 (10.5.8, 10.6.8)

Reported by: barracuda156 Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version: 2.8.0
Keywords: snowleopard, leopard Cc: ballapete (Peter "Pete" Dyballa)
Port: gsed

Description

sed/compile.c: In function 'bad_command':
sed/compile.c:206: error: #pragma GCC diagnostic not allowed inside functions
sed/compile.c:207: error: #pragma GCC diagnostic not allowed inside functions
sed/compile.c:209: error: #pragma GCC diagnostic not allowed inside functions
make[2]: *** [sed/sed-compile.o] Error 1

Attachments (1)

gsed_compile.c-modern-pragmas.diff (395 bytes) - added by ballapete (Peter "Pete" Dyballa) 23 months ago.
Possible patch for use by old compilers

Download all attachments as: .zip

Change History (11)

comment:1 Changed 2 years ago by Schamschula (Marius Schamschula)

Maybe need to use a different compiler?

comment:2 in reply to:  1 ; Changed 2 years ago by barracuda156

Replying to Schamschula:

Maybe need to use a different compiler?

Unless those are patched out, we need to blacklist ancient compilers. (I do not want to make a PR for this myself, because a) maybe there is a better solution that blacklist and b) I have too many PRs open which no one helps to merge LOL.)

Version 0, edited 2 years ago by barracuda156 (next)

comment:3 Changed 2 years ago by Schamschula (Marius Schamschula)

I have no way of testing this other than blindly committing possible solutions. My oldest active OS in Big Sur. PRs are welcome.

comment:4 in reply to:  2 Changed 2 years ago by kencu (Ken)

1 or 2 places, patch out when building w gcc. More than that, blacklist older gccs.

Then test it to make sure it actually runs.

Then PR it with proof it works and you’ll see it committed faster.

Last edited 2 years ago by kencu (Ken) (previous) (diff)

comment:5 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)

Cc: ballapete added

comment:6 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)

The same error happens on PPC Mac OS X 10.5.8, Leoprad.

comment:7 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)

Easy workaround is to remove the three #pragma lines.

comment:8 Changed 2 years ago by barracuda156

Summary: gsed 4.9 fails to build on 10.6.8 with gcc-4.2gsed 4.9 fails to build with gcc-4.2 (10.5.8, 10.6.8)

Changed 23 months ago by ballapete (Peter "Pete" Dyballa)

Possible patch for use by old compilers

comment:9 in reply to:  7 Changed 23 months ago by barracuda156

Replying to ballapete:

Easy workaround is to remove the three #pragma lines.

Maybe you make a PR?

comment:10 Changed 23 months ago by ballapete (Peter "Pete" Dyballa)

What is a "PR"? Patch Request? Another option is to use a more up-to-date C compiler. It's up to the maintainer to decide which way is easier (for me it's the latter).

Note: See TracTickets for help on using tickets.