9

These tags describe a complementary pair of C functions, and most questions tagged with one are also tagged with the other.

is the more popular, at 96 questions tagged vs 69, and has the more fleshed-out wiki, so it seems like the obvious choice for the merge target.

2 Answers 2

2

Definitely agree. The functions are two sides of the same coin, and can only be used together.

Most questions that use either use both tags already, and already has a tag wiki.

For example, the only reason I only tagged on What software-visible processor state needs to go in a jmp_buf on an x86-64 processor? and not also is the 5-tag limit and keeping x86 + x86-64 was more useful.

I don't have 5 rep in the tag yet, so I couldn't propose adding setjmp as a synonym of longjmp. Someone should go do that (unless there's a different procedure for tag merges).

2

Clearly, there do not need to be separate tags for each of these, since they refer to the same topic. They should be merged together under a single tag.

We have to choose one of them as the primary tag. Others have argued/assumed that needs to be the primary tag because it is the more widely used tag, with a better excerpt. However, the wiki can be easily moved, and tag synonyms take care of frictionlessly redirecting users to a new tag. So, I've decided that the primary tag should be , since that's the name of the header file (setjmp.h) that provides these functions in C.

3
  • "longjmp" is usually what I'd say if I was going to mention them, e.g. as an example of something that can break assumptions, or something other than C++ exceptions that can do funky stuff with the stack pointer. But a google search shows that setjmp gets mentioned the same amount, and on site:stackoverflow.com there are 3000 hits for setjmp vs. 2930 for longjmp. So I guess that's fine, maybe other people think of "setjmp" as the primary thing, and your point about the header name is good. Commented Dec 16, 2020 at 16:56
  • Note that they're synonyms, @Peter, so even if someone tries to use [longjmp], that'll still work just fine.
    – Cody Gray Mod
    Commented Dec 17, 2020 at 6:22
  • True. My concern is only how it looks in the list of tags. We have a tag for [context-switch], not [context-save]. (And a [context] tag with a couple random uses about other things). Err, and we also have a separate tag for [context-switching]. stackoverflow.com/questions/tagged/context-switch vs. stackoverflow.com/questions/tagged/context-switching; should probably also be synonyms. But anyway, setjmp is fine, this isn't a real objection, more a digression about how I think about things. Commented Dec 17, 2020 at 6:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .