I think title says it all 🙂
Is there any particular practical reason (I guess it's mostly historic, but I'm unable to find it on my own) why GCC uses AT&T/GAS syntax?
Note: I know this is just default and you can switch it
Note 2: I personally find "Intel syntax" much more readable, so that's why it surpises me.
Best Answer
GCC uses AT&T syntax by default because it was originally written on a system that either used AT&T System V (now known as UNIX) or had syntax that closely resembled System V.
From Wikipedia on GCC
Note the following part:
Given that
GCC was first released March 22, 1987
* and thatSystem V Release 3 was released in 1986
**, it's highly likely that GCC was written on either SVR2 or SVR3.The Wikipedia quote makes it clear that Stallman was working on the Lawrence Livermore Labs' equipment, which was Unix based and therefore System V. So we could stop there and just say "that's what he had to work on." But it's also interesting to look at the available MS-DOS / PC-DOS systems at that point in time. According to this timeline, the likely candidate for PC-DOS1 would have been version 3.2.
PCs (personal computers) weren't as widely used in academic or research settings at that point in time because their networking facilities were not as good as what Unix based systems could provide. There was also a historical preference for server / terminal type environments. Server / terminal systems had been available prior to the existence of PCs and generally provided much greater processing power and other resources than what a PC could affordably provide.
So while Stallman could have developed GCC on a PC, he likely would not have wanted to since his primary work would have been on Unix systems.
And as noted in a comment, there was an underlying architectural difference between the CPUs powering Unix systems and PCs.
Put all those pieces together and it's pretty clear why Stallman chose the AT&T syntax over Intel when developing GCC.
1 Note that it's easiest to say that MS-DOS was called PC-DOS prior to version 3.31. That being said, there's a lot to the history of DOS development that's outside the scope of this question.