$ sudo port
MacPorts 2.4.0
Entering shell mode... ("help" for help, "quit" to quit)
[comar/comar] > select --list gcc
Available versions for gcc:
mp-gcc6
none (active)
[comar/comar] > set gcc mp-gcc47
Error: "port set" is ambiguous:
port setunrequested
port setrequested
[comar/comar] > select --set gcc mp-gcc47
Selecting 'mp-gcc47' for 'gcc' failed: The specified version 'mp-gcc47' is not valid.
[comar/comar] > select --set gcc mp-gcc6
Selecting 'mp-gcc6' for 'gcc' succeeded. 'mp-gcc6' is now active.
[comar/comar] >