Prince William's forthcoming marriage to Kate Middleton is unlikely to be beset by any legal confusion. But future Windsor weddings could easily be mired in controversy unless there are changes to the law, according to Professor Rebecca Probert from Warwick University, an expert on marriage law.

Probert argues that laws need to be unravelled which, for example, give the royals exemptions that don't apply to the rest of us, while others saddle the royal family with archaic restrictions that contravene their human rights.

The forthcoming royal wedding seemed a good impetus to convert 10 years of research into a book, The Rights and Wrongs of Royal Marriage: How the Law Has Led to Heartbreak, Farce and Confusion, and Why It Must Be Changed.

Probert points out that, as the law stands, any future heir could succeed to the throne if he or she married a Muslim or a Hindu, but not a Catholic. And in fact, marrying a scientologist or a Satanist would still put him or her in the clear. "There's nothing stopping them under current legislation," she says. "The Act of Settlement says only that you drop out of the succession if you marry a Catholic. Any other religion, it's fine. Of course, it's absurd by 21st century standards. But it's a consequence of 18th century law designed to secure a Protestant succession. It's ridiculous that it has never been repealed. "

It's even more ridiculous, perhaps, when heirs are allowed to cohabit with Catholics or enter into same-sex relationships with them without forfeiting their place in the succession. Also there is nothing to stop the wife or husband of a royal from converting to Catholicism after the wedding.

The issue of royal consent is just as baffling. Anyone who can trace his or her ancestry back to George II may require the Queen's consent before marrying. Otherwise the marriage could be declared technically void under UK law.

Extensive research in the National Archives has led Probert to conclude that while successive governments have been aware of the "absurdities" of royal marriage law, they have done nothing about it. "They don't want to be seen to be legislating during a crisis, such as Princess Margaret's plan to marry [the divorcee] Group Captain Peter Townsend in 1955. And when there isn't a crisis, there are always more pressing problems."

The issue came to a head, she feels, 50 years on from Princess Margaret being pressed into breaking off her engagement. The build-up to Prince Charles's marriage to Camilla Parker-Bowles in 2005 brought about judicial contortions from the Lord Chancellor of the day. Lord Falconer struggled to balance laws that were forged in the 18th century to bolster the hereditary monarchy with a Human Rights Act passed in 1998 making equality before the law a fundamental principle.

Result: farce. "The initial announcement that the civil marriage was to take place at Windsor Castle had to be hastily revised," Probert recalls. "It was shifted to Windsor Guildhall, which was registered for civil marriages." And why did it have to be a civil ceremony for the man who was first in line to the throne and head of the Church or England? Because he was a divorcee, and so was his bride. Attitudes had changed in 50 years, and the Queen felt able to give the consent to her son's marriage that she had been advised not to give to her sister's.

Crucial to the Queen's decision was Lord Falconer's judgment that the Human Rights Act meant that nobody, including the Prince of Wales, could be discriminated against on grounds of birth. "All we had was a statement in parliament and a decision by the registrar general to grant a certificate of marriage," says Probert. "The Lord Chancellor never went into detail about how the Act might apply to other members of the royal family. Can any of them now get married in a civil ceremony? And, if they choose to marry in church, do they have to go through the same formalities as everyone else?"

Royal privilege, it seems, has hitherto exempted them from certain requirements enshrined in the Marriage Act of 1753, including the need to get a licence and sign the appropriate parish or civil register. If Probert has her way, even the Archbishop of Canterbury could face a fine of £1,000 if he failed to ensure that this was done. Why? Because claiming rights on the basis of non-discrimination must inevitably mean forfeiting privileges enjoyed since the 18th century, she argues. "The time to legislate is now while there is a groundswell of enthusiasm for the forthcoming wedding." But surely the government has more pressing problems to deal with?

"Successive governments have been saying that since the 1950s and ducking the issue."

But why does it matter? "For the general population, it doesn't matter too much these days whether or not their parents are married. But unmarried royals can't pass on titles to their heirs. So as long as we have a royal family, we need to have clear laws that ensure that their marriages are free from challenge as to whether or not they're valid."

The Rights and Wrongs of Royal Marriage is published by Takeaway Press at £9.99