I'd note that "retarded" can be a technical term which is not an insult or swear word which means "delayed" (e.g. "tardy") In an internal combustion engine you could have "advanced" or "retarded" spark timing for instance.

It's an amusing area where denotations are the same in French and English but the denotations are different. [1] All over Quebec you see convenience stores called "Couche-Tard" (Sleep Late) which can provoke a double-take like seeing a sign for a restaurant called PFK with a picture of Colonel Sanders.

[1] An ad for a breakfast sandwich, coffee and hash browns can be advertised as "L'Ensemble Quotodienne" a phrase made of everyday words in French which are $20 words in English.

Not in source code, but the word is also officially used in aviation as an automated audio warning to the pilots to, IIRC, slow down or pull back. The system screams "Retard! Retard! Retard!". I think they often hear it during normal landing procedures.

https://www.youtube.com/watch?v=SbLHah4XUwk&t=815s

IIRC Family Guy has a scene where Peter responds to the announcement in kind.

Notably French and English are the two languages of international aviation

6.15.2 has 20 occurrences, of which only 2 are actual swearwords

  ./fs/bcachefs/bkey_cmp.h: /* we shouldn't need asm for this, but gcc is being retarded: */
  ./drivers/net/wireless/broadcom/brcm80211/brcmsmac/d11.h:/* Advance Retard */
  ./drivers/net/wireless/broadcom/b43legacy/phy.h:#define B43legacy_OFDMTAB_ADVRETARD B43legacy_OFDMTAB(0x09, 0)
  ./drivers/net/wireless/broadcom/b43legacy/phy.c:  for (i = 0; i < B43legacy_ILT_RETARD_SIZE; i++)
  ./drivers/net/wireless/broadcom/b43legacy/phy.c:           b43legacy_ilt_retard[i]);
  ./drivers/net/wireless/broadcom/b43legacy/ilt.h:#define B43legacy_ILT_RETARD_SIZE 53
  ./drivers/net/wireless/broadcom/b43legacy/ilt.h:extern const u32 b43legacy_ilt_retard[B43legacy_ILT_RETARD_SIZE];
  ./drivers/net/wireless/broadcom/b43legacy/ilt.c:const u32 b43legacy_ilt_retard[B43legacy_ILT_RETARD_SIZE] = {
  ./drivers/net/wireless/broadcom/b43/wa.c:static void b43_wa_art(struct b43_wldev *dev) /* ADV retard table */
  ./drivers/net/wireless/broadcom/b43/wa.c: for (i = 0; i < B43_TAB_RETARD_SIZE; i++)
  ./drivers/net/wireless/broadcom/b43/wa.c:   b43_ofdmtab_write32(dev, B43_OFDMTAB_ADVRETARD,
  ./drivers/net/wireless/broadcom/b43/wa.c:    i, b43_tab_retard[i]);
  ./drivers/net/wireless/broadcom/b43/tables.h:#define B43_TAB_RETARD_SIZE 53
  ./drivers/net/wireless/broadcom/b43/tables.h:extern const u32 b43_tab_retard[];
  ./drivers/net/wireless/broadcom/b43/tables.c:const u32 b43_tab_retard[] = {
  ./drivers/net/wireless/broadcom/b43/tables.c: BUILD_BUG_ON(B43_TAB_RETARD_SIZE != ARRAY_SIZE(b43_tab_retard));
  ./drivers/net/wireless/broadcom/b43/phy_n.h:#define B43_NPHY_PHYSTAT_ADVRET   B43_PHY_N(0x1F3) /* PHY stats ADV retard */
  ./drivers/net/wireless/broadcom/b43/phy_lp.h:#define B43_LPPHY_ADVANCEDRETARDROTOR_ADDR B43_PHY_OFDM(0x8B) /* AdvancedRetardRotor Address */
  ./drivers/net/wireless/broadcom/b43/phy_a.h:#define B43_OFDMTAB_ADVRETARD  B43_OFDMTAB(0x09, 0)
  ./drivers/net/dsa/sja1105/sja1105_dynamic_config.c:/* The switch is so retarded that it makes our command/entry abstraction

In music, a gradual slowing uses the internationally-understood Italian term "ritardando", which is abbreviated as "rit." or "ritard.", which often leads to chuckles by less-mature musicians and diverts precious rehearsal or recording studio time. I've learned to always say the full word "ritardando".

Huh I’ve only seen rit., not ritard.

The abbreviation you will most commonly see written is "rit." The abbreviation you will most common hear verbally is "ritard."

Once upon a time planes dropped only gravity bombs that just fell with the forward speed of the launching aircraft. These exploded directly under the aircraft (see all ww2 footage). Then were developed "retarded-fall" or delayed bombs with fins or parachutes so that the bomb's forward movment slowed and it exploded behind the aircraft (see vietnam footage of bombs with pop-out fins). Then came laser-guided "smart" bombs. So we now have "smart" bombs which are guided, "dumb" bombs which arent, and "retarded" bombs which are dumb bombs that slow down. We have accidentally fallen into pc trap where it can be difficult to use these terms.

Retarded fall "snakeye" bombs: https://youtu.be/3_RM19hOMo4

“Retard” the verb has one perfectly acceptable meaning but saying a thing is “retarded” is a non-politically-correct equivalent to “mentally challenged”.

I wouldn’t call it a swear word but it certainly is crude and insensitive.

Something like “gcc optimizes like a girl” certainly wouldn’t be any better.

However that doesn't explain all usages here: https://github.com/search?q=repo%3Atorvalds%2Flinux%20retard...

Direct quotes: "we shouldn't need asm for this, but gcc is being retarded" and "The switch is so retarded that it makes our command/entry abstraction crumble apart."