I'm porting a macro from VS to GCC. The macro is pretty trivial: Take A and B, and create "A-B":

Code:
#include <iostream>

#define QUOTE1(A) #A
#define QUOTE2(A, B) QUOTE1(A##-##B)

int main()
{
    std::cout << QUOTE2(hello, world);
}
This works in VS, but GCC bans it, because it temporarily creates the token
Code:
hello-world
which is not a valid prepro token (apparently)

The workaround is pretty simple, instead of doing concat then quote, simply quote then concat:
Code:
#include <iostream>

#define QUOTE1(A) #A
#define QUOTE2(A, B) #A"-"#B

int main()
{
    std::cout << QUOTE2(hello, world);
}
This works fine and all, but the "problem" is that it doesn't generate the *exact* same code as before:
Code:
    std::cout << "hello-world"; //Before
    std::cout << "hello""-""world"; //After
}
AFAIK, there should be no difference between the two approaches, but I need to be 100% sure I'm not breaking anything. I'm particularly worried about things like operator precedence. What exactly does the standard say about things like "A" "B" "C"? Are they, for all intents and purposes, as good as a single string, or are they a single string tied via a concatenation operator... ? Are there any risks if someone gets fancy embedding the macro inside chained operators (eg: ? ?

Or, would there be some pre-pro magic I do not know of that could generate my string with a single pair of double quotes?