I assume the question is about the French government imposing consequences, rather than the local government doing so. (Obviously, entering a sovereign country without a visa, or going to a prohibited area such as a military base, carries legal consequences under the local legislation.)
I will also exclude cases where going into one of those "banned" areas is a component of a crime rather than the crime itself. For example, selling arms to countries under embargo, or training in Islamist camps with the intent to come back on French territory and commit terrorist actions.
No criminal consequence
Travel advisories do not have any legal force.
I cannot prove that conclusively, because it is hard to prove a negative. Nonetheless, here’s a mainstream press article that basically says so (section 2 of the article).
Such a prohibition would also require some fairly totalitarian legal theory. Travel restrictions within French territory exist, but they are usually based on specific local and/or personal circumstances and are subject to judicial review. An unlimited-duration, large-geographical area restriction, applying to all French citizens, in a place outside French jurisdiction, with criminal penalties? It seems that would have a hard time passing judicial review.
There’s also a point of language. "Les voyages sont proscrits" without any other context is indeed best translated by "travel is forbidden". However, for that sort of meaning (where an authority forbids something to be done), the more common verb would be "interdire", rather than "proscrire". And it turns out that "proscrire" has another meaning of social (rather than legal) interdict, i.e. shunning rather than forbidding, which "interdire" lacks. I am not saying that the foreign office is playing on the ambiguity of words to make people believe that something is forbidden when it is only strongly discouraged, but I am not not saying that either.
Monetary consequences can occur, though
Articles 22 and 23 of the law of the state’s external action
L'Etat peut exiger le remboursement de tout ou partie des dépenses qu'il a engagées ou dont il serait redevable à l'égard de tiers à l'occasion d'opérations de secours à l'étranger au bénéfice de personnes s'étant délibérément exposées, sauf motif légitime tiré notamment de leur activité professionnelle ou d'une situation d'urgence, à des risques qu'elles ne pouvaient ignorer.
(...)
L'Etat peut exercer une action récursoire à l'encontre des opérateurs de transport, des compagnies d'assurance, des agents de voyage et autres opérateurs de la vente de voyages et de séjours, ou de leurs représentants, auxquels il a dû se substituer en organisant une opération de secours à l'étranger, faute pour ces professionnels d'avoir fourni la prestation de voyage ou de rapatriement à laquelle ils étaient tenus à l'égard de leurs contractants.
When persons take on risks that they could not be unaware of, without legitimate motive taken for example from their professional activity or a state of emergency, the state may demand full or partial refund for any expenses it incurred toward third parties while rescuing those persons on foreign soil.
(...)
The state might sue transport operators, insurance companies, travel agencies and other businesses selling travel and stays, or their representatives, when it had to organize a rescue operation because of the inability of those businesses to perform a travel or rapatriation that it owed towards the buyers.
Basically: if you are a journalist covering a war zone, or a humanitarian providing food assistance in a failed state, the state will rescue you no questions asked. If you are a rich dude who likes to sail around, and you decided the Somali coast was lovely this time of the year, some questions might be asked.
Of course, whether you have a "legitimate motive" or whether you took on "risks that you could not be unaware of" would be a fact-dependent inquiry. The location of the rescue is only one factor in this. As of this writing, most of Morocco is deemed a safe country; but if you go there and start agitating for the violent overthrow of Mohammed VI, you might find yourself in need of consular assistance fairly quickly.
Private contracts with travel agents, insurance companies and the like may also include cancellation clauses based on official travel advisories. "We reserve the right to cancel your exotic trip if the security conditions deteriorate too much" is a reasonable clause, and basing it on the government’s determination is an objective standard (more likely to be upheld than an ad-hoc determination by the travel agent themselves).