C11
Citant, chapitre §6.10/p2, "directives prétraitement" (Souligné par)
A preprocessing directive consists of a sequence of preprocessing tokens that satisfies the following constraints: The first token in the sequence is a #
preprocessing token that (at the start of translation phase 4) is either the first character in the source file (optionally after white space containing no new-line characters) or that follows white space containing at least one new-line character. The last token in the sequence is the first newline character that follows the first token in the sequence.
Donc, vous ne pouvez pas avoir un #
après un autre jeton. Dans votre code
int main()
{ #pragma omp parallel
^ ^^^
la syntaxe viole les contraintes, d'où l'erreur. Vous devez le mettre dans propre ligne.
De manière spécifique, le '# pragma' est au mauvais endroit – JeremyP
@JeremyP Bien, laissez-moi être explicite. Merci –
Je ne le mentionne que parce que j'ai passé quelques minutes à ne pas le remarquer et à penser "de quoi parle-t-il, il n'y a rien de mal avec le' # inclure ":) – JeremyP